TTMSFNCCustomCloudGoogleFireBase Class
Base class for the realtime database client. Provides authenticated create, read, insert, update, delete, query, and rule-management operations against a database, exposing the results through dedicated events. Use the published descendant for design-time configuration.
API unit family: TMSFNCCloudGoogleFireBase
Inherits from: TTMSFNCCustomCloudGoogle
Syntax
TTMSFNCCustomCloudGoogleFireBase = class(TTMSFNCCustomCloudGoogle)
Properties
| Name | Description |
|---|---|
| GeneralRules | General (non-index) database rules as name/value pairs. Populated by GetRules and written back by SetRules. |
| IndexRules | Collection of per-table index rules. Populated by GetRules and written back by SetRules; use AddIndexRule to build it manually. |
Methods
| Name | Description |
|---|---|
| AddIndexRule | Adds a field to the index rule of a table, creating the table's index rule when it does not yet exist. Has no effect when the field is already indexed for that table. Call SetRules afterwards to persist the change. |
| BulkInsertData | Sends a request that inserts or merges multiple records at once from a single JSON payload keyed by record identifier. The outcome is reported through the insert-data result event. |
| CreateObject | Sends a request that creates a new, server-named object under the current table (or the database root when no table is set). The server-assigned name is reported through the create-object result event. The request is skipped while the database name or access token is empty. |
| DeleteData | Sends a request that deletes a single record identified by the given key from the current table. The outcome is reported through the delete-data result event. |
| DeleteTable | Sends a request that deletes an entire table (top-level path). The outcome is reported through the delete-table result event. The request is skipped while the database name, table name, or access token is empty. |
| GetRules | Sends a request that retrieves the database security and index rules, parsing them into the index-rule and general-rule collections. Both collections are cleared before the request runs. Completion is reported through the get-rules result event. |
| IDExists | Sends a request that checks whether a record with the given identifier exists. The result is reported through the identifier-existence event. |
| InsertData | Sends a request that inserts a single record with the given identifier and payload into the current table. The outcome is reported through the insert-data result event. The request is skipped while the database name, identifier, or access token is empty. |
| Query | Queries the current table for records whose property matches the given text value exactly. Results are delivered through the query result event. The query is skipped when the keyword is empty. |
| ReadData | Sends a request that reads a single record, or the entire current table when no identifier is supplied. The returned payload is delivered through the read-data result event. |
| SetRules | Sends a request that writes the current index-rule and general-rule collections back to the database as its security and index rules. Completion is reported through the set-rules result event. |
| UpdateData | Sends a request that replaces the payload of the record with the given identifier. The outcome is reported through the update-data result event. |