50 Commits

Author SHA1 Message Date
ba7f5789bb No direct search execution 2024-02-06 10:03:36 +01:00
67f70d54d9 Revert "Lazy search execution"
This reverts commit 95a8e37d98.
2024-01-18 16:14:43 +01:00
95a8e37d98 Lazy search execution
Move search out of aggregation constructors. It should only be executed
before actual rendering, not e.g. on metadata run
2024-01-18 16:10:44 +01:00
150f5bc933 Adjust tests for named parameters in SQL 2023-11-14 14:21:37 +01:00
fdf371159b refactoring dynamic parameter handling, part 4
This finally adjusts the tests. It also adds getLimit and getOffset in
the search class.
2023-07-18 11:52:26 +02:00
1057ed145e dynamic parameter handling refactoring, part 2
This introduces a addDynamicFilter() method. We need to handle fixed and
dynamic filters separately for proper parentheises. The latter is not
implemented yet and will follow next.

Tests still broken
2023-07-17 12:23:55 +02:00
f1812f0b7a added filter for AggregationFilter::getAllColumnValues()
Also renames Filter to AggregationFilter
2023-07-12 13:01:27 +02:00
4183cc11b9 adjust method call for getting PDO access 2023-06-14 15:17:43 +02:00
79b29326ae Use new \dokuwiki\plugin\sqlite\SQLiteDB class for DB access 2023-05-24 16:38:34 +02:00
8fed17f342 clean up for the tests
This mostly corrects file and class names for PSR-2. Function names have
not been adjusted yet
2023-04-05 11:09:51 +02:00
00624072b8 Replace boolean with integer in queries
Better sqlite compatibility
2022-09-28 12:18:21 +02:00
bb8d98c4da Dummy IS_PUBLISHER check with test 2022-08-08 15:29:49 +02:00
0549dcc5bc PHP code sniffer autofixes 2022-01-13 14:50:12 +01:00
7b5b21b7f0 Test deleting all values when a multi field is updated inline
This test has a very limited scope: only the save method, and it will catch
very few errors in the inline editor. For that,
\action_plugin_struct_inline must be refactored into more manageable
public methods.
2020-07-20 17:20:35 +02:00
308cc83fd5 refactoring names
To avoid confusion with the Lookup type, the three different ways of
accessing a schema have now the following names:

* page data - for revisioned struct data attached to a page
* serial data - for an unrevisioned list of struct data attached to a
                page
* global data - for an unrevisioned list of struct data not attached to
                any page (formaly known as lookup schema)

The editor mechanism used for serial and global data is now called
AggregationEditor

Some reference to lookup schemas is still in the bureaucracy support
part.
2020-05-14 13:05:03 +02:00
4cd5cc28e2 Introduce new factory methods for data access and deprecate old ones 2020-05-11 13:04:27 +02:00
5b808f9f3f Remove islookup property of schemas
CSV import must still be adjusted
2020-04-29 17:03:02 +02:00
18343cd887 Test schema assignments in aggregations 2020-04-22 17:19:25 +02:00
22589dd342 Add test for serial data 2020-04-19 20:50:51 +02:00
1e11f3d953 Consistent data type check in mock AccessTable
The check was not updated after the mocked class was changed to handle data types instead of schema types
2020-04-17 21:18:26 +02:00
8b04ed8174 Adjust page data access in tests
Fetching current revision by passing timestamp = 0 no longer works, use time() instead
2020-04-06 20:36:17 +02:00
1057556627 Some fixme cleanups 2020-03-23 21:16:27 +01:00
0ceefd5c55 Start unifying schema types
Schemas per se are type agnostic, isLookup property is removed. Data is stored and accessed differently based on how it is entered and retrieved.

The crucial change is introduction of the composite key of pid and rid. Previous page data utilizes rid = 0 to differentiate itself. Other types, notably lookup, have autoincrementing rid.

Database migration is not implemented yet.
2020-03-18 19:42:48 +01:00
b6dc4fd903 🐛 Generators on PHP 5.6 cannot use "return" 2018-08-31 13:30:36 +02:00
17dbef8af8 (Import) Add option to create missing pages in csv page schema import
Styling of the checkbox is still a bit off.

WIKI-199
2018-08-31 13:20:41 +02:00
0c17c53a2f Remove duplicate code 🚮
The functions \action_plugin_struct_entry::createForm and
\action_plugin_struct_entry::makeField are duplicated in
\action_plugin_struct_edit
2017-06-14 10:22:36 +02:00
025cb9da42 made Assignments singleton. fixes #163 2016-11-02 14:52:44 +01:00
885bf69835 adjust tests 2016-10-11 12:05:45 +02:00
dd6a2b7167 Merge branch 'lookups' into validationrefactor
* lookups:
  test translation feature
  implement rendering via sub type in Dropdown
  fix displayValue for looked up type, more tests
  fixed constructor signature
  first test for new Dropdown features
  adjusted tests for renamed aliases
  Add Lookup Support to Dropdown
  column aliases need to differ from real column names
  use display value as default renderer
  introduces getDisplayValue
2016-08-24 10:17:34 +02:00
b6c8d1e9eb fixed last tests, removed old validator 2016-08-24 10:05:50 +02:00
6f023786c1 first test for new Dropdown features 2016-08-15 16:27:05 +02:00
daf34b9903 fixed tests 2016-08-09 13:12:43 +02:00
e336703dc2 renamed tests 2016-08-08 17:13:11 +02:00
94c9aa4c35 renamed SchemaData and SchemaLookupData
This is to reflect that they no longer inherit from Schema
2016-08-08 17:08:15 +02:00
ea9843dc73 fix all the tests for the recent change regarding SchemaData
I'm not to happy with the SchemaDataNoDB class and its use
SchemaDataSQL.test - it seems hacky, but works for now.
2016-08-08 16:53:32 +02:00
f411d87222 refactor SchemaData into AccessTable with factory
first part of the refactoring for the SchemaData and SchemaLookupData
classes. Both now inherit from AccessTable which provides common methods
and two factory methods to automatically create the correct class
depending on the schema.

Both classes no longer inherit from Schema. Instead they contain a
Schema as a member variable. This makes it possible to initialize them
with an existing schema (which is required for the factory methods).

The flow is now like this:

1: init a schema (read info from the database)
2: look at the schema to figure out if it's a lookup or not
3: initialize the right Data object with the schema
2016-08-08 16:49:26 +02:00
4bc2843f02 saving lookups works 2016-08-04 18:30:14 +02:00
40bdf4fd05 drop the compare() function in favor of filter() 2016-07-19 17:37:27 +02:00
0bb4c291cd Create explicit columns with types now needed 2016-07-19 17:07:41 +02:00
bd41b7a38f method signature adjustments in mock objects 2016-07-19 15:46:14 +02:00
2b5df26e5a fix and test placeholder replacement 2016-07-14 09:57:35 +02:00
8c551fd793 test that left joins are positioned correctly 2016-07-13 17:53:49 +02:00
ba76620163 Use DokuWiki new autoloader for class files
No longer do we need to register our own autoloader. Namespace had to be
vendor prefixed.
2016-04-28 15:40:12 +02:00
16b7d914c0 adjust cachung if an aggregation depends on dynamic values #75 2016-03-22 13:48:30 +01:00
5625b9852e support for dynamic filter place holders #75
tests for struct stuff still missing
no cache handling, yet
2016-03-21 17:29:49 +01:00
806eec8297 allow validation to modify the value before saving 2016-03-16 11:19:25 +01:00
c8a548a86f moved validation to its own class
the validator class is partly test covered through the entry tests but
dedicated tests might be helpful
2016-03-14 12:33:31 +01:00
5bc0a238e8 Add/adjust tests for changed filter handling
See commit 9dbc32ae40
2016-03-10 13:01:44 +01:00
30bc056c30 added tests for testing translatio initialisation #35 2016-03-03 15:32:21 +01:00
25029fe81f moved mock objects to their own namespace #35
we may want to reuse them in different tests
2016-03-02 15:47:07 +01:00