Skip to content

Commit

Permalink
export replaceQueryArgs$ from adapters.ts (#385)
Browse files Browse the repository at this point in the history
* export replaceQueryArgs$ from adapters.ts

* export replaceQueryArgs$ in index.ts
  • Loading branch information
mmkal authored Jul 31, 2024
1 parent 2027196 commit 5c2088b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/adapters/adapters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function timeoutOrImmediate(fn: () => void, time: number) {

const delay = (time: number | undefined) => new Promise<void>(done => timeoutOrImmediate(done, time ?? 0));

function replaceQueryArgs$(this: void, sql: string, values: any[]) {
export function replaceQueryArgs$(this: void, sql: string, values: any[]) {
return sql.replace(/\$(\d+)/g, (str: any, istr: any) => {
const i = Number.parseInt(istr);
if (i > values.length) {
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { newDb } from './db';
export { enableStatementLocationTracking } from './parser/parse-cache';
export { replaceQueryArgs$ } from './adapters';
export * from './interfaces';

0 comments on commit 5c2088b

Please sign in to comment.