Convert instance of a non-primitive class into an object suitable for SQL/find #2295
Closed
davetron5000
started this conversation in
General
Replies: 1 comment 3 replies
-
Adding an Your example looks weird, because you have |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have something like this:
I'd like to be able to do something like:
When I do this, I get
can't express #<Channel:0x00007e5e91a71b10 @value="sms"> as a SQL literal
Due to questionable artificially-intelligent advice, I attempted to override
sql_literal
, and it does get called, but I could not figure out how to safely return a value from that that would work.Sequel.lit(@value)
did not work (I got a different error).Is there a way to modify a class with "here's how to turn this into a SQL string"?
Beta Was this translation helpful? Give feedback.
All reactions