Extract the data source for a specific database
int qdb_data_source( qdb_hdl_t *db,
int buffer_length );
- A pointer to the database handle.
- A buffer to hold the resulting source path information.
- The length of buffer.
This function provides a path to the source used to initialize the database. This
source may be one of several paths, depending on the state of the specified
database when qdb is started and the database initialized:
- If the database is empty, the string will be empty.
- If the database is created with a schema only, the string will be the path to the schema file used to create the database.
- If the database is created with a schema and initialized with a data schema, then the string will be a colon delimited list of schema:data schema1[:data schema2...]
- If the database is created from an existing database that is not corrupted (and not a backup database), then the string will be the path to that database which will be the same as the Filename entry.
- If the database is created from a backup database, then the string will be the path to the restoring database from one of the Backup Dir entries.
- An error occurred (errno is set).