(db, sql, bind, ...getArgs)
| 13381 | selectObject() methods. |
| 13382 | */ |
| 13383 | const __selectFirstRow = (db, sql, bind, ...getArgs)=>{ |
| 13384 | const stmt = db.prepare(sql); |
| 13385 | try { |
| 13386 | const rc = stmt.bind(bind).step() ? stmt.get(...getArgs) : undefined; |
| 13387 | stmt.reset(/*for INSERT...RETURNING locking case*/); |
| 13388 | return rc; |
| 13389 | }finally{ |
| 13390 | stmt.finalize(); |
| 13391 | } |
| 13392 | }; |
| 13393 | |
| 13394 | /** |
| 13395 | Internal impl of the DB.selectArrays() and selectObjects() |
no test coverage detected