-
-
Notifications
You must be signed in to change notification settings - Fork 2
Oxford Harrison edited this page Nov 9, 2024
·
27 revisions
This is a progressive documentation of the Linked QL API.
These are the high-level database abstraction APIs in Linked QL.
Concepts
The Client
, Database
, and Table
APIs are related hierarchically. A good mental model for this relationship is:
Client
.database(): Database
.table(): Table
These APIs at play could look something like:
// Create database "database_1"
await client.createDatabase(
'database_1',
{ ifNotExists: true }
);
// Enter "database_1" and create a table
await client.database('database_1').createTable({
name: 'table_1', columns: [
{ name: 'column_1', type: 'int', identity: true, primaryKey: true },
{ name: 'column_2', type: 'varchar' },
{ name: 'column_3', type: 'varchar' },
]
});
// Enter "table_1" and insert data
await client.database('database_1').table('table_1').insert({
column_2: 'Column 2 test content',
column_3: 'Column 3 test content',
});
While the primary query API in here is client.query()
, Linked QL comes with the additional APIs to let you programmatically do the same things possible with client.query()
.
(Docs coming soon)
(Docs coming soon)
(Docs coming soon)