diff options
Diffstat (limited to 'static/netbsd/man3/sqlite3_data_directory.3')
| -rw-r--r-- | static/netbsd/man3/sqlite3_data_directory.3 | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/static/netbsd/man3/sqlite3_data_directory.3 b/static/netbsd/man3/sqlite3_data_directory.3 new file mode 100644 index 00000000..c33ec2b3 --- /dev/null +++ b/static/netbsd/man3/sqlite3_data_directory.3 @@ -0,0 +1,52 @@ +.Dd January 24, 2024 +.Dt SQLITE3_DATA_DIRECTORY 3 +.Os +.Sh NAME +.Nm sqlite3_data_directory +.Nd name of the folder holding database files +.Sh SYNOPSIS +.In sqlite3.h +.Vt char *sqlite3_data_directory; +.Sh DESCRIPTION +If this global variable is made to point to a string which is the name +of a folder (a.k.a. +directory), then all database files specified with a relative pathname +and created or accessed by SQLite when using a built-in windows VFS +will be assumed to be relative to that directory. +If this variable is a NULL pointer, then SQLite assumes that all database +files specified with a relative pathname are relative to the current +directory for the process. +Only the windows VFS makes use of this global variable; it is ignored +by the unix VFS. +.Pp +Changing the value of this variable while a database connection is +open can result in a corrupt database. +.Pp +It is not safe to read or modify this variable in more than one thread +at a time. +It is not safe to read or modify this variable if a database connection +is being used at the same time in a separate thread. +It is intended that this variable be set once as part of process initialization +and before any SQLite interface routines have been called and that +this variable remain unchanged thereafter. +.Pp +The data_store_directory pragma may modify +this variable and cause it to point to memory obtained from sqlite3_malloc. +Furthermore, the data_store_directory pragma +always assumes that any string that this variable points to is held +in memory obtained from sqlite3_malloc and the pragma +may attempt to free that memory using sqlite3_free. +Hence, if this variable is modified directly, either it should be made +NULL or made to point to memory obtained from sqlite3_malloc +or else the use of the data_store_directory pragma +should be avoided. +.Sh IMPLEMENTATION NOTES +These declarations were extracted from the +interface documentation at line 6482. +.Bd -literal +SQLITE_API SQLITE_EXTERN char *sqlite3_data_directory; +.Ed +.Sh SEE ALSO +.Xr sqlite3 3 , +.Xr sqlite3_malloc 3 , +.Xr sqlite3_vfs 3 |
