You need to execute the statements one by one and write code that reads the statements.
I have written code to read a SQL schema definition file and create a database from it, you can find it here: https://github.com/alex-hhh/ActivityLog2/blob/master/rkt/dbutil.rkt The `db-open` command will open a SQLite database and will create a schema if the database does not exist. I even implemented a `db-uprade' command that allows upgrading an existing database to a newer version by applying a series of SQL patches. If you want to see how it is all tied together, look at dbapp.rkt and the SQL files in the "sql" folder. Feel free to use the code if you find it useful. Best Regards, Alex. On Friday, May 12, 2017 at 8:49:37 PM UTC+8, Alexander McLin wrote: > `db` library doesn't seem to provide support for executing batch statements > against a database. I'm trying to initialize and create an in-memory SQLite3 > database using a SQL schema file. `query-exec` and its friends only support > executing single SQL statements. > > Reading documentation isn't showing me a way to be able to execute more than > one statement at once or allow a SQL text file to be read in and executed. > Does anyone know a better method? > > Thanks! > > Alexander B. McLin -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.