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

296 commits

Author SHA1 Message Date
J. King
8ae3740d5f Implement querying articles by hidden mark 2020-12-15 19:28:51 -05:00
J. King
d5cd5b6a17 Implement hidden marks
Tests are still needed
2020-12-15 13:20:03 -05:00
J. King
ebdfad535c More Miniflux user tests
Also added user lookup functionality
2020-12-10 20:08:00 -05:00
J. King
5c83655541 Add modification timestamp to user metadata 2020-12-08 16:10:23 -05:00
J. King
2eedf7d38c Finally fix MySQL 2020-12-07 09:52:42 -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
fcf1260dab Adjust database portion of user property manager 2020-12-05 22:13:48 -05:00
J. King
978929aabd WIP redesign of user properties 2020-12-05 11:01:44 -05:00
J. King
06dee77bac First tests for Miniflux 2020-11-23 09:31:50 -05:00
J. King
f6cd2b87ce Port token data from Microsub branch 2020-11-18 11:25:28 -05:00
J. King
e16df90bae Style fixes 2020-11-16 10:26:14 -05:00
J. King
180b4ecc9b More user tests 2020-11-16 10:24:06 -05:00
J. King
7f2117adaa Differentiate between duplicate/missing users and other failure modes 2020-11-15 16:24:26 -05:00
J. King
4baf5fa2f9 Tests for new user functionality in Database 2020-11-13 19:30:23 -05:00
J. King
771f79323c Strip out remnants of the authorizer 2020-11-09 16:51:30 -05:00
J. King
532ce4a502 Prototype changes to user management
The driver itself has not been expnaded; more is probably required to ensure
metadata is kept in sync and users created when the internal database does
not list a user an external database claims to have
2020-11-09 13:43:07 -05:00
J. King
b62c11a43e Lasts tests for icon cache; fixes #177 2020-11-07 08:11:06 -05:00
J. King
311910795a More tests for icon cache 2020-11-06 17:06:01 -05:00
J. King
3d3c20de5c Don't anticipate API features 2020-11-06 15:57:27 -05:00
J. King
424b14d2b4 Clean up use of subscriptionFavicon 2020-11-06 10:27:30 -05:00
J. King
dd1a80f279 Consolidate subscription icon querying
Users and tests still need adjusting
2020-11-05 18:32:11 -05:00
J. King
4fc208d940 More consistent icon API 2020-11-05 16:51:46 -05:00
J. King
c3a57ca68b Tests for icon cache population 2020-11-05 14:19:17 -05:00
J. King
7c40c81fb3 Add icons to the database upon feed update 2020-11-05 08:13:15 -05:00
J. King
c25782f98c Partial icon handling skeleton 2020-11-04 20:00:00 -05:00
J. King
2438f35f3d Add icon cache to database
Feed updating has not yet been adapted to store
icon data (nor their URLs anymore)
2020-11-04 18:34:22 -05:00
J. King
16d2e01668 New schema for PostgreSQL and MySQL 2020-10-30 19:00:11 -04:00
J. King
4db1b95cf4 Add numeric IDs and other Miniflux data to SQLite schema 2020-10-30 15:25:22 -04:00
J. King
b58a326461 Prepare for schema changes 2020-10-29 11:58:45 -04:00
J. King
afbf3be031 Use 'union all' instead of 'union' in queries 2020-09-22 11:34:52 -04:00
J. King
0f3ada598e Work around Picofeed bug
A fix is pending merging upstream
2020-09-09 14:52:35 -04: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
b5f118e8cb Cleanup 2020-01-20 13:52:48 -05:00
J. King
bbace7a0ac Use void and nullable return types where practical 2020-01-20 13:34:03 -05:00
J. King
737dd9f6b8 Fix foreign keys in MySQL 2019-12-01 15:00:28 -05:00
J. King
3ef1177f06 Remove driver lists 2019-10-18 13:20:28 -04:00
J. King
3da884dfbc Don't embed ito SQL strings with question marks
Fixes #175
2019-09-12 09:53:43 -04:00
J. King
be5ad50f54 Tests for text search clause generator 2019-09-12 09:41:01 -04:00
J. King
fb6e2babb9 Change some conditions to asserts 2019-09-12 08:32:40 -04:00
J. King
3439895779 Normalize URLs before establishing feed uniqueness 2019-09-03 19:04:23 -04:00
J. King
cfef75ccba Don't update the feed URL when fetching
This can result in some unpredictable constraint violations
2019-08-06 09:58:30 -04:00
J. King
db5bcb78a3 Fix lookup of evergreen tokens 2019-07-26 20:06:47 -04:00
J. King
f7240301e4 Basic database maintenance
Closes #169
2019-07-26 09:37:51 -04:00
J. King
422eaf9605 Invalidate sessions on password change; closes #170 2019-07-25 22:34:58 -04:00
J. King
2aa16f3405 Merge branch 'fever' into opml 2019-07-24 14:04:04 -04:00
J. King
6ef13d0880 Style fixes 2019-05-01 22:52:20 -04:00
J. King
3899ee6b4e Allow for replacing label and tag associations
This supplements adding and removing
2019-04-27 18:32:15 -04:00
J. King
2af223753d Function to add a feed without a subscription 2019-04-21 14:07:36 -04:00
J. King
ceecd58393 OPML parsing comments and minr fixes 2019-04-21 13:10:47 -04:00
J. King
e3d2215920 Style fixes 2019-04-05 11:03:15 -04:00
J. King
12f23ddc16 Updated tests for arbitrary sorting 2019-04-04 17:21:23 -04:00
J. King
f72c85c9f6 Hopefully working but maybe broken custom sorting 2019-04-04 11:22:50 -04:00
J. King
4b133bddd6 Prototype arbitrary result ordering 2019-04-03 15:02:59 -04:00
J. King
74fc39fca0 Implement multi-folder context option 2019-04-02 22:44:09 -04:00
J. King
cce1089e10 Handle edge case with folder 0
Folder 0 (the root folder) is a valid, though nonsensical selection:
using it as a positive option is the same as not using the option at
all, and using it as a negative option necessarily yields an empty set.

However, it can in some contexts be validly specified, and so it should
be handled consistently. It had not been previously, but is now.
2019-04-02 19:58:35 -04:00
J. King
98f6fca7e3 Enforce minimum array size (for now) 2019-04-02 18:37:46 -04:00
J. King
ef1b761f95 Implement most multiple-item context options
Selecting multiple folder trees will require further effort
2019-04-02 18:24:20 -04:00
J. King
d8407330a0 Add a function to get when feeds were last updated
This is an optimization for Fever, which returns this information with
every API call.
2019-03-26 16:51:44 -04:00
J. King
acb3973149 Prototype implementation of Fever groups and feeds 2019-03-26 08:53:26 -04:00
J. King
e45ba3f0ea Add means of unsetting a password in the backend 2019-03-24 14:42:23 -04:00
J. King
b02c910b1e Make token creation check that the user exists 2019-03-10 15:54:43 -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
5de1844f6d Add article selection by tag 2019-03-07 11:07:22 -05:00
J. King
e6f70527cf Simplify tag summary 2019-03-07 08:20:09 -05:00
J. King
ff0c9a3a55 Add functionality for interacting with subscription tags 2019-03-06 22:15:41 -05:00
J. King
4945f8baa3 Clarify various SQL queries 2019-03-05 19:22:01 -05:00
J. King
fb1bdbfb37 Database schema for subscription tags 2019-03-03 12:10:18 -05:00
J. King
44366f48bf Remove arbitrary search term limits; fixes #150 2019-03-02 13:53:43 -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
95de375e0b Handle folder and label exclusion
Consequently the way label data are retrieved was completely overhauled
2019-02-27 10:48:11 -05:00
J. King
677e33e518 Add text search exclusions 2019-02-26 11:39:19 -05:00
J. King
0dc82f64d5 Allow ranges in exclusion contexts 2019-02-26 11:11:42 -05:00
J. King
b950ac066f Restrict options in not-context and hopefully make it easier to use 2019-02-25 22:41:12 -05:00
J. King
14c02d56ac Implement new context options other than not().
Context handling has also been re-organized to simplify later
implementation of the not() option
2019-02-25 16:26:38 -05:00
J. King
2df7c25b66 Add ability to search note text 2019-02-23 20:14:52 -05:00
J. King
bc3182a961 Basic substring searching 2019-02-22 18:50:39 -05:00
J. King
17f3a2f059 Start on an API overview for the Database class 2019-02-13 12:37:41 -05:00
J. King
49cefaf5c8 Complete API documentation for the Database class 2019-02-04 13:05:48 -05:00
J. King
d3a385beef Partial API documentation for the Database class 2019-02-03 12:25:07 -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
81acba90dc Use strict equality when comparing strings 2019-01-11 10:38:06 -05:00
J. King
b4de56a64e Work around MySQL silliness with same-table foreign keys 2018-12-21 17:02:34 -05:00
J. King
f0d30c2eee Make munging of queries a generic feature 2018-12-21 12:35:10 -05:00
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
2018-12-20 21:23:06 -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
J. King
cf896121b2 Style fixes 2018-12-05 17:28:11 -05:00
J. King
51755a2ce6 Retire article field groups 2018-12-05 16:55:14 -05:00
J. King
15301cd7dc Fix cleanup tests in PostgreSQL 2018-12-05 11:05:01 -05:00
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.
2018-12-05 09:05:43 -05:00
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.
2018-12-04 20:41:21 -05:00
J. King
5c5a5a4886 Appease PostgreSQL's max() aggregate 2018-11-29 14:36:34 -05:00
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.
2018-11-29 13:45:37 -05:00
J. King
4c8d8f1a52 Provide PostgreSQL with an empty-set query for IN() clauses
Also satisfy PostgreSQL with some explicit casts
2018-11-28 17:18:33 -05:00
J. King
dd4f22e04e Avoid use of reserved SQL word "user" 2018-11-28 14:21:36 -05:00
J. King
931fe3b585 Move password generation to the User class
This allows user drivers which wish to generate their own passwords to
do so, and those which do not to defer to the built-in generator
2018-11-02 11:52:55 -04:00
J. King
11747c93fd Strip out unused user management functionality
Tests have been removed as well; new tests are forthcoming
2018-10-28 10:59:17 -04:00
J. King
f64f0c6a22 Whitespace cleanup 2018-10-26 14:58:04 -04:00