SchemaRepository
Hierarchy
- Repository<SchemaModel>
- SchemaRepository
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
Returns SchemaRepository
Properties
className
classType
completeChunks
events
hasMore
loaded
optionalmap
middlewares
name
noFiltersNoLoad
objects
path
query
optionalschema
server
Methods
clear
Returns JQueryDeferred<void>
completeChunk
Parameters
chunks: any
defer: any
Returns void
create
Parameters
object: Record<string, unknown>
Returns JQueryDeferred<any>
defaultResponseMiddleware
Parameters
data: any
optionalctx: any
Returns Record<string, any>
delete
Parameters
id: number
Returns JQueryDeferred<void>
encodeData
Parameters
schema: Schema | SchemaModel
Returns {}
[key string]: any
find
Parameters
optionalquery: Query | {}
Returns JQueryDeferred<any>
findById
Parameters
id: string | number
nocache: boolean = false
Returns JQueryDeferred<any>
formatCSV
Parameters
data: {}
map: MapSVGMap
Returns {}
[key string]: any
getApiEndpoint
Parameters
name: string
optionalmodel: Partial<Model>
Returns ApiEndpoint
getLoaded
Returns ArrayIndexed<SchemaModel>
getLoadedAsArray
Returns ArrayIndexed<SchemaModel>
getLoadedObject
Parameters
id: string | number
Returns SchemaModel
getRequest
Parameters
action: string
urlParams: Record<string, string | number>
data: {} = {}
Returns MapsvgRequest
getResponse
Parameters
_data: string
request: any
Returns MapsvgResponse
getSchema
Returns Schema
import
Imports data from a CSV file.
Parameters
data: {}
convertLatlngToAddress: boolean
map: MapSVGMap
Returns any
importByChunks
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
Returns void
loadDataFromResponse
Parameters
data: string | Record<string, any>
ctx: MapsvgCtx
Returns void
onFirstPage
Returns boolean
onLastPage
Returns boolean
reload
Returns Promise<JQueryDeferred<any>>
setNoFiltersNoLoad
Parameters
value: boolean
Returns void
setSchema
Parameters
schema: string | Schema
Returns void
update
Parameters
schema: Schema | SchemaModel
Returns JQueryDeferred<any>
Repository used to manage schemas in the database.