J. King
f37e6659c8
Merge branch 'master' of https://code.jkingweb.ca/jking/arsse
8 years ago
J. King
6bb129db2f
Mock correct method of Lang
8 years ago
Dustin Wilson
85800b111e
New UA string
• Now Arsse exposes itself properly
• Conf->userAgentString exists to allow for specifying the string
through configuration
8 years ago
J. King
f902346b6c
Eliminated passing of RuntimeData instances
- RuntimeData has now been replaced by a single static Data class
- The Data class has a load() method which fills the same role as the constructor of RuntimeData
- The static Lang class is now an instantiable class and is a member of Data
- All tests have been adjusted and pass
- The Exception tests no longer require convoluted workarounds: a simple mock for Data::$l suffices; Lang tests also use a mock to prevent loops now instead of using a workaround
8 years ago
J. King
2b8aa75ee3
Row index is not a string
8 years ago
Dustin Wilson
7236020b8b
Changed "NewsSync" to "Arsse"
8 years ago
J. King
9d5dab249c
Helper methods for testing Database class
May not actually work yet
8 years ago
J. King
b8f9b6070e
Experimental method to remove a folder
8 years ago
Dustin Wilson
ce0584e7f8
Added Feed Updating
• Started implementing feed updating (Database->updateFeeds())
• Moved hashing to the Feed object, now done when parsing
• Moved adding of articles to the database to its own method
(Database->articleAdd())
8 years ago
J. King
8c76c22d74
Implement retrieving folder list in Database
8 years ago
J. King
254ffe7b48
Don't enforce 100-character limit on folder names
8 years ago
J. King
8b50297e6d
Complete tests for NCN version list
- Fixes #47
- Implemented an AbstractHandler class with a generic URL parser
8 years ago
J. King
25d9158171
Fix output of NCN version list
List is supposed to be contained in a JSON object, not a bare list
8 years ago
J. King
536fa5c4fd
Implement NextCloud News version detection
- Improves #47
- Still needs wrapping to actually output to clients
8 years ago
J. King
20abd277eb
Don't muck with test file for now
8 years ago
J. King
9a8def03c2
Fill in more of the REST handler.
Not yet functional.
8 years ago
Dustin Wilson
3f61921b97
Added picoFeed wrapper
• Implemented a simple wrapper for picoFeed which fixes the id problems
and keeps error handling within its own class
• Updated Database.php to use the new class
• Replaced mentions of ownCloud with NextCloud in the schema
• Added hashes to schema for identification and change detection;
removed NextCloud hash and fingerprint; removed enclosure and category
hashes
8 years ago
J. King
b821d728e4
Add rest dependency; fix SQLite function def
8 years ago
J. King
6413d3a489
Re-order SQLite3 driver initialization
Should handle error reporting better
8 years ago
Dustin Wilson
bb8af5a62c
Added Custom Functions into Db/SQLite3/Driver
• Created Db/SQLite3/CustomFunctions to house the dateFormat custom
function and potentially others in the future.
• Fixed a typo in Db/SQLite3/Driver
8 years ago
J. King
8c268581fb
Properly handle adding a folder
Also added test file for now
8 years ago
J. King
18c8076a0f
Database update tests
8 years ago
J. King
6c16ba133c
More database driver tests
8 years ago
J. King
689c1c77d0
Test for advisory locking
8 years ago
J. King
f0663e99c3
Add tests for transactions and savepoints
Existing code had subtle bugs; using increment and decrement operators actually makes things easier to understand (for once)
8 years ago
J. King
485400df2b
Rename Result->get() to Result->getRow
It should be slightly clearer what it does
8 years ago
J. King
bdf3182305
Add result->lastId method; cleanup
- Result->lastId() added as MySQL and PostgreSQL have equivalent functionality
- Adjusted tests accordingly
- Cleaned up Database class to make use of this and getAll()
8 years ago
J. King
68f18e463c
Use WITHOUT ROWID tables when useful
Slight optimization for SQLite for the 'settings' and 'users' tables
8 years ago
J. King
f0adf08b1e
Add tests for type mismatches
8 years ago
J. King
95ee51563d
First battery of SQLite driver tests
8 years ago
J. King
7f7d0cd1e7
All test for constraint violation exception
8 years ago
J. King
5ba38fc7aa
Print ID in exception message
8 years ago
J. King
a3e2da1d36
Flesh out most database exceptions
- Fixes #46
- Some exception messages are tentative pending testing
8 years ago
J. King
7c1df71acd
Make db throw specific exceptions
Needs testing and fleshing out; not all exception codes and messages have been defined
8 years ago
J. King
755c976aa4
Remove extraneous files
8 years ago
J. King
fa247b34f6
Reduce the number of database exception types
8 years ago
J. King
7687109132
Reorganize Db namespace; alter User ns to match
8 years ago
J. King
37dad63dee
Impelemented Result->getAll()
- Fixes #45
- Renamed getSingle to getValue to avoid possible confusion
- Added test to ensure getValue() always returns the first datum of each row rather than going column-to-column
8 years ago
J. King
1dab15c20e
Fix SQLite3 driver name
8 years ago
J. King
eeb1818bb5
Still more database changes
- Restructured tests
- Localized driver name for SQLite driver (fixes #37 )
- Ensured that binding type definitions are required
8 years ago
J. King
2b7a236147
More database fixes
Now able to add feeds to the database
8 years ago
J. King
007e3747ef
Various database fixes
Authentication appears to be broken with a real database
8 years ago
J. King
0c410fcf50
More binding tests and related changes
- Introduced abstract Statement class to hold common methods
- Common methods currently consist of a date formatter and type caster
- Moved binding tests to a trait for reuse with future drivers
8 years ago
J. King
1529fc367a
Partial proper tests for parameter bindings
Null and (>0) integer tested so far
Many related changes to accomodate the necessary type juggling (required for databases other than SQLite).
8 years ago
J. King
337b2cf90c
Remove last vestiges of PDO accomodation
8 years ago
J. King
f19f683e38
Make it possible to redefine Statement type binds
8 years ago
J. King
b4d178c33f
Remove most PDO stuff
PDO will not be supported: the feature-set is less than any of the common native APIs, so why bother?
8 years ago
J. King
176247894d
Tests for Db\ResultSQLite3
8 years ago
J. King
34c69fbf92
Be explicit about the loaded locale
8 years ago
J. King
104f646973
Code comments
8 years ago