-
-
Notifications
You must be signed in to change notification settings - Fork 2
Client API
Oxford Harrison edited this page Nov 13, 2024
·
13 revisions
Client is the base object for the various top-level clients in Linked QL. Each instance implements the following methods:
| API | Description |
|---|---|
client.query() |
Run an arbitrary query. |
client.createDatabase() |
Programmatically perform a CREATE DATABASE operation. |
client.renameDatabase() |
Programmatically perform a RENAME DATABASE operation. |
client.alterDatabase() |
Programmatically perform an ALTER DATABASE operation. |
client.dropDatabase() |
Programmatically perform a DROP DATABASE operation. |
client.hasDatabase() |
Check if a database exists. |
client.databases() |
Get the list of databases. |
client.database() |
Obtain a Database instance. |
client.schema() |
Obtain the root schema instance. |
client.listen() |
Bind an event listener. |
client.getPID() |
Get your client connection ID. |
Instances of the Linked QL client are created as shown in the getting started guide. See ClientOptions below for the list of options shared by most or all clients.
type ClientOptions = {
// Language options
dialect?: string;
ansiQuotes?: boolean;
// Language extensions
mysqlReturningClause?: boolean;
// Schema options
schemaSelector?: object | object[];
schemaCacheInvalidation?: number;
// Savepoints options
autoSavepoints?: boolean;
commitRef?: string;
// Other
autoBindings?: boolean;
};| Param | Interfaces | Description |
|---|---|---|
schemaCacheInvalidation? |
- | An optional flag that adds CASCADE flags to subtree manipulations. Defaults to false. (See ➞ ALTER DATABASE ➞ Managing Tables)
|
schemaCacheInvalidation? |
- | An optional flag that adds CASCADE flags to subtree manipulations. Defaults to false. (See ➞ ALTER DATABASE ➞ Managing Tables)
|
existsChecks? |
- | An optional flag that adds EXISTS checks to subtree manipulations. Defaults to false. (See ➞ ALTER DATABASE ➞ Managing Tables)
|