| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
* src/sqlite.c (Fsqlite_load_extension): Add 2 Free Software
extensions to the allow-list. For the details, see
https://lists.gnu.org/archive/html/emacs-devel/2023-11/msg00234.html.
|
|
|
|
|
| |
* src/sqlite.c (Fsqlite_load_extension): Support *.dylib
extensions. (Bug#63653)
|
|
|
|
|
|
|
|
| |
* src/sqlite.c (HAVE_LOAD_EXTENSION): Define to 1 only if
enabling/disabling extension loading is supported as well.
(load_dll_functions, Fsqlite_load_extension): Condition on
HAVE_LOAD_EXTENSION, not on HAVE_SQLITE3_LOAD_EXTENSION.
(Bug#63653)
|
|
|
|
|
|
|
|
|
|
| |
* src/sqlite.c (sqlite3_db_config) [WINDOWSNT]: Load from the DLL.
(Fsqlite_load_extension): Use 'sqlite3_db_config' to enable and
disable loading of extensions. Add a few free extensions to the
allow-list. Fix testing for the ".dll" extension. (Bug#63590)
* test/src/sqlite-tests.el (sqlite-load-extension): Fix the test
to require successful load if the extension does exist.
|
|
|
|
|
|
|
|
| |
* src/sqlite.c (Fsqlite_next): Doc fix. Return nil if SQLITE_DONE
was once seen for this statement. (Bug#61151)
(row_to_value): Cons the value in reverse, to avoid the Fnreverse
call. Patch by Helmut Eller <eller.helmut@gmail.com>.
(Bug#61165)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* src/sqlite.c (sqlite3_libversion, load_dll_functions):
Make sqlite3_libversion available.
(Fsqlite_version): New.
(syms_of_sqlite): Define sqlite-version.
* doc/lispref/text.texi (Database): Document.
* test/src/sqlite-tests.el (sqlite-returning): `RETURNING` was added
in sqlite 3.35; skip the test for older versions.
|
|
|
|
|
|
|
| |
* src/sqlite.c (sqlite3_errstr) [WINDOWSNT]: Define and load from
the DLL only if the SQLite3 version is at least 3.7.15.
(sqlite_prepare_errdata) [SQLITE_VERSION_NUMBER >= 3007015]: Use
the original code if sqlite3_errstr is available.
|
|
|
|
|
| |
* src/sqlite.c (sqlite_prepare_errdata): Use sqlite3_errmsg
instead of sqlite3_errstr.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a new 'sqlite-error' and use it for all errors signaled in
'src/sqlite.c', except those that already used 'sqlite-locked-error'.
Include the values of 'sqlite3_errcode', 'sqlite3_extended_errcode',
'sqlite3_errstr' and 'sqlite3_errmsg' in the error data.
* src/sqlite.c (load_dll_functions): Load 'sqlite3_extended_errcode'.
(sqlite-load-extension): Use 'xsignal1' as required by argument type.
(syms_of_sqlite): Introduce a new error type 'sqlite-error'.
(check_sqlite, sqlite-open, bind_values, sqlite-execute)
(sqlite-select, sqlite-load-extension, sqlite-next): Use it.
(sqlite_prepare_errdata): New function.
(sqlite_prepare_errmsg): Remove function.
(sqlite-execute, sqlite-select): Use new function.
(sqlite-locked-error): Derive from 'sqlite-error'.
|
|
|
|
|
|
|
| |
* src/sqlite.c (sqlite_prepare_errmsg): New function.
(Fsqlite_execute): Use it to get the same error format for both
execute and select.
(Fsqlite_select): Factored out from here.
|
|
|
|
|
|
| |
* doc/lispref/text.texi (Database): Mention it.
* src/sqlite.c (Fsqlite_execute): Support syntax like "insert into
... returning ..." (bug#58390).
|
|
|
|
| |
* src/sqlite.c (Fsqlite_execute): Fix indentation.
|
|
|
|
|
| |
* src/sqlite.c (Fsqlite_select): Add more the more specific error
text to the error data (bug#58363).
|
|
|
|
| |
* src/sqlite.c (Fsqlite_select): Clean up code slightly.
|
|
|
|
|
|
| |
* src/sqlite.c (load_dll_functions): Update.
(Fsqlite_select): Signal an error when there's an error preparing
the statement.
|
|
|
|
|
| |
* src/sqlite.c (Fsqlite_open): Don't use SQLITE_OPEN_FULLMUTEX
if not defined.
|
|
|
|
|
|
| |
* doc/lispref/text.texi (Database): Document how to insert binary
data.
* src/sqlite.c (bind_values): Bind BLOB columns correctly (bug#54591).
|
|
|
|
|
|
|
| |
Problem reported by Keith David Bershatsky in:
https://lists.gnu.org/r/emacs-devel/2022-04/msg00923.html
* src/sqlite.c (Fsqlite_open): Don’t assume SQLITE_OPEN_MEMORY
is defined.
|
| |
|
| |
|
|
|
|
|
| |
* src/sqlite.c (Fsqlite_load_extension): Only allow extensions
from an allowlist.
|
| |
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* 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 (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.
|
|
|
|
|
|
|
|
|
|
| |
* 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'.
|
|
|
|
|
| |
* src/sqlite.c (Fsqlite_select): Fix a typo in arguments to
make_sqlite.
|
|
|
|
| |
* src/sqlite.c (Fsqlite_finalize): Mark the object as dead.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* src/sqlite.c (Fsqlite_load_extension, Fsqlite_more_p): Fix typos
in doc strings.
|
|
* 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.
|