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
fun that could do the DDL part, but I cannot find anything to simply generate the SQL for inserts.
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.
1 year ago
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