Files of XML meta-program

meta-program-folder		(a folder in project tree, any name you like)
        |----root-file		(see comments below)
        |----settings.xsd	(XSD-files are used for code-completion)
        |----settings.xml	(common settings like target folder, location of SQL-files, etc.)
        |----dto.xml		(here you declare all DTO classes)
        |----OrderDao.xml	(XML-files with declarations of DAO classes)
        |----ProductDao.xml	(file name is used as class name: '<class_name>.xml')
        | ...

Root-file is just an empty file. The name of root-file defines target programming language: 'php.dal', 'java.dal', 'cpp.dal', 'python.dal', or 'ruby.dal' (ensure lower case). Double-clicking the root-file opens the plug-in GUI:

Create root-file. Open the plug-in GUI, tab 'Admin'. Click GUI buttons to create XSD-files, the stub of 'settings.xml', the stub of 'dto.xml'. Click ‘Edit settings.xml’, read and follow the notes in XML-comments. Save the changes.

External Data Access Controller

In SQL DAL Maker, generated DAO classes interact with database through an external data access controller class, DataStore. Any database-specific types, API, frameworks, etc. are used only inside of DataStore, not in generated code.

// This is an example for Java, but concept for other target languages is the same.
// Field 'ds' is of type DataStore:

public byte[] getSound(Integer t_id) throws Exception {

	String sql = "SELECT t_bytes FROM terms WHERE t_id = ?";

	return ds.query(byte[].class, sql, t_id);

Some implementations of DataStore are shipped with plug-ins: plug-in GUI, tab 'Admin'.

Current state:

Target language Methods of data access controller called by generated code Existing implementations of data access controller Comments
PHP insert, execDML, query, queryList, queryDto, queryDtoList PDO
Java insert, execDML, query, queryList, queryDto, queryDtoList Spring JDBC, Apache DbUtils, Groovy Sql, Android Java Classes for SQLite Through JDBC, you can use MySQL, SQLite, PostgresSQL, Oracle, Oracle XE, H2, HSQLDB, Derby, MS SQL Server, IBM DB2, IBM Informix, Firebird, CUBRID, and many others.
C++ insert, execDML, queryRow, queryRowList SQLite C Library It may be also MySQL Connector/C/C++, OLE DB, ADO, etc.
Python insert_row, exec_dml, query_scalar, query_scalar_array, query_single_row, query_all_rows SQLite, MySQL Connector/Python
Ruby insert_row, exec_dml, query_scalar_value, query_all_scalar_values, query_first_row, query_all_rows DBI SQLite3, MySQL, etc. may be used directly:
db = 'orders.sqlite'