1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00
Commit graph

34 commits

Author SHA1 Message Date
J. King
e8be7d0f38 Address our own deprecations in PHP 8.4 2024-12-15 16:31:57 -05:00
J. King
1b80ad37bc Merge branch 'csfixer3'
Code style cleanup to mostly conform to PSR-12
2023-03-22 23:33:05 -04:00
J. King
d1da6fbe5e Use cases rather than casting bools to int in SQL 2022-05-30 17:29:34 -04:00
J. King
e65069885b Clean up obsolete FIXMEs 2022-04-25 18:30:13 -04:00
J. King
e6505a5fda Work around possible MySQL bug 2022-04-25 09:56:13 -04:00
J. King
b5579d6e43 Support PHP 8.1 2022-01-11 17:54:02 -05:00
J. King
fc2abc1203 Use D modifier for all patterns with $ anchors 2021-06-24 11:58:50 -04:00
J. King
4080b2d09d Apply new rules 2021-04-14 11:17:01 -04:00
J. King
5cfa01f4d5 Work around MySQL stupidity 2021-03-02 11:04:21 -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
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
29667464a1 Remove unnecessary namespace imports 2019-09-05 10:03:32 -04:00
J. King
f7240301e4 Basic database maintenance
Closes #169
2019-07-26 09:37:51 -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
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
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
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
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
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