src/core/smart-data-source/interfaces/idatasource.ts
Properties |
|
Methods |
| addRecord | ||||||||
addRecord(initialValues?: any)
|
||||||||
|
Adds a new record to the data source
Parameters :
Returns :
Promise<boolean>
|
| cancelAll |
cancelAll()
|
|
Cancels all changes
Returns :
void
|
| cancelRecord |
cancelRecord()
|
|
Cancels changes to the current record
Returns :
void
|
| clear |
clear()
|
|
Clears all data loaded on the client side and closes the data source's query
Returns :
void
|
| clearAllFilters |
clearAllFilters()
|
|
Clears all initial and runtime filters
Returns :
void
|
| clearFilter |
clearFilter()
|
|
Clears all non-runtime filters and reapplies the last query if there is one
Returns :
void
|
| clearRuntimeFilter |
clearRuntimeFilter()
|
|
Clears all runtime filters and reapplies the last query if there is one
Returns :
void
|
| copyRecord | ||||||||
copyRecord(atIndex?: number)
|
||||||||
|
Copies the currently selected record and selects the copy
Parameters :
Returns :
Promise<boolean>
|
| deleteRecord |
deleteRecord()
|
|
Deletes the currently selected record
Returns :
Promise<void>
|
| fetch | ||||||||
fetch(query?: IQuery)
|
||||||||
|
Fetches data
Parameters :
Returns :
Promise<QueryResult<T>>
|
| getDataSource |
getDataSource()
|
|
Gets the data source as an observable
Returns :
Observable<ISmartDataSource<T>>
|
| getEmptyRecord |
getEmptyRecord()
|
|
Creates an empty record that adheres to the datasource's table schema
Returns :
Partial<T>
|
| getSelectedRecords |
getSelectedRecords()
|
|
Returns the selected records
Returns :
T[]
|
| saveChanges |
saveChanges()
|
|
Saves changes to the data source
Returns :
Promise<void>
|
| saveRecord |
saveRecord()
|
|
Saves the current record
Returns :
Promise<void>
|
| selectNextRecord |
selectNextRecord()
|
|
Selects the next record in the data source
Returns :
void
|
| selectPreviousRecord |
selectPreviousRecord()
|
|
Selects the previous record in the data source
Returns :
void
|
| setActiveChild | ||||||||
setActiveChild(active: boolean)
|
||||||||
|
Sets the active state of the child data source
Parameters :
Returns :
void
|
| setFilter | ||||||||
setFilter(value: any | any[] | string)
|
||||||||
|
Sets the filter that the SmartDataSource should use for queries
Parameters :
Returns :
void
|
| setNavigationDisabled | ||||||||||||
setNavigationDisabled(value: boolean, sourceDataSourceName: string)
|
||||||||||||
|
Sets whether navigation is disabled for the data source
Parameters :
Returns :
void
|
| setRuntimeFilter | ||||||||
setRuntimeFilter(value: CompositeFilterDescriptor | FilterDescriptor[] | string)
|
||||||||
|
Sets the runtime filter
Parameters :
Returns :
void
|
| addingRecord |
addingRecord:
|
Type : boolean
|
|
Indicates whether the data source is currently adding a record |
| afterDelete |
afterDelete:
|
Type : AfterEventCallback
|
| Optional |
|
Callback function to be executed after deleting |
| afterSaveChanges |
afterSaveChanges:
|
Type : AfterEventCallback
|
| Optional |
|
Callback function to be executed after saving changes |
| autoFetch |
autoFetch:
|
Type : boolean
|
| Optional |
|
If set to true, the data source will automatically fetch data |
| autoSelectFirstRecord |
autoSelectFirstRecord:
|
Type : boolean
|
|
Indicates whether the Smart Data Source should automatically select the first record after fetching data |
| batchSize |
batchSize:
|
Type : number
|
| Optional |
|
The batch size for fetching data |
| beforeDelete |
beforeDelete:
|
Type : BeforeEventCallback
|
| Optional |
|
Callback function to be executed before deleting |
| beforeSaveChanges |
beforeSaveChanges:
|
Type : BeforeEventCallback
|
| Optional |
|
Callback function to be executed before saving changes |
| copyingRecord |
copyingRecord:
|
Type : boolean
|
|
Indicates whether the data source is currently copying a record |
| dataRequested |
dataRequested:
|
Type : DataRequestedCallback
|
| Optional |
|
Callback function to be executed when data is requested |
| filter |
filter:
|
Type : any
|
| Optional |
|
The filter applied to the data source |
| foreignFieldMap |
foreignFieldMap:
|
Type : any
|
| Optional |
|
Map of foreign fields for parent-child relationships |
| id |
id:
|
Type : string
|
|
The unique identifier for the data source |
| instanceName |
instanceName:
|
Type : string
|
|
The instance name of the data source |
| isActiveChild |
isActiveChild:
|
Type : boolean
|
|
In the case of child data sources, indicates whether the data source will react to parent data source selection changes |
| isCreateDisabled |
isCreateDisabled:
|
Type : boolean
|
|
Indicates whether create access is disabled |
| isDeleteDisabled |
isDeleteDisabled:
|
Type : boolean
|
|
Indicates whether delete access is disabled |
| isReadDisabled |
isReadDisabled:
|
Type : boolean
|
|
Indicates whether read access is disabled |
| isReadOnly |
isReadOnly:
|
Type : boolean
|
|
Indicates whether the data source is in read-only mode |
| isUpdateDisabled |
isUpdateDisabled:
|
Type : boolean
|
|
Indicates whether update access is disabled |
| jsdoSchema |
jsdoSchema:
|
Type : JSDOFieldDefinition[]
|
|
The JSDO schema for the data source |
| loadedRecords |
loadedRecords:
|
Type : number
|
|
The number of records currently loaded in the data source |
| name |
name:
|
Type : string
|
|
The name of the data source |
| objectName |
| Use instanceName instead |
objectName:
|
Type : string
|
|
The object name of the data source |
| parentDataSource |
parentDataSource:
|
Type : any
|
| Optional |
|
Reference to the parent data source if this is a child data source |
| parentDataSourceName |
parentDataSourceName:
|
Type : string
|
|
The name of the parent data source |
| runtimeFilters |
runtimeFilters:
|
Type : CompositeFilterDescriptor | FilterDescriptor[] | string
|
|
Runtime filters applied to the data source |
| selected |
selected:
|
Type : T
|
|
The currently selected record |
| selectedIndex |
selectedIndex:
|
Type : number
|
|
The index of the currently selected record |
| selectionChanged |
selectionChanged:
|
Type : EventEmitter<SelectionChangedEventArgs<T>>
|
|
Event emitter for selection changes |
| skipRecords |
skipRecords:
|
Type : number
|
| Optional |
|
The number of records to skip when fetching |
| sort |
sort:
|
Type : SortDescriptor[] | string
|
| Optional |
|
The sort descriptors applied to the data source |
| state |
state:
|
Type : StateEvents
|
|
The current state of the data source |
| stateChanged |
stateChanged:
|
Type : EventEmitter<DataSourceStateChangeEventArgs>
|
|
Event emitter for state changes |
| top |
top:
|
Type : number
|
| Optional |
|
The maximum number of records to fetch |
| updatingRecord |
updatingRecord:
|
Type : boolean
|
|
Indicates whether the data source is currently updating a record |