Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Required callbacks #461

@parrish

Description

@parrish

I'm using the postgres client in 0.6.22 and am finding a weird quirk with the query builder.

knex(table).where(criteria).del() does not seem to execute the query, but

knex(table).where(criteria).del().then(function(){ }) works as expected.

Likewise, knex(table).where(criteria).del().exec() works too.

Does the presence of a callback imply a query is done being built and ready to be executed?

If this behavior is intentional, then an update to the documentation would be very helpful. I can see how it makes sense, but an explicit callout to this behavior would certainly make the intent more clear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions