Closed SSShuai1999 closed 2 years ago
The forUpdate
is not supported directly, but you can use it through useKnexQueryBuilder
const typedKnex = new TypedKnex(knex({ client: "postgresql" }));
const query = typedKnex.query(UserCategory);
query.useKnexQueryBuilder((q) => {
q.forUpdate();
});
assert.equal(query.toQuery(), "select * from "userCategories" for update");
Does this solve your problem?
Thanks for your answer! I closed it.
Issue type:
[ ] Question [ ] Bug report [ ] Feature request [x] Documentation issue
Database system/driver:
[ ] Postgres [ ] MSSQL [x] MySQL [ ] MariaDB [ ] SQLite3 [ ] Oracle [ ] Amazon Redshift
typed-knex version:
[x]
latest
[ ]@next
[ ]0.x.x
(or put your version here)Knex.js version:
First of all, thank you so much for your work! I love this library!
This
issues
mainly asks about how theforUpdate
function inknex
is used intyped-knex
!