mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 18:38:26 +00:00
Refactoring parser
- put all used strings in one place to have it easier to track - don't use `$` for shortcuts, it's a detail not interesting to a user; now names must not clash (which is a good idea anyways) - Added two more shortcuts `conc` and `corr`
This commit is contained in:
@ -35,7 +35,8 @@ object ItemQueryGeneratorTest extends SimpleTestSuite {
|
||||
val cond = ItemQueryGenerator(now, tables, Ident.unsafe("coll"))(q)
|
||||
val expect =
|
||||
tables.item.name.like("hello") &&
|
||||
tables.item.itemDate >= mkTimestamp(2020, 2, 1) &&
|
||||
coalesce(tables.item.itemDate.s, tables.item.created.s) >=
|
||||
mkTimestamp(2020, 2, 1) &&
|
||||
(tables.item.source.like("expense%") || tables.folder.name === "test")
|
||||
|
||||
assertEquals(cond, expect)
|
||||
|
Reference in New Issue
Block a user