Initialises a connected SQLite 3 database by creating all necessary tables if they do not exist already. The function also creates additional indices and triggers on the tables.
The function returns the following error codes:
E_DB_EXEC
if table, index, or trigger creation failed.E_INVALID
if the database is not connected.E_READ_ONLY
if database is opened read-only.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(db_type), | intent(inout) | :: | db |
Database type. |
||
logical, | intent(in), | optional | :: | sync |
Create synchronisation tables. |