Replies: 1 comment 1 reply
-
I'm not sure I'm completely following the issue, but perhaps it's because the example is fairly simplified, but could you not just use parameters here? -- clone_tree.sql
SELECT * FROM foo WHERE id = :source_id sql = File.read("clone_tree.sql")
DB[sql, source_id: id] |
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey y'all,
I've got a complicated multi-statement query I need to run against an SQLite database (so no stored procedures), and I'm currently doing it by expanding a raw SQL erb template with arguments:
two questions, in case y'all have dealt with this before:
Sequel[0]
for example, literalized into SQL that doesn't require calling an undocumented (public) method on the dataset? I couldn't find anything else in the source, and doing it this way works, "escaping an expression" seems like something that would be exposed somewhere, so I'm guessing I just haven't seen it.Thanks for any help, y,all!
Beta Was this translation helpful? Give feedback.
All reactions