Unittest utility that returns a predefined set of values
WARNING: this is as susceptible to SQL injections as you would be writing it out by hand
This creates an editable data object out of a simple struct.
You can subclass DataObject if you want to get some compile time checks or better types.
Note: ?n params are zero based!
Given some SQL, it finds the CREATE TABLE instruction for the given tableName. (this is so it can find one entry from a file with several SQL commands. But it may break on a complex file, so try to only feed it simple sql files.)
Combines StructFromCreateTable and SimpleDataObject into a one-stop template. alias DataObjectFromSqlCreateTable(import("file.sql"), "my_table") MyTable;
Generic interface for RDBMS access. Use with one of the implementations in arsd.mysql, arsd.sqlite, arsd.postgres, or arsd.mssql. I'm sorry the docs are not good, but a little bit goes a long way:
To convert to other types, just use std.conv.to since everything comes out of this as simple strings.