Closed conan closed 1 year ago
This is incorrect.
Per the docs:
The default behavior is to return all the columns in each row. You can specify a subset of columns to return using the :columns
option. It takes a vector and each element of the vector can be:
:column-fn
will be applied, if provided),:column-fn
will be applied to both, if provided),:column-fn
will be applied to the alias, if provided).The example in the docs has [[:email :address]]
which means: select column email AS address
If you want just id
then [:id]
will select it. If you want id AS the_key
then you want [[:id :the_key]]
sorry, i misunderstood, thank you for the explanation
I just tried the
find-by-keys
function for the first time following the docs:I got this error:
I changed
{:columns [[:id]]}
to{:columns [:id]}
and it worked and returned me the results I needed. My observed behaviour is what I'd expect anyway, so I think it's just a typo.