Skip to content

Commit

Permalink
Update changelogs, fix .get() regression in SQLite
Browse files Browse the repository at this point in the history
  • Loading branch information
dankochetov committed May 24, 2023
1 parent f0e7daa commit 1f1c16b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions changelogs/drizzle-orm/0.26.1.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
- 🐛 Fixed including multiple relations on the same level in RQB (#599)
- 🐛 Updated migrators for relational queries support (#601)
- 🐛 Fixed invoking .findMany() without arguments
2 changes: 1 addition & 1 deletion drizzle-orm/src/d1/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class PreparedQuery<T extends PreparedQueryConfig = PreparedQueryConfig>
if (!fields && !customResultMapper) {
const params = fillPlaceholders(this.params, placeholderValues ?? {});
logger.logQuery(queryString, params);
return stmt.bind(...params).all().then(({ results }) => results!);
return stmt.bind(...params).all().then(({ results }) => results![0]);
}

const rows = await this.values(placeholderValues);
Expand Down
2 changes: 1 addition & 1 deletion drizzle-orm/src/libsql/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export class PreparedQuery<T extends PreparedQueryConfig = PreparedQueryConfig>
const params = fillPlaceholders(this.params, placeholderValues ?? {});
logger.logQuery(queryString, params);
const stmt: InStatement = { sql: queryString, args: params as InArgs };
return (tx ? tx.execute(stmt) : client.execute(stmt)).then(({ rows }) => rows.map((row) => normalizeRow(row)));
return (tx ? tx.execute(stmt) : client.execute(stmt)).then(({ rows }) => normalizeRow(rows[0]));
}

const rows = await this.values(placeholderValues);
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@
"vitest": "^0.29.8",
"zod": "^3.20.2"
}
}
}

0 comments on commit 1f1c16b

Please sign in to comment.