mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 18:38:26 +00:00
Use a better representation for macros
This commit is contained in:
@ -145,7 +145,9 @@ object ItemQueryGenerator {
|
||||
}
|
||||
|
||||
case Expr.CustomFieldMatch(field, op, value) =>
|
||||
tables.item.id.in(itemsWithCustomField(_.name ==== field)(coll, makeOp(op), value))
|
||||
tables.item.id.in(
|
||||
itemsWithCustomField(_.name ==== field)(coll, makeOp(op), value)
|
||||
)
|
||||
|
||||
case Expr.CustomFieldIdMatch(field, op, value) =>
|
||||
tables.item.id.in(itemsWithCustomField(_.id ==== field)(coll, makeOp(op), value))
|
||||
@ -153,6 +155,9 @@ object ItemQueryGenerator {
|
||||
case Expr.Fulltext(_) =>
|
||||
// not supported here
|
||||
Condition.unit
|
||||
|
||||
case _: Expr.MacroExpr =>
|
||||
Condition.unit
|
||||
}
|
||||
|
||||
private def dateToTimestamp(today: LocalDate)(date: Date): Timestamp =
|
||||
@ -233,7 +238,7 @@ object ItemQueryGenerator {
|
||||
}
|
||||
|
||||
private def itemsWithCustomField(
|
||||
sel: RCustomField.Table => Condition
|
||||
sel: RCustomField.Table => Condition
|
||||
)(coll: Ident, op: QOp, value: String): Select = {
|
||||
val cf = RCustomField.as("cf")
|
||||
val cfv = RCustomFieldValue.as("cfv")
|
||||
|
Reference in New Issue
Block a user