UNPKG

1.29 kBTypeScriptView Raw
1/// <reference path="../../adonis-typings/index.d.ts" />
2import { DialectContract, QueryClientContract } from '@ioc:Adonis/Lucid/Database';
3export declare class MssqlDialect implements DialectContract {
4 private client;
5 readonly name = "mssql";
6 readonly supportsAdvisoryLocks = false;
7 /**
8 * Reference to the database version. Knex.js fetches the version after
9 * the first database query, so it will be set to undefined initially
10 */
11 readonly version: any;
12 /**
13 * The default format for datetime column. The date formats is
14 * valid for luxon date parsing library
15 */
16 readonly dateTimeFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZ";
17 constructor(client: QueryClientContract);
18 /**
19 * Returns an array of table names
20 */
21 getAllTables(): Promise<any[]>;
22 /**
23 * Truncate mssql table. Disabling foreign key constriants alone is
24 * not enough for SQL server.
25 *
26 * One has to drop all FK constraints and then re-create them, and
27 * this all is too much work
28 */
29 truncate(table: string, _: boolean): Promise<void>;
30 /**
31 * Drop all tables inside the database
32 */
33 dropAllTables(): Promise<void>;
34 getAdvisoryLock(): Promise<boolean>;
35 releaseAdvisoryLock(): Promise<boolean>;
36}