J. King
f7b3a473a9
Clarify ordering syntax rationale
2021-02-03 14:20:34 -05:00
J. King
ed27e0aaaa
Sort nulls consistently
...
PostgreSQL normally sorts nulls after everything else in ascending order
and vice versa; we reverse this, to match SQLIte and MySQL
2021-02-02 10:00:08 -05:00
J. King
461e256052
Work around MySQL syntax weirdness
...
Also improve test for token translation to actually test that the
translated tokens are accepted by the database system
2021-01-07 10:12:38 -05:00
J. King
ce68566fcb
Hopefully fix MySQL
2020-12-06 20:27:20 -05:00
J. King
a431243421
Fixes for MySQL and PostgreSQL
2020-12-06 13:17:19 -05:00
J. King
e16df90bae
Style fixes
2020-11-16 10:26:14 -05:00
J. King
576d7e16a8
Fix handling of bytea-typed nulls
2020-11-09 16:49:42 -05:00
J. King
41bcffd6fb
Correctly query PostgreSQL byte arrays
...
This required different workarouynd for the native and PDO interfaces
2020-11-03 17:52:20 -05:00
J. King
c21ae3eca9
Correctly send binary data to PostgreSQL
...
This finally brings PostgreSQL to parity with SQLite and MySQL.
Two tests casting binary data to text were removed since behaviour here
should in fact be undefined
Accountinf for any encoding when retrieving data will be addressed by
a later commit
2020-11-02 15:21:04 -05:00
J. King
e60f7ea03f
Add class constant visibility
2020-03-01 18:32:01 -05:00
J. King
bc53a2d24a
Style fixes
2020-03-01 15:16:50 -05:00
J. King
bbace7a0ac
Use void and nullable return types where practical
2020-01-20 13:34:03 -05:00
J. King
15de8c2320
Fix PostgreSQL connection error message
2019-12-02 17:14:03 -05:00
J. King
c59cdfef76
Whitespace fixes
2019-10-25 15:16:35 -04:00
J. King
7ac4fb4715
Clarify PDO workaround for SQLite
2019-10-18 16:09:01 -04:00
J. King
c706a76057
Simplify array flattening
2019-10-18 13:10:03 -04:00
J. King
fb6e2babb9
Change some conditions to asserts
2019-09-12 08:32:40 -04:00
J. King
53aa7a4d0d
Style fixes
2019-09-05 10:21:36 -04:00
J. King
29667464a1
Remove unnecessary namespace imports
2019-09-05 10:03:32 -04:00
J. King
d6220c1bbb
Merge branch 'master' into manual
2019-07-26 11:27:14 -04:00
J. King
f7240301e4
Basic database maintenance
...
Closes #169
2019-07-26 09:37:51 -04:00
J. King
6ef13d0880
Style fixes
2019-05-01 22:52:20 -04:00
J. King
38bdde1167
Add access tokens to the db, with relevant code
...
Tokens are similar to sessions in that they stand in for users, but the
protocol handlers will manage them; Fever login hashes are the
originating use case for them. These must never expire, for example,
and we need to specify their values.
This commit also performs a bit of database clean-up
2019-03-09 16:23:56 -05:00
J. King
ff0c9a3a55
Add functionality for interacting with subscription tags
2019-03-06 22:15:41 -05:00
J. King
ed22090e49
Work around various SQLite-related problems
...
- WAL mode was not getting set properly
- Queries using the PDO driver could fail because PDO sucks
2019-03-04 11:05:46 -05:00
J. King
21fdd66d37
Work around limit to SQL parameter placeholders for IN() clauses
...
Improves #150
LIKE-based matches also need to be similarly conservative
2019-03-01 22:36:25 -05:00
J. King
6857e8ec1b
Merge branch 'search'
2019-03-01 12:26:08 -05:00
J. King
837f3c6dd6
Simplify SQL type handling
...
This is done in anticipation of dealing with SQL types in
places other than statements
2019-03-01 12:17:33 -05:00
J. King
570a9b171c
Revert fulltext detection in driver
2019-02-22 18:49:57 -05:00
J. King
ad8057a40b
Driver changes to support basic text searching
2019-02-22 11:13:13 -05:00
J. King
908e1fa310
API documentation for database driver interface
2019-02-21 15:43:19 -05:00
J. King
b55d0b374f
API documentation for database driver interface
2019-02-21 15:10:32 -05:00
J. King
f5c5d49d97
Document SQL timeout changes
2019-01-24 11:40:25 -05:00
J. King
500851f161
Style fixes
2019-01-23 16:34:54 -05:00
J. King
8ea1df920a
Unify SQL timeouts
...
- Exec and lock timeouts now apply to MySQL
- Lock timeout now applies to PostgreSQL
- SQLite now uses a generic lock timeout setting which applies to all
2019-01-23 16:31:54 -05:00
J. King
05aadfe7c7
Use correct SQLite chema change procedure; version bump
2019-01-21 10:40:39 -05:00
J. King
5cd84c4ab4
Validate configuration parameters on import, and other changes
...
- Each parameter is checked for type and normalized
- Interval strings are converted to DateInterval objects
- Timeouts can be specified as interval strings
- Most intervals can be null to signify infinity
- Driver classes are checked that they implement the correct interface
- Short driver names may be used, and are used by default
- Helpful errors messages are printed in case of erroneous configuration
Exporting is currently broken; this will be fixed in an upcoming commit
2019-01-20 22:40:49 -05:00
J. King
4670dfc849
Handle connection errors
2019-01-15 10:51:55 -05:00
J. King
e92bda5373
Various changes:
...
- Fix handling of binary data and long strings
- Simplify handling of socket connections
- Fix coverage
2019-01-15 08:58:11 -05:00
J. King
5d61ab0a57
Fixes for MySQL native interface
...
Three test failures remain, but these are minor and will be resolved
soon. Handling of binary data is also broken, but given that this works
fine with the PDO driver, there is presumably some correct method.
2019-01-13 23:17:19 -05:00
J. King
81acba90dc
Use strict equality when comparing strings
2019-01-11 10:38:06 -05:00
J. King
c4a41255b0
Experimental native MySQL driver
...
No testing has been performed yet, but changes are extensive enough to
warrant a commit. Of particular note:
- SQL states are enumerated in a separate trait to reduce duplication
- PDOStatement is now an abstract class to avoid duplication of
engine-specific error handling
- Error handling has been cleaned up somewhat
2019-01-10 19:01:32 -05:00
J. King
206cca35a9
Test tweaks
2018-12-21 17:51:49 -05:00
J. King
5a133b795a
Correctly munge MySQL queries
2018-12-21 17:37:22 -05:00
J. King
f0d30c2eee
Make munging of queries a generic feature
2018-12-21 12:35:10 -05:00
J. King
24df564045
Mostly successful MySQL database function tests
...
Two failures remain, at least one requiring query munging.
2018-12-21 10:14:26 -05:00
J. King
393b4e95ad
Adjustments for MySQL 8
...
The prototype had been tested against MariaDB
2018-12-20 20:50:56 -05:00
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
2018-12-20 18:06:28 -05:00
J. King
50f92625ef
Use PosgreSQL's existing general Unicode collation
...
All collations appear to be case-insensitive
2018-12-14 09:18:56 -05:00
J. King
2bebdd44cf
Implementation of native PostgreSQL interface
...
Changes to the Database class were required to avoid outputting booleans
2018-12-13 19:47:51 -05:00