aboutsummaryrefslogtreecommitdiffstats
path: root/src/sqlite.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; * src/sqlite.c: Fix up header comment.Po Lu2022-04-021-3/+3
|
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
|
* Only allow SQLite extensions from an allowlistLars Ingebrigtsen2021-12-141-5/+31
| | | | | * src/sqlite.c (Fsqlite_load_extension): Only allow extensions from an allowlist.
* * src/sqlite.c (Fsqlite_open, Fsqlite_load_extension): Use ENCODE_FILE.Eli Zaretskii2021-12-131-2/+2
|
* Add a new `sqlite-pragma' commandLars Ingebrigtsen2021-12-131-0/+12
| | | | | | | * doc/lispref/text.texi (Database): Document it. * src/sqlite.c (Fsqlite_pragma): Add a separate command for pragmas. These can be done via sqlite-execute, but it's less confusing to have them in a separate command.
* Introduce a new sqlite-locked-errorLars Ingebrigtsen2021-12-131-2/+11
| | | | | | * src/sqlite.c (Fsqlite_execute): Use it. (syms_of_sqlite): Introduce a new error for locked databases so that we can catch that condition on higher levels.
* * src/sqlite.c (row_to_value): Call 'make_unibyte_string'.Eli Zaretskii2021-12-111-4/+4
|
* Minor cleanups in sqlite.cEli Zaretskii2021-12-111-12/+16
| | | | | | | | * src/sqlite.c (Fsqlite_open): Signal an error if 'init_sqlite_functions' fails. Encode FILE using UTF-8. (Fsqlite_close, Fsqlite_execute, Fsqlite_select) (Fsqlite_load_extension): Doc fixes. (Fsqlite_load_extension): Encode MODULE using UTF-8.
* Minor cleanups of sqlite3 code on MS-WindowsEli Zaretskii2021-12-111-32/+16
| | | | | | | | | | * src/sqlite.c (sqlite_loaded_p): Function deleted: not used anymore. (init_sqlite_functions) [WINDOWSNT]: Use a static 'bool' variable to indicate if sqlite3 DLL was successfully loaded. (Fsqlite_available_p) [WINDOWSNT]: Just call 'init_sqlite_functions' if Vlibrary_cache doesn't mention 'sqlite3'.
* Fix a typo in sqlite.cEli Zaretskii2021-12-111-1/+1
| | | | | * src/sqlite.c (Fsqlite_select): Fix a typo in arguments to make_sqlite.
* Fix Fsqlite_finalize book-keepingLars Ingebrigtsen2021-12-111-1/+2
| | | | * src/sqlite.c (Fsqlite_finalize): Mark the object as dead.
* Check whether the sqlite supports sqlite3_load_extensionLars Ingebrigtsen2021-12-111-4/+13
| | | | | | | * configure.ac: Check for sqlite3_load_extension, which is apparently missing in some versions. * src/sqlite.c: Add guards. (Fsqlite_load_extension): Ifdef out on systems that doesn't have it.
* Fix some sqlite doc string typosLars Ingebrigtsen2021-12-111-2/+2
| | | | | * src/sqlite.c (Fsqlite_load_extension, Fsqlite_more_p): Fix typos in doc strings.
* Add sqlite3 support to EmacsLars Ingebrigtsen2021-12-111-0/+708
* configure.ac: Add check for the sqlite library. * doc/lispref/text.texi (Database): Document it. * lisp/sqlite.el: New file. * lisp/term/w32-win.el (dynamic-library-alist): Add a mapping. * src/Makefile.in (SQLITE3_LIBS): Add the libraries. * src/alloc.c (union emacs_align_type): Add a Lisp_Sqlite struct. * src/data.c (Ftype_of): Add sqlite. * src/emacs.c (main): Load the syms. * src/lisp.h (DEFINE_GDB_SYMBOL_BEGIN): Add PVEC_SQLITE. (GCALIGNED_STRUCT): New struct to keep data for sqlite database objects and statement objects. (SQLITEP, SQLITE, CHECK_SQLITE, XSQLITE): New macros for accessing the objects. * src/pdumper.c (dump_vectorlike): Update hash. (dump_vectorlike): Don't dump it. * src/print.c (print_vectorlike): Add a printer for the sqlite object. * src/sqlite.c: New file. * test/src/sqlite-tests.el: Add tests.