UNPKG

ts-sql-query

Version:

Type-safe SQL query builder like QueryDSL or JOOQ in Java or Linq in .Net for TypeScript with MariaDB, MySql, Oracle, PostgreSql, Sqlite and SqlServer support.

27 lines (26 loc) 1.72 kB
import type { SqliteSqlBuilder } from "../sqlBuilders/SqliteSqlBuilder"; import type { QueryRunner } from "../queryRunners/QueryRunner"; import type { Sqlite, TypeSafeDB, TypeUnsafeDB } from "../databases"; import type { SqliteDateTimeFormat, SqliteDateTimeFormatType } from "./SqliteConfiguration"; import { AbstractConnection } from "./AbstractConnection"; export declare abstract class AbstractSqliteConnection<DB extends Sqlite & (TypeUnsafeDB | TypeSafeDB)> extends AbstractConnection<DB> { protected uuidStrategy: 'string' | 'uuid-extension'; constructor(queryRunner: QueryRunner, sqlBuilder: SqliteSqlBuilder); /** * The compatibility mode avoid to use the newer syntax introduces in the newer versions of sqlite * * The newer syntax are: * - Sqlite 3.30.0 (2019-10-04): Add support for the NULLS FIRST and NULLS LAST syntax in ORDER BY clauses. * In the copatibility mode their are emulated * - Sqlite 3.35.0 (2021-03-12): Add support for the RETURNING clause on DELETE, INSERT, and UPDATE statements. * In the compatibility mode last_insert_id() is used to get the last inserted id. * When the compatibility mode is disabled the RETURNING clause on the insert statement is used. */ protected compatibilityMode: boolean; protected getDateTimeFormat(_type: SqliteDateTimeFormatType): SqliteDateTimeFormat; protected treatUnexpectedIntegerDateTimeAsJulian: boolean; protected treatUnexpectedStringDateTimeAsUTC: boolean; protected unexpectedUnixDateTimeAreMilliseconds: boolean; protected transformValueFromDB(value: unknown, type: string): unknown; protected transformValueToDB(value: unknown, type: string): unknown; }