summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/sqlite_driver.c
Commit message (Collapse)AuthorAgeFilesLines
* Use standard PDO way for fetching integer attribute valuesGeorge Peter Banyard2021-03-171-2/+9
|
* Allow specifying sqlite3 DSN (file:/) in PDO SQLitetzmfreedom2021-01-251-0/+9
| | | | Closes GH-6610.
* Refactor PDO's last inserted ID handler to use and return zend_stringGeorge Peter Banyard2021-01-191-5/+2
| | | | Closes GH-6617
* Refactor PDO doer handler to use zend_stringGeorge Peter Banyard2021-01-191-2/+2
|
* Make convert_to_*_ex simple aliases of convert_to_*Nikita Popov2021-01-141-1/+1
| | | | | | | | | | | | | Historically, the _ex variants separated the zval first, if a conversion was necessary. This distinction no longer makes sense since PHP 7. The only difference that was still left is that _ex checked whether the type is the same first, but the usage of these macros did not actually distinguish on whether such an inlined check is valuable or not in a given context. Also drop the unused convert_to_explicit_type macros.
* Refactor PDO's quoter handler to return a zend_stringGeorge Peter Banyard2021-01-071-5/+7
| | | | Closes GH-6547
* Voidify PDO's fetch_error handlerGeorge Peter Banyard2021-01-061-3/+1
|
* Boolify PDO's preparer handlerGeorge Peter Banyard2021-01-061-4/+4
|
* Voidify PDO's closer handlerGeorge Peter Banyard2021-01-061-2/+1
|
* Boolify PDO's quoter handlerGeorge Peter Banyard2021-01-061-2/+2
|
* Boolify PDO's set_attribute driver functionGeorge Peter Banyard2021-01-061-4/+4
|
* Boolify PDO's transaction handlersGeorge Peter Banyard2021-01-061-10/+10
| | | | This includes begin(), commit(), rollBack(), and inTransaction()
* PDO: Store/pass query_string as zend_stringNikita Popov2020-12-141-2/+2
| | | | | Rather than storing char* + size_t, use a zend_string*. Also avoid various copies of the query string.
* Add GC support for PDO driver dataNikita Popov2020-10-121-1/+21
| | | | | | | | | Add a get_gc method that can be implemented by drivers, which can be used to add additional zvals to the GC buffer. Implement GC support for PDO SQLite callbacks in particular. Closes GH-6262.
* Fix #80027 Terrible performance using $query->fetch on queries with many ↵Matteo Beccati2020-08-311-0/+3
| | | | | | | | | | bind parameters Added new flags that allow skipping param_evt(s) that are not used by drivers, in a backwards and forward compatible manner. Updated the pgsql, mysql, sqlite and oci drivers to properly use the new flags. I've left out pdo_dblib, which doesn't have a param_hook, and pdo_firebird, which seems to be using PARAM_EVT_NORMALIZE in a wrong context (param type vs event type).
* Merge branch 'PHP-7.4'Nikita Popov2020-08-111-2/+1
|\ | | | | | | | | * PHP-7.4: Fix #64705 errorInfo property of PDOException is null when PDO::__construct() fails
| * Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-08-111-2/+1
| |\ | | | | | | | | | | | | * PHP-7.3: Fix #64705 errorInfo property of PDOException is null when PDO::__construct() fails
| | * Fix #64705 errorInfo property of PDOException is null when ↵Ahmed Abdou2020-08-111-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | PDO::__construct() fails PDO driver constructors are throwing PdoException without setting errorInfo, so create a new reusable function that throws exceptions for PDO and will also set the errorInfo. Use this function in pdo_mysql, pdo_sqlite, and pdo_pgsql.
* | | Add stubs for PDO SQLite extension methodsNikita Popov2020-07-211-11/+5
| | | | | | | | | | | | Putting these under a dummy PDO_SQLite_Ext class.
* | | Use ZPP callable for PDO SqliteGeorge Peter Banyard2020-07-211-42/+17
| | |
* | | Make error messages more consistent by fixing capitalizationMáté Kocsis2020-01-171-4/+4
| | | | | | | | | | | | Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
* | | Remove most uses of ZEND_PARSE_PARAMETERS_END_EX()Nikita Popov2019-10-071-3/+3
| | | | | | | | | | | | | | | As ZPP now throws, it makes no sense to specify an explicit return value.
* | | Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-251-2/+0
|/ / | | | | | | Closes GH-4732.
* | Implement SQLite extended result code functionalityRobert Kopack2019-07-021-0/+3
| |
* | Don't use sqlite3_aggregate_count()Nikita Popov2019-06-121-17/+20
| | | | | | | | | | | | This function has been deprecated, with the recommendation that the count should be explicitly tracked in the aggregate context, if it is needed.
* | Allow exceptions in __toString()Nikita Popov2019-06-051-1/+4
| | | | | | | | | | | | | | | | | | | | RFC: https://wiki.php.net/rfc/tostring_exceptions And convert some object to string conversion related recoverable fatal errors into Error exceptions. Improve exception safety of internal code performing string conversions.
* | Remove local variablesPeter Kokot2019-02-031-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
* | Remove yearly range from copyright noticeZeev Suraski2019-01-301-1/+1
| |
* | Fix illogical strncpy sizeChristoph M. Becker2018-12-011-7/+7
| | | | | | | | | | | | | | | | While both source and destination buffers have the same size (6 bytes), and this is unlikely to change in the future, we nonetheless fix the illogical `strncpy` size. Based on a pull request provided by Cristian Rodríguez.
* | Use ZEND_THIS macro to hide implementation details in extensions code.Dmitry Stogov2018-11-151-3/+3
| |
* | Replace getThis() by EX(This), when additional check is not necessary.Dmitry Stogov2018-11-141-3/+3
| |
* | Require SQLite ≥ 3.5.0 for ext/sqlite3 and ext/pdo_sqliteChristoph M. Becker2018-10-131-4/+0
|/ | | | | | | | | It is possible to pass flags when opening an SQLite database. For Sqlite < 3.5.0 these are ignored, since `sqlite3_open` doesn't support flags. Neither a warning or notice is raised in this case, nor is this behavior documented in the PHP manual. Instead of fixing it either way, we lift the requirement to SQLite 3.5.0 (released on 2007-09-04) instead of the former SQLite 3.3.9 (released on 2007-01-04).
* Remove unused Git attributes identPeter Kokot2018-07-251-2/+0
| | | | | | | | | | | | | | | The $Id$ keywords were used in Subversion where they can be substituted with filename, last revision number change, last changed date, and last user who changed it. In Git this functionality is different and can be done with Git attribute ident. These need to be defined manually for each file in the .gitattributes file and are afterwards replaced with 40-character hexadecimal blob object name which is based only on the particular file contents. This patch simplifies handling of $Id$ keywords by removing them since they are not used anymore.
* Use zend_string_release_ex() instread of zend_string_release() in places, ↵Dmitry Stogov2018-05-281-4/+4
| | | | where we sure about string persistence.
* year++Xinchen Hui2018-01-021-1/+1
|
* Move constants into read-only data segmentDmitry Stogov2017-12-141-2/+2
|
* Encapsulate reference-counting primitives.Dmitry Stogov2017-10-271-1/+1
| | | | | | Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead. Added mactros to validate reference-counting (disabled for now). These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
* Add support for SQLite open flagsBohwaZ2017-09-061-1/+8
|
* fix build with old system libsqlite (sqlite3_close_v2 may be missing)Remi Collet2017-08-021-0/+4
|
* Only compute callback name in error casesNikita Popov2017-06-251-11/+9
| | | | | Mostly the callback name is only used to report an error. Try to avoid calculating it if no error occurred.
* Avoid useless dereferences and separations during paramter passing.Dmitry Stogov2017-06-191-4/+4
|
* Merge branch 'PHP-7.1'Nikita Popov2017-03-121-3/+5
|\
| * Implement FR #74217: deterministic sqlite functionsandrewnester2017-03-121-4/+5
| |
| * Update copyright headers to 2017Sammy Kaye Powers2017-01-041-1/+1
| |
* | Switch to the v2 version of these functions.Rasmus Lerdorf2017-01-221-2/+2
| | | | | | | | | | The sqlite3 docs suggest always using prepare_v2 and the close_v2 could potentially help with an fd leak we have been seeing
* | Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
| |
* | Use new param API in pdo_sqliteSara Golemon2016-12-311-12/+17
|/
* Fixed compilation warningsDmitry Stogov2016-06-221-1/+2
|
* Removed "zend_fcall_info.function_table". It was assigned in many places, ↵Dmitry Stogov2016-04-271-2/+0
| | | | but is never used.
* Removed zend_fcall_info.symbol_tableDmitry Stogov2016-03-021-2/+0
|