Skip to content

Commit dbe68fe

Browse files
committed
Removed redundant Object.values() calls, because executeRaw doesn't contain the columns as keys anymore - this was a no-op.
1 parent 738a65e commit dbe68fe

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

packages/drizzle-driver/src/sqlite/PowerSyncSQLitePreparedQuery.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ export class PowerSyncSQLitePreparedQuery<
5454
}
5555

5656
const rows = (await this.values(placeholderValues)) as unknown[][];
57-
const valueRows = rows.map((row) => Object.values(row));
57+
5858
if (customResultMapper) {
59-
const mapped = customResultMapper(valueRows) as T['all'];
59+
const mapped = customResultMapper(rows) as T['all'];
6060
return mapped;
6161
}
62-
return valueRows.map((row) => mapResultRow(fields!, row, (this as any).joinsNotNullableMap));
62+
return rows.map((row) => mapResultRow(fields!, row, (this as any).joinsNotNullableMap));
6363
}
6464

6565
async get(placeholderValues?: Record<string, unknown>): Promise<T['get']> {
@@ -80,11 +80,10 @@ export class PowerSyncSQLitePreparedQuery<
8080
}
8181

8282
if (customResultMapper) {
83-
const valueRows = rows.map((row) => Object.values(row));
84-
return customResultMapper(valueRows) as T['get'];
83+
return customResultMapper(rows) as T['get'];
8584
}
8685

87-
return mapResultRow(fields!, Object.values(row), joinsNotNullableMap);
86+
return mapResultRow(fields!, row, joinsNotNullableMap);
8887
}
8988

9089
async values(placeholderValues?: Record<string, unknown>): Promise<T['values']> {

0 commit comments

Comments
 (0)