Skip to content

Commit 8b89f9c

Browse files
committed
fix: make query parameters optional
1 parent f4f926c commit 8b89f9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bridge.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export type BridgetClient = {
6767
end: () => Promise<void>,
6868
off: (eventName: string, listener: (...args: any[]) => void) => void,
6969
on: (eventName: string, listener: (...args: any[]) => void) => void,
70-
query: (sql: string, parameters: SerializableParameter[]) => Promise<QueryResult>,
70+
query: (sql: string, parameters?: SerializableParameter[]) => Promise<QueryResult>,
7171
release: () => Promise<void>,
7272
};
7373

@@ -112,7 +112,7 @@ export const createPostgresBridge = (postgres: typeof Postgres) => {
112112
},
113113
off: connectionEvents.off.bind(connectionEvents),
114114
on: connectionEvents.on.bind(connectionEvents),
115-
query: async (sql: string, parameters: SerializableParameter[]): Promise<QueryResult> => {
115+
query: async (sql: string, parameters?: SerializableParameter[]): Promise<QueryResult> => {
116116
// https://github.com/porsager/postgres#result-array
117117
const resultArray = await connection.unsafe(sql, parameters as any);
118118

0 commit comments

Comments
 (0)