queryBuilder.toString() not working correctly
See original GitHub issueI’m not sure when this stopped working, but I’m using Objection v2.1.3 and when I call MyModel.query().toString()
I get [object QueryBuilder]
(same with .toSql()
). Previously I would get a string of SQL. This is in an older part of my codebase that was written early last year sometime. Has the usage of toString/toSql changed since then? I’m looking at the documentation on the site and I don’t see where I could be going wrong here. Any help would be very much appreciated. Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
queryBuilder.toString() not working correctly #1743 - GitHub
I'm not sure when this stopped working, but I'm using Objection v2.1.3 and when I call MyModel.query().toString() I get [object ...
Read more >c# - QueryBuilder is not encoding `@` in query parameters ...
ToQueryString() , the @ symbol is not encoded? Is there a way to get a properly encoded string or a reason it's not...
Read more >Cannot evaluate com.couchbase.lite.Select.toString()
Hi, i'm trying to create a dynamic query using couchbase lite 2.0.2. What i'm doing is to add select, from and where dynamically, ......
Read more >org.hibernate.envers.internal.tools.query.QueryBuilder.build ...
Best Java code snippets using org.hibernate.envers.internal.tools.query.QueryBuilder.build (Showing top 6 results out of 315) ; public void addWhere( String ...
Read more >Migration from objection 2.x to 3.0 | Objection.js
To get a knex raw builder, you need to use knex.raw directly. # QueryBuilder.toString and QueryBuilder.toSql have been removed. You can use QueryBuilder....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Oh damn! I’ll fix those asap. I had no idea those were outdated. Thanks for pointing this out.
Yeah, I found that after your comment yesterday, but I’m talking about these:
https://vincit.github.io/objection.js/api/query-builder/other-methods.html#tostring
https://vincit.github.io/objection.js/api/query-builder/other-methods.html#tosql
Those are what I was looking at originally and was very confused as to why it wasn’t working. It would be very helpful if there was a note there, and especially if that includes the migration link you just referenced.