TinyJoin logoTinyJoin

createAdapter

The createAdapter method creates the adapter that tells Kysely how TinyJoin differs from PostgreSQL. Kysely calls it.

createAdapter(): DialectAdapter
returnsDialectAdapter

A Kysely dialect adapter.

Example

import {create} from 'tinyjoin';
import {TinyJoinDialect} from 'tinyjoin/kysely';

const client = await create();
const adapter = new TinyJoinDialect({client}).createAdapter();

// TinyJoin runs DDL outside transactions, so Kysely's Migrator must too.
console.log(adapter.supportsTransactionalDdl);
// -> false
console.log(adapter.supportsReturning);
// -> true
await client.close();