Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Updates to the sqlite3_open() documentation. Method the magic :memory: filename. Ticket #2591. (CVS 4311) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
5f55b2fc4ecdfc1bb68f479751b86429 |
User & Date: | drh 2007-08-28 15:47:45.000 |
Context
2007-08-28
| ||
16:34 | Break up the mutex implementation into separate source files, one each for unix, w32, and os2. (CVS 4312) (check-in: fc5cd71aef user: drh tags: trunk) | |
15:47 | Updates to the sqlite3_open() documentation. Method the magic :memory: filename. Ticket #2591. (CVS 4311) (check-in: 5f55b2fc4e user: drh tags: trunk) | |
15:21 | Update the sqlite3_vfs_register() documentation to make the behavior undefined for VFSes with a NULL or empty string as the name or with duplicate names. (CVS 4310) (check-in: e7a98b4838 user: drh tags: trunk) | |
Changes
Changes to src/sqlite.h.in.
︙ | ︙ | |||
26 27 28 29 30 31 32 | ** on how SQLite interfaces are suppose to operate. ** ** The name of this file under configuration management is "sqlite.h.in". ** The makefile makes some minor changes to this file (such as inserting ** the version number) and changes its name to "sqlite3.h" as ** part of the build process. ** | | | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ** on how SQLite interfaces are suppose to operate. ** ** The name of this file under configuration management is "sqlite.h.in". ** The makefile makes some minor changes to this file (such as inserting ** the version number) and changes its name to "sqlite3.h" as ** part of the build process. ** ** @(#) $Id: sqlite.h.in,v 1.246 2007/08/28 15:47:45 drh Exp $ */ #ifndef _SQLITE3_H_ #define _SQLITE3_H_ #include <stdarg.h> /* Needed for the definition of va_list */ /* ** Make sure we can call this stuff from C++. |
︙ | ︙ | |||
1323 1324 1325 1326 1327 1328 1329 | */ void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); /* ** CAPI3REF: Opening A New Database Connection ** ** Open the sqlite database file "filename". The "filename" is UTF-8 | > | | < | > | | | > | | > > > > > > > > > | | | | | | > | 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 | */ void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); /* ** CAPI3REF: Opening A New Database Connection ** ** Open the sqlite database file "filename". The "filename" is UTF-8 ** encoded for [sqlite3_open()] and [sqlite3_open_v2()] and UTF-16 encoded ** in the native byte order for [sqlite3_open16()]. ** An [sqlite3*] handle is returned in *ppDb, even ** if an error occurs. If the database is opened (or created) successfully, ** then [SQLITE_OK] is returned. Otherwise an error code is returned. The ** [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain ** an English language description of the error. ** ** The default encoding for the database will be UTF-8 if ** [sqlite3_open()] or [sqlite3_open_v2()] is called and ** UTF-16 if [sqlite3_open16()] is used. ** ** Whether or not an error occurs when it is opened, resources associated ** with the [sqlite3*] handle should be released by passing it to ** [sqlite3_close()] when it is no longer required. ** ** The [sqlite3_open_v2()] interface works like [sqlite3_open()] except that ** provides two additional parameters for additional control over the ** new database connection. The flags parameter can be one of: ** ** <ol> ** <li> [SQLITE_OPEN_READONLY] ** <li> [SQLITE_OPEN_READWRITE] ** <li> [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE] ** </ol> ** ** The first value opens the database read-only. If the database does ** not previously exist, an error is returned. The second option opens ** the database for reading and writing if possible, or reading only if ** if the file is write protected. In either case the database must already ** exist or an error is returned. The third option opens the database ** for reading and writing and creates it if it does not already exist. ** The third options is behavior that is always used for [sqlite3_open()] ** and [sqlite3_open16()]. ** ** If the filename is ":memory:" or an empty string, then an private ** in-memory database is created for the connection. This in-memory ** database will vanish when the database connection is closed. Future ** version of SQLite might make use of additional special filenames ** that begin with the ":" character. It is recommended that ** when a database filename really does begin with ** ":" that you prefix the filename with a pathname like "./" to ** avoid ambiguity. ** ** 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 a NULL pointer then the default [sqlite3_vfs] ** object is used. ** ** <b>Note to windows users:</b> The encoding used for the filename argument ** of [sqlite3_open()] and [sqlite3_open_v2()] must be UTF-8, not whatever ** codepage is currently defined. Filenames containing international ** characters must be converted to UTF-8 prior to passing them into ** [sqlite3_open()] or [sqlite3_open_v2()]. */ int sqlite3_open( const char *filename, /* Database filename (UTF-8) */ sqlite3 **ppDb /* OUT: SQLite db handle */ ); int sqlite3_open16( const void *filename, /* Database filename (UTF-16) */ |
︙ | ︙ |