pyDaSSQLiteMan V2.17 introduces application controlling commands which can be placed in comments, in a form of XML tags. The following abilities can be used from these commands:
Here are examples of each type of command (note that they are presented as SQL single or multiline comments containing XML. Ommitting some tags for details will cause default values to be used):
--<application_command commandtype="connect">c:\mydb.sqlite</application_command>
To connect to an in memory database use
--<application_command commandtype="connect">:memory:</application_command>
--<application_command commandtype="disconnect" />
--<application_command commandtype="commit" />
--<application_command commandtype="rollback" />
--<application_command commandtype="isolationlevel">deferred</application_command>
(The valid values for the isolation level are 'none', 'deferred', 'immediate', 'exclusive' and 'default'. Leaving the value blank is the same as nominating 'none').
/*<application_command commandtype="import"> <application_command_detail name="filename">c:\myfile.csv</application_command_detail> <application_command_detail name="textcharacter">"</application_command_detail> <application_command_detail name="containsheader">true</application_command_detail> <application_command_detail name="delimiter">,</application_command_detail> <application_command_detail name="tablename">MY_FILE</application_command_detail> <application_command_detail name="commitcount">500</application_command_detail> <application_command_detail name="encoding">utf-8</application_command_detail> <application_command_detail name="maxfieldsize">32000</application_command_detail> <application_command_detail name="datatypes">scan</application_command_detail> <application_command_detail name="zerolengthstringsnull">true</application_command_detail> </application_command>*/
(The valid values for data types are 'scan' or 'text'. An alternative name for datatypes is 'fieldnomination'. The valid values for zerolengthstringsnull are 'true' or 'false').
/*<application_command commandtype="export"> <application_command_detail name="filename">C:\ExportFile.csv</application_command_detail> <application_command_detail name="tablename">analysis_StandardAddressListPrevNotInCurr</application_command_detail> <application_command_detail name="textcharacter">"</application_command_detail> <application_command_detail name="containsheader">true</application_command_detail> <application_command_detail name="delimiter">,</application_command_detail> <application_command_detail name="encoding">utf-8</application_command_detail> </application_command>*/
--<application_command commandtype="exit" />