Skip to content

Commit 09e3c21

Browse files
committed
feat: types for current_time, current_date, and current_timestamp
1 parent 10328ba commit 09e3c21

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

parser/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

parser/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ fallible-iterator = "0.3.0"
1010
indexmap = "2.4.0"
1111
sqlite3-parser = "0.13.0"
1212
wasm-bindgen = "0.2.93"
13-
sqlx-sqlite = { git = "https://github.com/merceyz/sqlx.git", branch = "merceyz/expose-explain" }
13+
sqlx-sqlite = { git = "https://github.com/merceyz/sqlx.git", branch = "eslint-plugin-sqlite" }

tests/inferQueryResult.test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ it("should support count", () => {
261261
it("should support literals", () => {
262262
const result = testInferQueryResult(
263263
"",
264-
"SELECT 1, true, false, 'foo', x'01', NULL",
264+
"SELECT 1, true, false, 'foo', x'01', NULL, current_time, current_date, current_timestamp",
265265
);
266266

267267
expect(result).toStrictEqual<typeof result>([
@@ -271,10 +271,9 @@ it("should support literals", () => {
271271
{ name: "'foo'", type: ColumnType.String },
272272
{ name: "x'01'", type: ColumnType.Buffer },
273273
{ name: "NULL", type: ColumnType.Null },
274-
// TODO: Add support for these literals
275-
// { name: "current_time", type: ColumnType.String },
276-
// { name: "current_date", type: ColumnType.String },
277-
// { name: "current_timestamp", type: ColumnType.String },
274+
{ name: "current_time", type: ColumnType.String },
275+
{ name: "current_date", type: ColumnType.String },
276+
{ name: "current_timestamp", type: ColumnType.String },
278277
]);
279278
});
280279

0 commit comments

Comments
 (0)