Hi honey…ers? Is there a way to emit non parametrized sql OR can someone help me understand if its possible for something to read the raw sql in that format produce. I suppose i could wrap the sql like is done here: https://www.postgresql.org/docs/9.1/static/ecpg-dynamic.html This is for a specific i need i have to generate sql statments that can be written to a file then used again. So i’m assuming i need (or at least its easier) to work with
INSERT INTO persons (id, name) VALUES (2523, 'drew')
Then the version with parametrization:
INSERT INTO persons (id, name) VALUES (2523, ?) "drew"
i think this is an option on format
Does the file have to be actual SQL that can be run? Or can it just be a representation that you could load and do something with later?
HoneySQL produces a data structure so you might be able to just save that as EDN?
@seancorfield One of the goals is to produce something sql stmts that any program (any language) could use. So it can be a representation, but that would probably be a secondary goal to just producing the runnable sql.
I suppose its not hard to read this into a java program and execute it. As you suggest it might be easier as a data structure.
INSERT INTO persons (id, name) VALUES (2523, ?) "drew"
Well, with "INSERT INTO persons (id, name) VALUES (2523, ?)" 'drew'
or some way to tell where the arguments start.