TStellarDataStore Class
Introduction
TStellarDataStore is a non-visual component that enables to use the StellarDS.io API in an efficient way. It offers access to the tables, user profile and user project information.
TStellarDataStore
TStellarDataStore is the main class offering access to the StellarDS.io API in an object oriented way.
Properties of TStellarDataStore
Property |
Description |
ProjectID: string |
Holds the project GUID after GetProject is called |
Tables: TStellarDataStoreTables |
Collection filled with the table information after a call to GetTables |
User: TStellarDataStoreUser |
Class holding the user account information after a call to GetUser |
Methods of TStellarDataStore
Only the methods specific to TWebStellarDataStoreClientDataset are listed below. Other methods from the base DataSet classes are used in the standard way.
Method |
Description |
GetUser |
Async method retrieving the user account information. Returns true when successful and user account information is set via User property |
GetTables |
Async method retrieving all table information. Returns true when successful and the tables collection is filled with all project's tables |
GetProject |
Async method retrieving the unique user project GUID |
HasTable(TableName: string) |
Async method returning true when the project has the table specified by name |
CreateTable(TableName: string; isMultitenant: boolean; Description: string) |
Async method returning true when the project has the table specified by id |
DeleteTable(TableName: string) |
Async method deleting a table by table name |
DeleteTable(TableId: integer) |
Async method deleting a table by table id |
TStellarDataStoreTables
TStellarDataStoreTables is a collection of TStellarDataStoreTable. After calling TStellarDataStore.GetTables, this collection is filled with all the tables from the StellarDS.io project
Methods of TStellarDataStoreTables
Method |
Description |
FindTable(TableName: string): TStellarDataStoreTable |
Returns the table from the Tables collection by name |
TStellarDataStoreTable
TStellarDataStoreTables is a collection of TStellarDataStoreTable. After calling TStellarDataStore.GetTables, this collection is filled with all the tables from the StellarDS.io project
Properties of TStellarDataStoreTable
Property |
Description |
DB: TStellarDataStore |
Provides access to the owner TStellarDataStore class |
Fields: TStellarDataStoreFields |
Collection of the fields metadata of the StellarDS.io table |
Entities: TStellarDataStoreEntities |
Collection of the entities data of the StellarDS.io table |
WhereQuery: string |
The filter specifier for returning the StellarDS.io table data |
SortQuery: string |
The sort order specifier for returning the StellarDS.io table data |
JoinQuery: string |
The table join specifier for returning the StellarDS.io table data |
Name: string |
Holds the name of the table |
TableID: string |
Holds the unique id of table |
Description: string |
Holds the table description |
Multitenant: boolean |
When true, the table is by default multi-tenant, i.e. multiple users having access to the table will only work on their own data |
Methods of TStellarDataStoreTable
Method |
Description |
CreateField(AName: string; AType: TFieldType; ASize: integer = 0) |
Async method creating a new field in the table |
DeleteField(AName: string) |
Async method deleting the field with the specified name from the table |
GetFields |
Async method filling the Fields collection of the table with all fields retriebed for the StellarDS.io table |
GetEntities |
Async method filling the Entities collection with the data of the StellarDS.io table |
GetEntitiesAsArray |
Async method returning a JSON array of the records of the StellarDS.io table |
InsertArray(AArray: TJSArray) |
Async method inserting new records into the StellarDS.io table |
UpdateArray(AId: string; AArray: TJSArray) |
Async method updating an array of records in the StellarDS.io table |
Delete(AId: string) |
Async method deleting a table by Id from the StellarDS.io project |
TStellarDataStoreFields
TStellarDataStoreFields is a collection of TStellarDataStoreField. After calling TStellarDataStoreTable.GetFields, this collection is filled with all the fields from the StellarDS.io table
Method |
Description |
FindField(FieldName: string): TStellarDataStoreField |
Returns the field from the Fields collection by name |
TStellarDataStoreField
Properties of TStellarDataStoreField
Property |
Description |
FieldName: string |
Name of the field |
FieldType: TFieldType |
Type of the field |
FieldSize: integer |
Size of the field |
FieldID: string |
Unique ID of the field |
Methods of TStellarDataStoreField
Method |
Description |
class function FieldTypeNameToFieldType(AName: string): TFieldType; |
Converts the StellarDS.io field type name to a Delphi TFieldType |
class function FieldTypeNameToFieldSize(AName: string): integer; |
Gets the field size from the StellarDS.io field name |
class function FieldTypeToFieldTypeName(AType: TFieldType; ASize: integer): string; |
Returns the field type to use for StellarDS.io from a Delphi field type and Size |
TStellarDataStoreEntities
TStellarDataStoreEntities is a collection of TStellarDataStoreEntity. After calling TStellarDataStoreTable.GetEntities, the Entities collection is filled with data from the StellarDS.io table
TStellarDataStoreEntity
Class holding an entity from a table
Properties of TStellarDataStoreEntity
Methods of TStellarDataStoreEntity
Method |
Description |
EntityID: string |
Holds the unique Id of the entity |
Value[AName: string]: string |
Offers access to a value by name within the entity |
Values: TStrings |
Offers access to the values array of the entity |
TStellarDataStoreUser
Properties of TStellarDataStoreUser
Property |
Description |
Name: string |
Name of the user owning the project |
EMail: string |
Email address of the user owning the project |