Skip to content

Commit

Permalink
fix(better-sqlite3): Use string as default parameter type
Browse files Browse the repository at this point in the history
  • Loading branch information
Zareith committed Oct 20, 2024
1 parent 54496e9 commit 58abf9d
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/drivers/better-sqlite3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ export class Driver {
typ = factory.createKeywordTypeNode(SyntaxKind.NumberKeyword);
break;
}
case "varchar":
case "text": {
typ = factory.createKeywordTypeNode(SyntaxKind.StringKeyword);
break;
}
case "blob": {
// TODO: Is this correct or node-specific?
typ = factory.createTypeReferenceNode(
Expand All @@ -89,15 +94,6 @@ export class Driver {
typ = factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword);
break;
}
case "date":
case "datetime":
case "timestamp": {
typ = factory.createTypeReferenceNode(
factory.createIdentifier("Date"),
undefined
);
break;
}
}

if (column.notNull) {
Expand Down

0 comments on commit 58abf9d

Please sign in to comment.