Skip to content
Oxford Harrison edited this page Nov 12, 2024 · 27 revisions

DOCS


This is the Linked QL API documentation.

High Level APIs

The high-level database abstraction APIs in Linked QL.

API Description
Client The top-level Linked QL API
Database The database-level Linked QL API
Table The table-level Linked QL API
Savepoint The Savepoint API

Above, the Client, Database, and Table APIs have the following relationship:

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().

DQL APIs

The Data Query APIs.

API Description
SelectStatement The SelectStatement API

DML APIs

The Data Manipulation APIs.

API Description
InsertStatement The InsertStatement API
UpsertStatement The UpsertStatement API
UpdateStatement The UpdateStatement API
DeleteStatement The DeleteStatement API

DDL APIs

The Data Definition APIs.

API Description
CreateDatabase The CreateDatabase API
AlterDatabase The AlterDatabase API
DropDatabase The DropDatabase API
API Description
CreateTable The CreateTable API
AlterTable The AlterTable API
DropTable The DropTable API
Clone this wiki locally