Closed rclai closed 8 years ago
Hmm, sounds like a good idea! If we add a lot of stuff like this we probably need a real API doc for the query stuff. Right now the docs kind of punt it and say "look at the Knex docs".
So, is the help wanted
for the functionality or the API doc?
Probably both! But the functionality is a much easier place to start :)
Can this issue be closed now?
.fetchOne()
is similar to Mongo's.findOne()
. This would help to nicely wrap.fetch()[0]
calls..fetchValue()
would be used for one-off values likeCOUNT
queries, or to just fetch the value of a single field in a row, which would help to safely wrap calls that do.fetch()[0].field
. For example,Todos.select('title').where({ id: 1 }).fetchValue()
.