Skip to main content

SchemaRepository

Repository used to manage schemas in the database.

Hierarchy

Index

Constructors

constructor

Properties

className

className: string = ""

classType

classType: typeof Model

completeChunks

completeChunks: number

events

events: Events

hasMore

hasMore: boolean = false

loaded

loaded: boolean

optionalmap

map?: MapSVGMap

middlewares

middlewares: MiddlewareList

name

name: string

noFiltersNoLoad

noFiltersNoLoad: boolean

objects

path

path: string

query

query: Query

optionalschema

schema?: Schema

server

server: Server

Methods

clear

  • clear(): JQueryDeferred<void>
  • Returns JQueryDeferred<void>

completeChunk

  • completeChunk(chunks: any, defer: any): void
  • Parameters

    • chunks: any
    • defer: any

    Returns void

create

  • create(object: Record<string, unknown>): JQueryDeferred<any>
  • Parameters

    • object: Record<string, unknown>

    Returns JQueryDeferred<any>

defaultResponseMiddleware

  • defaultResponseMiddleware(data: any, ctx?: any): Record<string, any>
  • Parameters

    • data: any
    • optionalctx: any

    Returns Record<string, any>

delete

  • delete(id: number): JQueryDeferred<void>
  • Parameters

    • id: number

    Returns JQueryDeferred<void>

encodeData

  • Parameters

    Returns {}

    • [key string]: any

find

  • find(query?: Query | {}): JQueryDeferred<any>
  • Parameters

    • optionalquery: Query | {}

    Returns JQueryDeferred<any>

findById

  • findById(id: string | number, nocache?: boolean): JQueryDeferred<any>
  • Parameters

    • id: string | number
    • nocache: boolean = false

    Returns JQueryDeferred<any>

formatCSV

  • Parameters

    Returns {}

    • [key string]: any

getApiEndpoint

  • Parameters

    • name: string
    • optionalmodel: Partial<Model>

    Returns ApiEndpoint

getLoaded

getLoadedAsArray

getLoadedObject

  • Parameters

    • id: string | number

    Returns SchemaModel

getRequest

  • getRequest(action: string, urlParams: Record<string, string | number>, data?: {}): MapsvgRequest
  • Parameters

    • action: string
    • urlParams: Record<string, string | number>
    • data: {} = {}

    Returns MapsvgRequest

getResponse

  • Parameters

    • _data: string
    • request: any

    Returns MapsvgResponse

getSchema

  • Returns Schema

import

  • import(data: {}, convertLatlngToAddress: boolean, map: MapSVGMap): any
  • Imports data from a CSV file.


    Parameters

    • data: {}
    • convertLatlngToAddress: boolean
    • map: MapSVGMap

    Returns any

importByChunks

  • importByChunks(data: {}, language: string, convertLatlngToAddress: boolean): any
  • Splits data to small chunks and sends every chunk separately to the server


    Parameters

    • data: {}

      Data to import

    • language: string

      Language for Geocoding conversions

    • convertLatlngToAddress: boolean

      Whether lat/lng coordinates should be converted to addresses via Geocoding service

    Returns any

init

  • init(): void
  • Returns void

loadDataFromResponse

  • loadDataFromResponse(data: string | Record<string, any>, ctx: MapsvgCtx): void
  • Parameters

    • data: string | Record<string, any>
    • ctx: MapsvgCtx

    Returns void

onFirstPage

  • onFirstPage(): boolean
  • Returns boolean

onLastPage

  • onLastPage(): boolean
  • Returns boolean

reload

  • reload(): Promise<JQueryDeferred<any>>
  • Returns Promise<JQueryDeferred<any>>

setNoFiltersNoLoad

  • setNoFiltersNoLoad(value: boolean): void
  • Parameters

    • value: boolean

    Returns void

setSchema

  • setSchema(schema: string | Schema): void
  • Parameters

    Returns void

update

  • Parameters

    Returns JQueryDeferred<any>