Uses createQueryGenerator for actually doing the job. data_ will be made available with D's 'with' statement to the embedded code in queryString. So you can access the elements just as regular variables.
* This method generates D code from the preSql data, which can be mixed in for generating the resulting sql and the resulting Variant[] array. * The variable sql_ will contain the generated SQL. * The variable args_ is the Variant[] array. * Use createQuery for directly generating the resulting SQL and args. * Params: * preSql = The to be processed SQL containing D expressions in #{} blocks, sub blocks in {} and declarations in ${}. * Returns: D code which can be mixed in.
The generated query + args.
Unicode not really supported. I haven't really explored that yet, but I believe that at the moment string processing will fail for multibyte utf-8 characters in the input string.
Date: January 7, 2013
2013 Robert Klotzner
GNU General Public License version 3 <http://www.gnu.org/licenses/>
Create SQL queries from string containing D expressions.
This module allows you to generate SQL from a template, containing D expressions. Depending on these expressions parts of the template will be included in the SQL or not.