How can we make pg-promise return an array of rows from a query, as opposed to array of row objects?
相关问题
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- google-drive can't get push notifications
- How to reimport module with ES6 import
- Django distinct is not working
- PostgreSQL: left outer join syntax
相关文章
- postgresql 关于使用between and 中是字符串的问题
- node连接远程oracle报错
- postgresql 月份差计算问题
- Using boolean expression in order by clause
- How can make folder with Firebase Cloud Functions
- Table valued Parameter Equivalent in Postgresql
- in redshift postgresql can I skip columns with the
- Oracle equivalent of PostgreSQL INSERT…RETURNING *
Version 4.0.5 of pg-promise started to support advanced parameters for
Prepared Statements
andParameterized Queries
, exactly as they are in node-postgres. One such parameter - rowMode, can be set toarray
to make the driver return rows as arrays.See also types that wrap them: PreparedStatement and ParameterizedQuery.
The code below is equivalent to the one above, but offers better performance + re-usability + flexibility of setting values separately.