J. King
206cca35a9
Test tweaks
6 years ago
J. King
5a133b795a
Correctly munge MySQL queries
6 years ago
J. King
b4de56a64e
Work around MySQL silliness with same-table foreign keys
6 years ago
J. King
f0d30c2eee
Make munging of queries a generic feature
6 years ago
J. King
24df564045
Mostly successful MySQL database function tests
Two failures remain, at least one requiring query munging.
6 years ago
J. King
de07352fd0
Syntactic adjustments for MySQL
- "key", "read", and "rename" are reserved words
- CTEs in INSERTs must precede SELECT
- Empty sets are represented only by explicit null
6 years ago
J. King
393b4e95ad
Adjustments for MySQL 8
The prototype had been tested against MariaDB
6 years ago
J. King
4ef36643a4
Proof-of-concept PDO MySQL driver
- Configuration options were added
- Non-transactional locking was added to the savepoint handlers
- Tests were adjusted for MySQL's reserved words
6 years ago
J. King
50f92625ef
Use PosgreSQL's existing general Unicode collation
All collations appear to be case-insensitive
6 years ago
J. King
2bebdd44cf
Implementation of native PostgreSQL interface
Changes to the Database class were required to avoid outputting booleans
6 years ago
J. King
161f5f08f6
Proactively support SQLite 3.25
6 years ago
J. King
28f803dd28
Handle PostgreSQL connection errors
6 years ago
J. King
0f48ce6f37
Use a Unicode collation for SQLite
6 years ago
J. King
35d46d2913
Use persistent connections with PostgreSQL
6 years ago
J. King
f6966659a9
Use smarter coverage executer; properly suppress stderr during CLI tests
6 years ago
J. King
d9629be662
Use smarter coverage executer; properly suppress stderr during CLI tests
6 years ago
J. King
0513b606c2
Merge master
6 years ago
J. King
089f666de6
Fix PDO insert ID errors in PHP 7.1
6 years ago
J. King
cf896121b2
Style fixes
6 years ago
J. King
51755a2ce6
Retire article field groups
6 years ago
J. King
15301cd7dc
Fix cleanup tests in PostgreSQL
6 years ago
J. King
258be1d54e
Fix most PostgreSQL test failures
Reasons for failures included an unhandled error code, erroneous sorting
assumptions, and a broken computation of the next insert ID in tests
Five failures remain.
6 years ago
J. King
8fc31cfc40
Rewrite various queries to work in PostgreSQL
This involved changes to the driver interface as well as the database
schemata. The most significantly altered queries were for article
selection and marking, which relied upon unusual features of SQLite.
Overall query efficiency should not be adversely affected (it may have
even imprved) in the common case, while very rare cases (not presently
triggered by any REST handlers) require more queries.
One notable benefit of these changes is that functions which query
articles can now have complete control over which columns are returned.
This has not, however, been implemented yet: symbolic column groups are
still used for now.
Note that PostgreSQL still fails many tests, but the test suite runs to
completion. Note also that one line of the Database class is not
covered; later changes will eventually make it easier to cover the line
in question.
6 years ago
J. King
5c5a5a4886
Appease PostgreSQL's max() aggregate
6 years ago
J. King
527ecee393
Code coverage fixes
6 years ago
J. King
4a1c23ba45
Munge PostgreSQL queries instead of adding explicit casts
PDO does not adequately inform PostgreSQL of a parameter's type, so type
casts are required. Rather than adding these to each query manually, the
queries are instead processed to add type hints automatically.
Unfortunately the queries are processed rather naively; question-mark
characters in string constants, identifiers, regex patterns, or geometry
operators will break things spectacularly.
6 years ago
J. King
4c8d8f1a52
Provide PostgreSQL with an empty-set query for IN() clauses
Also satisfy PostgreSQL with some explicit casts
6 years ago
J. King
dd4f22e04e
Avoid use of reserved SQL word "user"
6 years ago
J. King
8dfedd30ef
Test PostgreSQL schema upgrade
This was in fact buggy due to the schema version check causing an error
6 years ago
J. King
93af381436
Test setting of schema name
6 years ago
J. King
1414f8979c
Fix savepoint handling and locking in PostgreSQL driver
6 years ago
J. King
736a8c9d0c
Improved timeout handling for both SQlite and PostgreSQL
6 years ago
J. King
c0c4810662
Nominally complete PostgreSQL driver
Connection error handling as well as uprade error handling still need
to be implemented.
6 years ago
J. King
84b4cb7465
Enable PostgreSQL statement testing
Tests involving binary data are skipped for now
6 years ago
J. King
d52af6db5a
PostgreSQL fixes
Errors were not correctly throwing exceptions
For the sake of SQLite compatibility booleans should be bound as
integers in PDO
6 years ago
J. King
e2b6cb8360
Remove PicoFeed-related FIXMEs
PicoFeed will never be fixed, so they are not helpful
6 years ago
J. King
b5733b070c
Clean up statement tests
PostgreSQL tests are suppressed for now, but most pass.
6 years ago
J. King
e30d82fbaa
Correct signature
6 years ago
J. King
edfae438fa
Refine pg connection strings
6 years ago
J. King
796315c00c
Basic stub of PDO-base PostgreSQL driver
6 years ago
J. King
c63d24e125
Version bump
6 years ago
J. King
471dad0645
Fix PDO driver initialization
6 years ago
J. King
3b3b810f10
Replicate some unspecified NCNv1 behaviour, and document the rest
See #139 for list
Closes #139
Closes #140
Closes #141
6 years ago
J. King
1dcbb56077
Changelog and documentation updates
6 years ago
J. King
39134f5f7e
Rest of CLI tests
6 years ago
J. King
efac62f0e4
Add missing return type hints where possible
6 years ago
J. King
9e6f0460c2
Ensure the Lang class always exists when throwing exceptions
6 years ago
J. King
ba8e208d79
Partial CLI tests
6 years ago
J. King
1a8acdf03f
Fix early exceptions
6 years ago
J. King
9428d7468a
Add more user management functionality to the CLI
6 years ago