Commit Graph

19 Commits

Author SHA1 Message Date
cdd1649450 New SQLite function to decode struct JSON 2024-01-18 11:10:19 +01:00
5e29103a15 🤖 Automatic code style fixes 2023-12-11 15:31:16 +00:00
7234bfb14e 🤖 Automatic code style fixes 2023-09-13 09:45:56 +00:00
17a3a57826 Manual code style adjustments 2022-01-13 15:52:53 +01:00
0549dcc5bc PHP code sniffer autofixes 2022-01-13 14:50:12 +01:00
565b4cc172 Add wrapper function for json_decode() 2020-04-16 12:49:17 +02:00
fbbae12a9b Lookup types use a composite id
JSON encoded pid and rid, together with lastst = 1, offer a unique identifier for fetching all types of referenced data
2020-04-14 17:52:53 +02:00
d6d97f6064 Automatic coding style fixes 2020-04-14 14:22:27 +02:00
7f803aa873 Fix data access for lookup types 2020-04-07 20:56:49 +02:00
6781c68df4 change prefix from Abstract to Auto 2019-06-06 11:52:11 +02:00
2096ed951c Prefix Summary type with "Abstract" to hide it in Schema Editor.
Fixes #451
2019-05-30 12:15:43 +02:00
88b58a212b This commit adds '%lastsummary%' special column for page schemas. The column contains the summary of last page revision. 2018-03-30 11:01:43 +02:00
10b11cc50b special columns for lookup select fields
I'm not quite sure if it's more feature or bugfix but i think that special columns of struct schemas should also be available for struct lookup field.
2018-01-11 15:36:47 +01:00
7717c082e7 Add compareValue() abstract base type & lookup
This fixes a bug, that caused the $STRUCT.table.field$ filter syntax to
be broken for lookup fields.  Struct was comparing the row-id of the
argument-column to the raw value of the referenced column at the
filtered lookup.

There were multiple options to fix this bug:
1. Add a new function to the AbstractBaseType() that return raw value by
default (this is the approach implemented by this commit)
2. Add a function to the lookup type only and use introspection to call
it if it exists.
3. Do not compare the values in the referenced columns, but compare only
the row-ids

The problem with approach 3: It is not possible to compare such
lookup-column to any other column except lookups and this is not what we
want.
Approaches 1 and 2 have different trade-offs on where additional
code/complexity is created. I decided for approach 1 because it is the
cleaner overall approach and we might want to use this functionality for future
types as well.

SPR-875
2017-03-14 13:11:33 +01:00
af993d55de fix: stop OR filters causing problems
The filters coming from syntax should be grouped together in a subgroup
to that OR-filters cannot undo the filters on latest=1 etc.

Since we cannot know in the filter function whether there is already a
subgroup for us to use or which to use, the solution was to give the
correct subgroup to the filter function directly.

Instead of adding another parameter to the already long list of
parameters for that function, I have chosen to give the
QueryBuilderWhere a reference back to the original QueryBuilder.
2017-01-03 15:30:46 +01:00
d329f04c26 another fix for multi value dropdowns
This had been only partly fixed in a3f28bd574
2016-11-17 16:12:09 +01:00
dd6f0fd73d slight refactoring in Lookup
this makes it easier to reuse this type later on
2016-11-16 15:35:49 +01:00
f256f53fb1 don't use static but class member 2016-10-11 12:05:13 +02:00
9b8dc0b257 Lookup Dropdowns are now handled separately
Dropdowns are now back to being simple value pickers. To select data
from a different Schema the Lookup type was introduced. This makes the
code a bit simpler.

Users who used the Dropdown type to reference schemas will need to
reconfigure their schema to make use of the Lookup type instead.

The Lookup type now handles self references (fixes #171) and references
to page schemas correctly.
2016-10-11 11:24:00 +02:00