This repository was archived by the owner on Jun 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
AST-based SQLite driver #1
Merged
Merged
Changes from all commits
Commits
Show all changes
125 commits
Select commit
Hold shift + click to select a range
aac00ce
Split, cleanup, and reorganize the SQLite driver prototype
JanJakes 44641e1
Namespace-prefix the WIP SQLite driver for now to avoid naming conflicts
JanJakes be35587
Copy WP_SQLite_Translator_Tests and run them against the SQLite driver
JanJakes c8ea855
Copy the core of WP_SQLite_Translator to WP_SQLite_Driver
JanJakes 62943d6
Add a base generic WP_Parser_Token class, add docs
JanJakes 3449b0b
Complete WP_Parser_Node helper methods, add tests
JanJakes 65afd67
Add basic support for SELECT statements, add unit tests
JanJakes 00ec46d
Add basic support for INSERT, UPDATE, REPLACE, DELETE
JanJakes b8b4500
Add basic support for CREATE TABLE, implement data types
JanJakes 6be220d
Handle system variables
JanJakes 70744b7
Add support for UPDATE with ORDER BY and LIMIT
JanJakes 797c3b7
Handle specifics of the CREATE TABLE statement
JanJakes 647eaae
Add basic ALTER TABLE support
JanJakes c515605
Fix MySQL syntax errors in tests
JanJakes 1e5c311
Introduce information schema builder & create information schema tables
JanJakes b617ef9
Record CREATE TABLE table info in information schema
JanJakes dbd50e6
Record CREATE TABLE column info in information schema
JanJakes 6bdb7aa
Record CREATE TABLE constraint info in information schema
JanJakes afeeb18
Record CREATE TABLE inline constraint info in information schema
JanJakes 2eaf077
Sync constraint info to columns table when constraints are modified
JanJakes d03892d
Record ALTER TABLE ADD COLUMN(s) in information schema
JanJakes 93f536e
Record ALTER TABLE ADD CONSTRAINT in information schema
JanJakes 6940a5b
Record ALTER TABLE CHANGE/MODIFY COLUMN in information schema
JanJakes 127efc2
Record ALTER TABLE DROP COLUMN in information schema
JanJakes 71265ed
Record ALTER TABLE DROP INDEX in information schema
JanJakes 71e8d08
Execute CREATE TABLE using information schema
JanJakes 4b4fb8f
Execute ALTER TABLE using information schema
JanJakes a0a67c0
Implement SHOW CREATE TABLE using information schema
JanJakes 837655c
Implement SHOW INDEX using information schema
JanJakes f11fb09
Implement SHOW GRANTS
JanJakes cf6008d
Implement DESCRIBE using information schema
JanJakes f5a52ca
Ignore index hints
JanJakes 174916a
Add support for LIKE BINARY
JanJakes 335388b
Add support for REGEXP functions
JanJakes 191864c
Merge branch 'develop' into ast-sqlite-driver
adamziel 86a577c
Add support for LEFT function
JanJakes 0b3ba08
Add support for DATE_ADD and DATE_SUB functions
JanJakes aa9ad47
Add support for DATE_FORMAT()
JanJakes f1c89ec
Implement SQL_CALC_FOUND_ROWS and FOUND_ROWS()
JanJakes d356021
Implement FROM DUAL
JanJakes 8432d2a
Implement "CAST(... AS BINARY)"
JanJakes ab1e94f
Add support for CURRENT_TIMESTAMP() and NOW()
JanJakes 6f2ffb0
Translate datetime literals, fix string literal processing
JanJakes 6933c72
Add support for HAVING without GROUP BY
JanJakes 32c72bf
Implement DROP for multiple and temporary tables
JanJakes 822464a
Implement ON DUPLICATE KEY UPDATE
JanJakes 94fa134
Implement INSERT IGNORE and UPDATE IGNORE
JanJakes f8af977
Implement DROP TABLE in information schema
JanJakes 28bb50d
Implement SHOW TABLE STATUS
JanJakes 13cd58f
Implement SHOW TABLES
JanJakes eecc39b
Fix saving and displaying index info
JanJakes b8fc7d8
Implement ON UPDATE CURRENT_TIMESTAMP
JanJakes ff8afed
Prefix index names in SQLite to prevent conflicts
JanJakes b227db5
Add support for multi-table delete statements
JanJakes 9939dc3
Remove no longer relevant TODOs
JanJakes 32a3a94
Remove no longer used data types cache
JanJakes 3dfc043
Remove destructor
JanJakes 7501c36
Remove unused variable
JanJakes 7d87421
Remove unused property
JanJakes bb49c90
Simplify setting foreign keys pragma
JanJakes 09edeaa
Use AST to detect transactional statements
JanJakes 86f3b7f
Convert IFs to switch statement
JanJakes 49c9794
Remove outdated comment, add TODO
JanJakes b0a4520
Improve comment
JanJakes e2453b7
Use get_child_node() calls to make translation unambiguous
JanJakes d556c09
Add a TODO comment for AST-querying API
JanJakes 9c1feea
Handle foreign key checks in ALTER TABLE
JanJakes 57287db
Improve query method docs and naming
JanJakes fa903bc
Fix identifier escaping
JanJakes 38d3491
Throw exceptions for unsupported throw statements
JanJakes 76285ea
Unify identifier quoting
JanJakes 3530023
Improve API of user defined functions
JanJakes 677bca4
Add a TODO for SQLite client info
JanJakes 53eb81e
Use a unified prefix for internal objects
JanJakes fd6c2fa
Fetch column info only for needed columns when adding a constraint
JanJakes 5b95d96
Preserve ROWIDs in ALTER TABLE statements
JanJakes e14660e
Fix and improve translation tests
JanJakes 3cfaf92
Use correct string literal quotes
JanJakes b8b0bef
Use table schema value in all information schema queries
JanJakes d805979
Remove prototype classes
JanJakes b6d900b
Remove WIP namespacing (the new classes don't conflict with the exist…
JanJakes 232b1c1
Enable usage of PDO in phpcs
JanJakes c564fc9
Add a feature flag to use the new driver
JanJakes c7e121f
Use strict SQLite tables to validate data types
JanJakes 7d471e1
Store last insert ID
JanJakes 9297782
Translate CONCAT function to concat pipes
JanJakes 417d37f
Correctly translate REPLACE statements
JanJakes 10dcfc1
Add basic SHOW VARIABLES support
JanJakes 8a08243
Add support for IF NOT EXISTS when creating a table
JanJakes 56dfd83
Improve string literal translation
JanJakes 5db45db
Fix backslash escaping in a test
JanJakes 39b1aba
Fix identifier translation, use backtics due to issues with double qu…
JanJakes 118c57a
Do not execute statements when there are no IDs to delete
JanJakes b78d0ad
Add basic support for CHAR_LENGTH
JanJakes 3cbb647
Handle null characters in strings
JanJakes 50d0bd2
Fix column default value handling
JanJakes bbe6470
Display info when the AST driver is used
JanJakes 069f1ef
Add a test for the reason to use backtick identifier escaping
JanJakes 487bf54
Use PDO to load SQLite version, improve docs
JanJakes c63607e
Remove all remaining usages of SQLite 3
JanJakes 39ac173
Declare PDO and PDO SQLite requirements in composer.json
JanJakes d2be9d8
Use getters instead of public properties
JanJakes 8b74f33
Fix query dumping script
JanJakes 625ca4a
Simplify SQLite lock wait logic
JanJakes d19c9aa
Remove legacy hooks
JanJakes 67c1fff
Closely mirror wpdb::query() and wpdb::_do_query()
JanJakes 0f8dc09
Simplify driver state
JanJakes 59c4451
Remove uselsess return values
JanJakes a83a5f8
Change FIX comments to CHANGED
JanJakes f7c99c1
Improve parser node method naming
JanJakes 8b27c85
Fix FROM/IN handling for SHOW statements
JanJakes c27b571
Add tests for UNION and UNION ALL
JanJakes 0f7060f
Configure the SQLite driver using an $options array
JanJakes e961bf5
Use custom exception class for driver errors
JanJakes fda096c
Ignore transaction rollback errors when an exception occurs
JanJakes e4df6b9
Return true for transactional commands
JanJakes 96e0208
Move database directory creation outside of the driver, revamp it
JanJakes cb4d6a3
Extract debug mode setting to an option
JanJakes 54c27a2
Improve driver docs and property naming
JanJakes beaa51d
Revamp error handling, extract error notice creation out from the driver
JanJakes 09fbcd9
Improve docs and naming
JanJakes 4d9d432
Check for mimimum SQLite version
JanJakes 078e2ce
Remove the AST driver files from .gitattributes
JanJakes 6947019
Improve constant name
JanJakes 9c0c9b5
Use past tense in @CHANGED comments
JanJakes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.