mirror of
https://github.com/sqlite/sqlite.git
synced 2025-12-07 20:22:20 +03:00
Improvements to sqlite3_open_v2() documentation.
FossilOrigin-Name: 4c4fd62a092b8db6398c64a92c9ff35915eedcce1079a77aeda81811d94096c4
This commit is contained in:
@@ -3279,10 +3279,8 @@ void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
|
||||
** The sqlite3_open_v2() interface works like sqlite3_open()
|
||||
** except that it accepts two additional parameters for additional control
|
||||
** over the new database connection. ^(The flags parameter to
|
||||
** sqlite3_open_v2() can take one of
|
||||
** the following three values, optionally combined with the
|
||||
** [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX], [SQLITE_OPEN_SHAREDCACHE],
|
||||
** [SQLITE_OPEN_PRIVATECACHE], and/or [SQLITE_OPEN_URI] flags:)^
|
||||
** sqlite3_open_v2() must include, at a minimum, one of the following
|
||||
** three flag combinations:)^
|
||||
**
|
||||
** <dl>
|
||||
** ^(<dt>[SQLITE_OPEN_READONLY]</dt>
|
||||
@@ -3300,23 +3298,51 @@ void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
|
||||
** sqlite3_open() and sqlite3_open16().</dd>)^
|
||||
** </dl>
|
||||
**
|
||||
** In addition to the required flags, the following optional flags are
|
||||
** also supported:
|
||||
**
|
||||
** <dl>
|
||||
** ^(<dt>[SQLITE_OPEN_URI]</dt>
|
||||
** <dd>The filename can be interpreted as a URI if this flag is set.</dd>)^
|
||||
**
|
||||
** ^(<dt>[SQLITE_OPEN_MEMORY]</dt>
|
||||
** <dd>The database will be opened as an in-memory database. The database
|
||||
** is named by the "filename" argument for the purposes of cache-sharing,
|
||||
** if shared cache mode is enabled, but the "filename" is otherwise ignored.
|
||||
** </dd>)^
|
||||
**
|
||||
** ^(<dt>[SQLITE_OPEN_NOMUTEX]</dt>
|
||||
** <dd>The new database connection will use the "multi-thread"
|
||||
** [threading mode].)^ This means that separate threads are allowed
|
||||
** to use SQLite at the same time, as long as each thread is using
|
||||
** a different [database connection].
|
||||
**
|
||||
** ^(<dt>[SQLITE_OPEN_FULLMUTEX]</dt>
|
||||
** <dd>The new database connection will use the "serialized"
|
||||
** [threading mode].)^ This means the multiple threads can safely
|
||||
** attempt to use the same database connection at the same time.
|
||||
** (Mutexes will block any actual concurrency, but in this mode
|
||||
** there is no harm in trying.)
|
||||
**
|
||||
** ^(<dt>[SQLITE_OPEN_SHAREDCACHE]</dt>
|
||||
** <dd>The database is opened [shared cache] enabled, overriding
|
||||
** the default shared cache setting provided by
|
||||
** [sqlite3_enable_shared_cache()].)^
|
||||
**
|
||||
** ^(<dt>[SQLITE_OPEN_PRIVATECACHE]</dt>
|
||||
** <dd>The database is opened [shared cache] disabled, overriding
|
||||
** the default shared cache setting provided by
|
||||
** [sqlite3_enable_shared_cache()].)^
|
||||
**
|
||||
** [[OPEN_NOFOLLOW]] ^(<dt>[SQLITE_OPEN_NOFOLLOW]</dt>
|
||||
** <dd>The database filename is not allowed to be a symbolic link</dd>
|
||||
** </dl>)^
|
||||
**
|
||||
** If the 3rd parameter to sqlite3_open_v2() is not one of the
|
||||
** combinations shown above optionally combined with other
|
||||
** required combinations shown above optionally combined with other
|
||||
** [SQLITE_OPEN_READONLY | SQLITE_OPEN_* bits]
|
||||
** then the behavior is undefined.
|
||||
**
|
||||
** ^If the [SQLITE_OPEN_NOMUTEX] flag is set, then the database connection
|
||||
** opens in the multi-thread [threading mode] as long as the single-thread
|
||||
** mode has not been set at compile-time or start-time. ^If the
|
||||
** [SQLITE_OPEN_FULLMUTEX] flag is set then the database connection opens
|
||||
** in the serialized [threading mode] unless single-thread was
|
||||
** previously selected at compile-time or start-time.
|
||||
** ^The [SQLITE_OPEN_SHAREDCACHE] flag causes the database connection to be
|
||||
** eligible to use [shared cache mode], regardless of whether or not shared
|
||||
** cache is enabled using [sqlite3_enable_shared_cache()]. ^The
|
||||
** [SQLITE_OPEN_PRIVATECACHE] flag causes the database connection to not
|
||||
** participate in [shared cache mode] even if it is enabled.
|
||||
**
|
||||
** ^The fourth parameter to sqlite3_open_v2() is the name of the
|
||||
** [sqlite3_vfs] object that defines the operating system interface that
|
||||
** the new database connection should use. ^If the fourth parameter is
|
||||
|
||||
Reference in New Issue
Block a user