diff --git a/deno.json b/deno.json index 01ac46d..62f35f0 100644 --- a/deno.json +++ b/deno.json @@ -14,7 +14,8 @@ "test:run": "deno test -A --unstable-ffi", "test:watch": "deno test -A --unstable-ffi --watch", "bump": "deno run -A jsr:@mys/bump@1", - "update": "deno run --allow-read=. --allow-write=. --allow-net https://deno.land/x/udd@0.8.2/main.ts *.ts deno.jsonc", + "update": "deno run -A jsr:@molt/cli deno.json", + "update:commit": "deno task -q update --commit deno.json", "check": "deno fmt --check . && deno lint . && deno task test:run" }, "lint": { diff --git a/src/Query.ts b/src/Query.ts index f985e7d..be98f3e 100644 --- a/src/Query.ts +++ b/src/Query.ts @@ -537,7 +537,7 @@ function buildSelectNode( : builder.SelectStmt.FromTable(internal.from.name), resultColumns: state.select ? Utils.arrayToNonEmptyArray(state.select) - : [builder.ResultColumn.Star()], + : [builder.ResultColumn.TableStar(internal.from)], where: state.where?.ast, groupBy: state.groupBy ? { diff --git a/tests/advanced.test.ts b/tests/advanced.test.ts index 87a6048..4baa8d3 100644 --- a/tests/advanced.test.ts +++ b/tests/advanced.test.ts @@ -333,7 +333,7 @@ Deno.test("Find all users with only task 1 & 2 using subquery in expression", () count(users_tasks.task_id) == 2 ) SELECT - * + users.* FROM users WHERE @@ -376,7 +376,7 @@ Deno.test("Find all users with no tasks", () => { users_tasks.user_id ) SELECT - * + users.* FROM users WHERE diff --git a/tests/index.test.ts b/tests/index.test.ts index 35ad73e..f6169b7 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -253,7 +253,7 @@ Deno.test("Query simple CTE", () => { GROUP BY users.name LIMIT 10 ) - SELECT * FROM cte_id2 + SELECT cte_id2.* FROM cte_id2 `); expect(result.params).toEqual(null); }); diff --git a/tests/where.test.ts b/tests/where.test.ts index 2b89deb..85fccf4 100644 --- a/tests/where.test.ts +++ b/tests/where.test.ts @@ -17,7 +17,7 @@ Deno.test("Simple filter", () => { const query = tasksDb.tasks.query().filterEqual({ id: "1" }).first(); expect(format(query.sql)).toEqual(sql` - SELECT * + SELECT tasks.* FROM tasks WHERE tasks.id == :_id0 @@ -32,7 +32,7 @@ Deno.test("Filter twice", () => { }).first(); expect(format(query.sql)).toEqual(sql` - SELECT * + SELECT tasks.* FROM tasks WHERE tasks.id == :_id0 AND tasks.id == :_id2 @@ -95,7 +95,7 @@ Deno.test("Filter null value", () => { .first(); expect(format(query.sql)).toEqual(sql` - SELECT * + SELECT users.* FROM users WHERE users.displayName IS NULL `); @@ -110,7 +110,7 @@ Deno.test("Filter multiple values", () => { }).first(); expect(format(query.sql)).toEqual(sql` - SELECT * + SELECT users.* FROM users WHERE users.displayName IS NULL AND users.email == :_id0 `);