kylefarris / node-querybuilder

Node QueryBuilder Adapter for Node.js (tags: nodejs, node, mysql, active record, activerecord, querybuilder, query builder)
49 stars 19 forks source link

Connection cannot be reused after calling delete. #33

Closed Flamenco closed 6 years ago

Flamenco commented 6 years ago

Here's the error:

Error: You have not specified any tables to select from!

I called qb.delete('theTable', ...) and then tried to call qb.from('theTable').select(...).get(...)

When I call the select before the delete, it works.

If I use a fresh connection, it also works.

It seems the delete call is not resetting the connection properly, according to the docs

At this point, the QueryBuilder will be reset and ready to build a new query.
kylefarris commented 6 years ago

@Flamenco, we already have an issue in about this (#26). It will be addressed in the version I'm working on right now.

kylefarris commented 6 years ago

This is officially fixed in the v2 branch. Beta should be out soon.