ddn.odf.database

ODF database package model.

Provides preservation-first access to .odb database packages.

Database packages are complex ODF containers with embedded database files, forms, reports, queries, scripts, and connection metadata.

Database constructs

  • OdfDatabaseBody wraps the database body content
  • DatabaseConnection describes the connection type, URL, and settings
  • databaseBody() composing builder for constructing database bodies
  • Package contents preserved: forms, reports, queries, table definitions

Limitations:

  • No live database connectivity is provided
  • SQL queries and table data are preserved as raw XML
  • Form and report definitions are not parsed into typed structures

Types 4

Describes a database connection.

Fields
string driver
string url
string databaseName
string hostName
string port
string user
string password
string type
Methods
bool isEmpty() const @safe pure nothrowReturns `true` when no connection details are set.

Describes a database table descriptor.

Fields
string name
string schemaName
string catalogName
string type
string description
Methods
bool isEmpty() const @safe pure nothrowReturns `true` when the table has no name.

Describes a database query descriptor.

Fields
string name
string command
string commandType
string escapeProcessing
string styleName
Methods
bool isEmpty() const @safe pure nothrowReturns `true` when the query has no name.

Top-level model for ODF database package content.

Stores connection metadata, table/query descriptors, and preservation-first references to embedded resources.

Fields
DatabaseTable[] tables
DatabaseQuery[] queries
string[] embeddedResources
string settingsXml
Methods
bool isEmpty() const @safe pure nothrowReturns `true` when the body has no connection info.

Functions 5

fnOdfDatabaseBody emptyDatabaseBody() @safe pure nothrowReturns an empty `OdfDatabaseBody`.
fnDatabaseConnection dbConnection(string driver, string url = "", string databaseName = "") @safe pure nothrowConstructs a `DatabaseConnection`.
fnDatabaseTable dbTable(string name, string type = "TABLE") @safe pure nothrowConstructs a `DatabaseTable`.
fnDatabaseQuery dbQuery(string name, string command) @safe pure nothrowConstructs a `DatabaseQuery`.
fnOdfDatabaseBody databaseBody(DatabaseConnection connection, DatabaseTable[] tables = null, DatabaseQuery[] queries = null) @safe pure nothrowConstructs an `OdfDatabaseBody` with the given components.