(db, sql, bind, ...getArgs)
| 13260 | selectObject() methods. |
| 13261 | */ |
| 13262 | const __selectFirstRow = (db, sql, bind, ...getArgs)=>{ |
| 13263 | const stmt = db.prepare(sql); |
| 13264 | try { |
| 13265 | const rc = stmt.bind(bind).step() ? stmt.get(...getArgs) : undefined; |
| 13266 | stmt.reset(/*for INSERT...RETURNING locking case*/); |
| 13267 | return rc; |
| 13268 | }finally{ |
| 13269 | stmt.finalize(); |
| 13270 | } |
| 13271 | }; |
| 13272 | |
| 13273 | /** |
| 13274 | Internal impl of the DB.selectArrays() and selectObjects() |
no test coverage detected