Skip to content

Commit be569b7

Browse files
committed
add throwing execlastidDecl to better-sqlite3 driver
1 parent 3bd92d2 commit be569b7

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

src/drivers/better-sqlite3.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SyntaxKind, NodeFlags, Node, TypeNode, factory } from "typescript";
1+
import { SyntaxKind, NodeFlags, Node, TypeNode, factory, FunctionDeclaration } from "typescript";
22

33
import { Parameter, Column, Query } from "../gen/plugin/codegen_pb";
44
import { argName } from "./utlis";
@@ -427,10 +427,20 @@ export function manyDecl(
427427
);
428428
}
429429

430+
export function execlastidDecl(
431+
funcName: string,
432+
queryName: string,
433+
argIface: string | undefined,
434+
params: Parameter[]
435+
): FunctionDeclaration {
436+
throw new Error('better-sqlite2 driver currently does not support :execlastid')
437+
}
438+
430439
export default {
431440
columnType,
432441
execDecl,
433442
manyDecl,
434443
oneDecl,
435444
preamble,
445+
execlastidDecl,
436446
};

src/drivers/pg.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ export function execlastidDecl(
784784
argIface: string | undefined,
785785
params: Parameter[]
786786
): FunctionDeclaration {
787-
throw new Error('pg driver does not support :execlastid')
787+
throw new Error('pg driver currently does not support :execlastid')
788788
}
789789

790790
export default {

src/drivers/postgres.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ export function execlastidDecl(
608608
argIface: string | undefined,
609609
params: Parameter[]
610610
): FunctionDeclaration {
611-
throw new Error('postgres driver does not support :execlastid')
611+
throw new Error('postgres driver currently does not support :execlastid')
612612
}
613613

614614
export default {

0 commit comments

Comments
 (0)