(params: ProxyParams)
| 87 | return result as any[]; |
| 88 | }; |
| 89 | const proxy = async (params: ProxyParams) => { |
| 90 | const prepared = session.prepareQuery< |
| 91 | PreparedQueryConfig & { |
| 92 | execute: AwsDataApiPgQueryResult<unknown>; |
| 93 | values: AwsDataApiPgQueryResult<unknown[]>; |
| 94 | } |
| 95 | >( |
| 96 | { |
| 97 | sql: params.sql, |
| 98 | params: params.params ?? [], |
| 99 | typings: params.typings, |
| 100 | }, |
| 101 | undefined, |
| 102 | undefined, |
| 103 | params.mode === 'array', |
| 104 | ); |
| 105 | if (params.mode === 'array') { |
| 106 | const result = await prepared.values(); |
| 107 | return result.rows; |
| 108 | } |
| 109 | const result = await prepared.execute(); |
| 110 | return result.rows; |
| 111 | }; |
| 112 | const transactionProxy: TransactionProxy = async (queries) => { |
| 113 | throw new Error('Transaction not supported'); |
| 114 | }; |
no test coverage detected