Closed woldendans closed 8 years ago
The reason for that is that unqlite_open() does not deal with disk operation at all. That is, it merely prepare the db handle, allocate the internal stuff and so forth. Disk operation starts with the first call to unqllte_kv_store(), unqlite_kv_fetch(), etc.
The function should be named unqlite_initi() instead of unqlite_open().
Hello,
In the unqlite_open documentation page, it is specified that, if UNQLITE_OPEN_READWRITE is used:
I would expect this behaviour to be true for UNQLITE_OPEN_READONLY too.
Yet, what I observe is that even if the DB does not exists, the return code is _UNQLITEOK. But if you call any funtion using the returned handle (like a store instruction), you will get a _UNQLITEIOERR return code.
What is the real expected behaviour? The one specified is appealing because it allow us to check immediatly if the DB exists instead of waiting for a first instruction to be made.