Skip to content

Commit

Permalink
Add drizzleIntegration query header
Browse files Browse the repository at this point in the history
Added query header for future logging of integration usage
  • Loading branch information
apeng-singlestore committed Nov 6, 2024
1 parent 465a8a2 commit 6b8676e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drizzle-orm/src/singlestore/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ export class SingleStoreDriverPreparedQuery<T extends SingleStorePreparedQueryCo
private returningIds?: SelectedFieldsOrdered,
) {
super();
const queryWithComment = `/* drizzleIntegration */ ${queryString}`;
this.rawQuery = {
sql: queryString,
sql: queryWithComment,
// rowsAsArray: true,
typeCast: function(field: any, next: any) {
if (field.type === 'TIMESTAMP' || field.type === 'DATETIME' || field.type === 'DATE') {
Expand All @@ -74,7 +75,7 @@ export class SingleStoreDriverPreparedQuery<T extends SingleStorePreparedQueryCo
},
};
this.query = {
sql: queryString,
sql: queryWithComment,
rowsAsArray: true,
typeCast: function(field: any, next: any) {
if (field.type === 'TIMESTAMP' || field.type === 'DATETIME' || field.type === 'DATE') {
Expand Down

0 comments on commit 6b8676e

Please sign in to comment.