Hi, I'm wondering if <#C0CG7E0A1|exposed> could al...
# exposed
m
Hi, I'm wondering if #exposed could also be used as a SQL generator (without interacting with the database itself). In my case I have data in various CSV files for which I need to generate a *.sql script with DDL and insert statements. The generated *.sql script can then be used by others to import it in their database. Now
SchemaUtils
has a
createStatements
fun that could do the DDL part, but I cannot find anything to simply generate the SQL for inserts.
👀 1
e
what do you mean by interaction?
m
I mean not writing to the database itself (not even having a database connection) I basically just want to define the table deifnitiions, and write the DDL statements from it to a file, together with generated insert statements.
e
I’ve tried the same but with read queries and it seems that currently you must have at least one active transaction to get the corresponding SQL
m
Thx for confirming, I thought the same