Skip to content

Commit

Permalink
Remove missing column metadata error
Browse files Browse the repository at this point in the history
  • Loading branch information
dankochetov committed May 1, 2024
1 parent 30dc2ee commit f9be0ab
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drizzle-orm/src/aws-data-api/pg/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ export class AwsDataApiPreparedQuery<
const result = await this.values(placeholderValues);
if (!fields && !customResultMapper) {
const { columnMetadata, rows } = result;
if (!columnMetadata?.length) {
throw new Error(
'Unexpected state: no column metadata found in the Data API response. Please report this issue on GitHub: https://github.com/drizzle-team/drizzle-orm/issues/new/choose',
);
if (!columnMetadata) {
return result;
}
const mappedRows = rows.map((sourceRow) => {
const row: Record<string, unknown> = {};
Expand Down

0 comments on commit f9be0ab

Please sign in to comment.