summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite/cursor.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-45512: Simplify manage isolation level (GH-29562)Dong-hee Na2021-11-171-3/+9
|
* bpo-45754: Use correct SQLite limit when checking statement length (GH-29489)Erlend Egeberg Aasland2021-11-101-2/+2
|
* bpo-42064: Convert `sqlite3` global state to module state (GH-29073)Erlend Egeberg Aasland2021-10-271-6/+5
|
* bpo-45041: Restore `sqlite3` executescript behaviour for `SELECT` queries ↵Erlend Egeberg Aasland2021-10-071-1/+1
| | | | | | | (GH-28509) * bpo-45041: Restore sqlite3 executescript behaviour for select queries * Add regression test
* bpo-44958: Revert GH-27844 (GH-28574)Erlend Egeberg Aasland2021-09-261-19/+26
| | | | This reverts commit 050d1035957379d70e8601e6f5636637716a264b, but keeps the tests.
* bpo-44958: Only reset `sqlite3` statements when needed (GH-27844)Erlend Egeberg Aasland2021-09-211-26/+19
|
* bpo-45041: Simplify `sqlite3.Cursor.executescript()` (GH-28020)Erlend Egeberg Aasland2021-09-191-42/+25
|
* bpo-45040: Simplify sqlite3 transaction control functions (GH-28019)Erlend Egeberg Aasland2021-09-191-16/+7
|
* bpo-42064: Offset arguments for PyObject_Vectorcall in the _sqlite module ↵Petr Viktorin2021-08-311-2/+3
| | | | | | | (GH-27931) This allows e.g. methods to be called efficiently by providing space for a "self" argument; see PY_VECTORCALL_ARGUMENTS_OFFSET docs.
* bpo-44976: Lazy creation of sqlite3 result rows (GH-27884)Erlend Egeberg Aasland2021-08-251-55/+29
|
* bpo-44965: Early exit for non-DML statements in sqlite3.Cursor.executemany() ↵Erlend Egeberg Aasland2021-08-211-8/+7
| | | | (GH-27865)
* bpo-44859: Improve error handling in sqlite3 and and raise more accurate ↵Serhiy Storchaka2021-08-081-23/+14
| | | | | | | | | | | | | | | | | | | | exceptions. (GH-27654) * MemoryError is now raised instead of sqlite3.Warning when memory is not enough for encoding a statement to UTF-8 in Connection.__call__() and Cursor.execute(). * UnicodEncodeError is now raised instead of sqlite3.Warning when the statement contains surrogate characters in Connection.__call__() and Cursor.execute(). * TypeError is now raised instead of ValueError for non-string script argument in Cursor.executescript(). * ValueError is now raised for script containing the null character instead of truncating it in Cursor.executescript(). * Correctly handle exceptions raised when getting boolean value of the result of the progress handler. * Add many tests covering different corner cases. Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-42064: Optimise `sqlite3` state access, part 1 (GH-27273)Erlend Egeberg Aasland2021-07-291-22/+28
| | | | | | | | | | Prepare for module state: - Add "get state by defining class" and "get state by module def" stubs - Add AC defining class when needed - Add state pointer to connection context - Pass state as argument to utility functions Automerge-Triggered-By: GH:encukou
* bpo-42064: Finalise establishing sqlite3 global state (GH-27155)Erlend Egeberg Aasland2021-07-201-2/+4
| | | | | | With this, all sqlite3 static globals have been moved to the global state. There are a couple of global static strings left, but there should be no need for adding them to the state. https://bugs.python.org/issue42064
* Fix docstring typo in ↵Erlend Egeberg Aasland2021-07-141-2/+2
| | | | | | | | sqlite3.Connection.executescript/sqlite3.Cursor.executescript (GH-27147) Both `executescript` methods contain the same docstring typo: _"Executes a multiple SQL statements at once."_ => _"Executes multiple SQL statements at once."_ Automerge-Triggered-By: GH:pablogsal
* bpo-42064: Move `sqlite3` exceptions to global state, part 2 of 2 (GH-26884)Erlend Egeberg Aasland2021-07-141-9/+21
| | | Automerge-Triggered-By: GH:encukou
* bpo-42064: Move `sqlite3` exceptions to global state, part 1 of 2 (GH-26745)Erlend Egeberg Aasland2021-06-231-2/+4
| | | Also adds a test to verify the (borrowed) exceptions in `sqlite3.Connection`.
* bpo-43908: Make heap types converted during 3.10 alpha immutable (GH-26351)Erlend Egeberg Aasland2021-06-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make functools types immutable * Multibyte codec types are now immutable * pyexpat.xmlparser is now immutable * array.arrayiterator is now immutable * _thread types are now immutable * _csv types are now immutable * _queue.SimpleQueue is now immutable * mmap.mmap is now immutable * unicodedata.UCD is now immutable * sqlite3 types are now immutable * _lsprof.Profiler is now immutable * _overlapped.Overlapped is now immutable * _operator types are now immutable * winapi__overlapped.Overlapped is now immutable * _lzma types are now immutable * _bz2 types are now immutable * _dbm.dbm and _gdbm.gdbm are now immutable
* bpo-42064: Move sqlite3 types to global state (GH-26537)Erlend Egeberg Aasland2021-06-151-8/+11
| | | | | | | | | * Move connection type to global state * Move cursor type to global state * Move prepare protocol type to global state * Move row type to global state * Move statement type to global state * ADD_TYPE takes a pointer * pysqlite_get_state is now static inline
* bpo-44315: Remove unused connection argument from pysqlite_step() (GH-26535)Erlend Egeberg Aasland2021-06-041-3/+3
|
* bpo-44042: Optimize sqlite3 begin transaction (GH-25908)Erlend Egeberg Aasland2021-06-031-8/+38
|
* bpo-42862: Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module ↵Erlend Egeberg Aasland2021-06-031-13/+10
| | | | | (GH-24203) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-44165: Optimise sqlite3 statement preparation by passing string size ↵Erlend Egeberg Aasland2021-06-021-4/+16
| | | | (GH-26206)
* bpo-42972: Track sqlite3 statement objects (GH-26475)Erlend Egeberg Aasland2021-06-011-7/+2
| | | | | | | | | | | Allocate and track statement objects in pysqlite_statement_create. By allocating and tracking creation of statement object in pysqlite_statement_create(), the caller does not need to worry about GC syncronization, and eliminates the possibility of getting a badly created object. All related fault handling is moved to pysqlite_statement_create(). Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-42972: Fix sqlite3 traverse/clear functions (GH-26452)Erlend Egeberg Aasland2021-05-311-14/+15
|
* bpo-42972: Fully implement GC protocol for sqlite3 heap types (GH-26104)Erlend Egeberg Aasland2021-05-251-13/+33
|
* bpo-44047: Remove unused argument to _pysqlite_seterror (GH-25915)Erlend Egeberg Aasland2021-05-071-5/+5
|
* bpo-43852: Improve tuple creation in sqlite3 (GH-25421)Erlend Egeberg Aasland2021-04-231-16/+9
|
* bpo-43752: Fix sqlite3 regression for zero-sized blobs with converters ↵Erlend Egeberg Aasland2021-04-141-11/+14
| | | | (GH-25228)
* bpo-43369: sqlite3_column_{text,blob} failures now raise MemoryError (GH-24723)Erlend Egeberg Aasland2021-03-041-10/+23
|
* bpo-43368: Fix fetching empty bytes in sqlite3 (GH-24706)Mariusz Felisiak2021-03-031-6/+2
| | | Regression introduced in 47feb1feb28631b6647699b7633109aa85340966.
* bpo-39523: Use do-while loop pysqlite_cursor_executescript() (GH-18305)Alex Henrie2021-03-021-3/+2
|
* bpo-43251: sqlite3_column_name() failures now raise MemoryError (GH-24609)Erlend Egeberg Aasland2021-02-281-24/+29
|
* bpo-43269: Remove redundant extern keywords (GH-24605)Erlend Egeberg Aasland2021-02-211-1/+2
|
* bpo-43269: Clean up sqlite3 file scope (GH-24578)Erlend Egeberg Aasland2021-02-211-3/+2
|
* bpo-43249: Improve scoping in _pysqlite_fetch_one_row() (GH-24565)Erlend Egeberg Aasland2021-02-181-10/+9
|
* bpo-43249: sqlite3_column_bytes() must follow sqlite_column_blob() (GH-24562)Erlend Egeberg Aasland2021-02-181-4/+14
|
* bpo-43083: Fix error handling in _sqlite3 (GH-24395)Serhiy Storchaka2021-01-311-6/+14
|
* bpo-40956: Fix sqlite3.Cursor.fetchmany() default value (GH-24214)Erlend Egeberg Aasland2021-01-131-2/+3
|
* bpo-40956: Convert _sqlite3.Cursor to Argument Clinic (GH-24007)Erlend Egeberg Aasland2021-01-051-61/+137
|
* bpo-1635741: sqlite3 uses Py_NewRef/Py_XNewRef (GH-23170)Erlend Egeberg Aasland2020-12-271-18/+12
|
* bpo-40956: Convert _sqlite3.Connection to Argument Clinic, part 2 (GH-23838)Erlend Egeberg Aasland2020-12-271-1/+2
|
* bpo-41861: Convert _sqlite3 CursorType and ConnectionType to heap types ↵Erlend Egeberg Aasland2020-10-011-45/+31
| | | | (GH-22478)
* bpo-41861: Convert _sqlite3 RowType and StatementType to heap types (GH-22444)Erlend Egeberg Aasland2020-10-011-1/+1
|
* bpo-39652: Truncate the column name after '[' only if PARSE_COLNAMES is set. ↵Serhiy Storchaka2020-03-211-7/+22
| | | | (GH-18942)
* bpo-39245: Switch to public API for Vectorcall (GH-18460)Petr Viktorin2020-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The bulk of this patch was generated automatically with: for name in \ PyObject_Vectorcall \ Py_TPFLAGS_HAVE_VECTORCALL \ PyObject_VectorcallMethod \ PyVectorcall_Function \ PyObject_CallOneArg \ PyObject_CallMethodNoArgs \ PyObject_CallMethodOneArg \ ; do echo $name git grep -lwz _$name | xargs -0 sed -i "s/\b_$name\b/$name/g" done old=_PyObject_FastCallDict new=PyObject_VectorcallDict git grep -lwz $old | xargs -0 sed -i "s/\b$old\b/$new/g" and then cleaned up: - Revert changes to in docs & news - Revert changes to backcompat defines in headers - Nudge misaligned comments
* bpo-39496: Remove redundant checks from _sqlite/cursor.c (GH-18270)Alex Henrie2020-02-011-20/+6
|
* bpo-39497: Remove unused variable from pysqlite_cursor_executescript (GH-18271)Alex Henrie2020-01-301-3/+0
|
* bpo-39494: Remove extra null terminators from kwlist vars (GH-18267)Alex Henrie2020-01-301-1/+1
|
* Replace _pysqlite_long_from_int64() with PyLong_FromLongLong() (GH-16882)Sergey Fedoseev2019-10-231-2/+2
|