AnyhowStep / tsql

A SQL query-builder/ORM
37 stars 3 forks source link

Add a top-level fetchValue() function, and maybe fetchOne(), too #286

Open AnyhowStep opened 4 years ago

AnyhowStep commented 4 years ago

Right now, to select a single value without any table selected,

sql.selectValue(() => someExpr)
    .fetchValue(connection);

Would be nice to have,

sql.fetchValue(
  connection,
  () => someExpr
)