summaryrefslogtreecommitdiff
path: root/src/sqlite.c
AgeCommit message (Collapse)Author
2022-04-02; * src/sqlite.c: Fix up header comment.Po Lu
2022-01-01; Add 2022 to copyright years.Eli Zaretskii
2021-12-14Only allow SQLite extensions from an allowlistLars Ingebrigtsen
* src/sqlite.c (Fsqlite_load_extension): Only allow extensions from an allowlist.
2021-12-13* src/sqlite.c (Fsqlite_open, Fsqlite_load_extension): Use ENCODE_FILE.Eli Zaretskii
2021-12-13Add a new `sqlite-pragma' commandLars Ingebrigtsen
* 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.
2021-12-13Introduce a new sqlite-locked-errorLars Ingebrigtsen
* 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.
2021-12-11* src/sqlite.c (row_to_value): Call 'make_unibyte_string'.Eli Zaretskii
2021-12-11Minor cleanups in sqlite.cEli Zaretskii
* 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.
2021-12-11Minor cleanups of sqlite3 code on MS-WindowsEli Zaretskii
* 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'.
2021-12-11Fix a typo in sqlite.cEli Zaretskii
* src/sqlite.c (Fsqlite_select): Fix a typo in arguments to make_sqlite.
2021-12-11Fix Fsqlite_finalize book-keepingLars Ingebrigtsen
* src/sqlite.c (Fsqlite_finalize): Mark the object as dead.
2021-12-11Check whether the sqlite supports sqlite3_load_extensionLars Ingebrigtsen
* 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.
2021-12-11Fix some sqlite doc string typosLars Ingebrigtsen
* src/sqlite.c (Fsqlite_load_extension, Fsqlite_more_p): Fix typos in doc strings.
2021-12-11Add sqlite3 support to EmacsLars Ingebrigtsen
* 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.