Skip to content

Commit 72837fe

Browse files
committed
Remove cleansQuery and use in one place instead
1 parent 26ce623 commit 72837fe

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/operation.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ async function afterQuery(sql: string, result: any, isRaw: boolean, dataSource?:
4848
return result;
4949
}
5050

51-
function cleanseQuery(sql: string): string {
52-
return sql.replaceAll('\n', ' ')
53-
}
54-
5551
// Outerbase API supports more data sources than can be supported via Cloudflare Workers. For those data
5652
// sources we recommend you connect your database to Outerbase and provide the bases API key for queries
5753
// to be made. Otherwise, for supported data sources such as Postgres, MySQL, D1, StarbaseDB, Turso and Mongo
@@ -86,7 +82,7 @@ async function executeExternalQuery(sql: string, params: any, isRaw: boolean, da
8682
'X-Source-Token': dataSource.externalConnection.outerbaseApiKey,
8783
},
8884
body: JSON.stringify({
89-
query: cleanseQuery(sql),
85+
query: sql.replaceAll('\n', ' '),
9086
params: convertedParams,
9187
}),
9288
});

0 commit comments

Comments
 (0)