You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered the same issue described in #939 while using the latest Lucid release. My use case and the resulting error closely mirror those in the original issue.
I attempted to create a test case to address this, but my understanding of Lucid's internals is limited. Instead, I put together a small reproduction repository to demonstrate the problem.
Feel free to let me know if additional details or adjustments are needed!
I think the root of the issue is how the prepare method works right now. Basically, the prepare method is not capable of returning different values for insert, update, or select.
I am afraid that there is no quick fix for this and this is something we will have to think a bit more and then add support for it. I will keep this issue opened until we work on that.
I might be missing something about how Lucid works internally, but in my view, it doesn't seem necessary to return different values for different actions in this case. POINT() should work for INSERT, UPDATE, and SELECT operations without issue.
The error appears to be more about the RawBuilder not being properly converted into valid SQL and used in the query—it looks like it's just dumped as text instead. I enabled the debug mode on the reproduction repo; maybe that makes it clearer what I'm talking about.
Package version
@adonisjs/[email protected]
Describe the bug
Hi everyone,
I've encountered the same issue described in #939 while using the latest Lucid release. My use case and the resulting error closely mirror those in the original issue.
I attempted to create a test case to address this, but my understanding of Lucid's internals is limited. Instead, I put together a small reproduction repository to demonstrate the problem.
Feel free to let me know if additional details or adjustments are needed!
Reproduction repo
https://github.com/BluemediaDev/lucid-prepare-repro
The text was updated successfully, but these errors were encountered: