You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 27, 2019. It is now read-only.
Unlike pg.Client, QueryStream doesn't seem to work when a QueryConfig is passed, ie an object as :
{
text : 'SELECT * FROM foo WHERE bar =$1,
values : [1]
}
I get the following error :
Unhandled rejection TypeError: "string" must be a string, Buffer, or ArrayBuffer
at Function.byteLength (buffer.js:363:11)
at module.exports.Writer.addCString (C:\node-projects\payroll-app\node_modules\buffer-writer\index.js:57:22)
at Connection.parse (C:\node-projects\payroll-app\node_modules\pg\lib\connection.js:212:6)
at module.exports.Cursor.submit (C:\node-projects\payroll-app\node_modules\pg-query-stream\node_modules\pg-cursor\index.js:21:7)
at Client._pulseQueryQueue (C:\node-projects\payroll-app\node_modules\pg\lib\client.js:298:24)
at Client.query (C:\node-projects\payroll-app\node_modules\pg\lib\client.js:326:8)
Is it a bug or a this feature is missing ?
Thx by advance.
The text was updated successfully, but these errors were encountered:
I'm using sql-template in my source code which is really nice, so having this feature would be a big bonus. As a workaround I'm currently using:
const {text, values} = SQL`
SELECT
event_id,
user_id,
data->>'sessionDateTime' AS session_date_time,
data
FROM event
WHERE data->>'sessionDateTime' >= ${beginDateTime}
AND data->>'sessionDateTime' <= ${endDateTime}
`;
const query = new QueryStream(text, values)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi Brianc, and thx for this great module !
Unlike pg.Client, QueryStream doesn't seem to work when a QueryConfig is passed, ie an object as :
I get the following error :
Is it a bug or a this feature is missing ?
Thx by advance.
The text was updated successfully, but these errors were encountered: