Open a connection to the database at the 'pURI' location.
Sqlite databases are created in the directory: "../data/db", the location of the data directory is defined in the server documentation.
- Parameters
-
pURI | [ in ] The URI defines the underlying database to use. Currently supported URIs include: 'sqlite3://filename', 'sqlite://:memory:', and 'postgresql8://user-name/password/hostname/hostaddr/port/database-name', where "sqlite3" and "postgresql8" are the database 'schemes'. |
pfn | [ in ] Pointer to a callback function to be invoked once the connection is complete or has failed. If set to NULL, then the call is blocking, otherwise it returns immedately with a "eOk" result and a call to this function will happen sometimes in the future. |
pCtx | [ in ] Can be NULL, pointer to a context that is passed to the pfn callback once the connection result is known. This memory is allocated and freed only by the caller. |
- Returns
Success | P6R::eOk | |
Failure | P6R::eNoMemory | Insuffficient memory to properly initialize the component |
P6R::eNotInitialized | A call to initialize() has not been made. |
P6R::eNotFound | The 'scheme' in the pURI parameter does not match to any known database implementation. |
P6R::eInvalidURI | Invalid URI format, or rest of URI does not match scheme |
P6R::eNotSupported | The database implementation does not support one of the settings in initialize (e.g., a non-NULL pPath parameter) |