Skip to content

Commit 3688b02

Browse files
zenlorbrianc
authored andcommitted
add missing function setDialect (brianc#359)
add a new type definition: SQLDialects as Union of strings.
1 parent 0da386c commit 3688b02

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

lib/types.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
*/
77
declare module "sql" {
88

9+
type SQLDialects =
10+
| "mssql"
11+
| "mysql"
12+
| "oracle"
13+
| "postgres"
14+
| "sqlite"
15+
;
16+
917
interface OrderByValueNode {}
1018

1119
interface Named<Name extends string> {
@@ -30,6 +38,7 @@ declare module "sql" {
3038
name: Name;
3139
schema: string;
3240
columns: {[CName in keyof Row]: ColumnDefinition<CName, Row[CName]>};
41+
dialect?: SQLDialects;
3342
isTemporary?: boolean;
3443
foreignKeys?: {
3544
table: string,
@@ -207,5 +216,6 @@ declare module "sql" {
207216
}
208217

209218
function define<Name extends string, T>(map:TableDefinition<Name, T>): Table<Name, T>;
219+
function setDialect(dialect: SQLDialects): void;
210220

211221
}

0 commit comments

Comments
 (0)