number range match.

This commit is contained in:
Bryce Covert
2020-03-21 12:33:28 -07:00
parent f0ac926700
commit c6d09a07e9
3 changed files with 31 additions and 0 deletions

View File

@@ -59,6 +59,18 @@
(merge-query {:query {:in ['?vendor-id]
:where ['[?e :transaction/vendor ?vendor-id]]}
:args [(:vendor-id args)]})
(:amount-gte args)
(merge-query {:query {:in ['?amount-gte]
:where ['[?e :transaction/amount ?a]
'[(>= ?a ?amount-gte)]]}
:args [(:amount-gte args)]})
(:amount-lte args)
(merge-query {:query {:in ['?amount-lte]
:where ['[?e :transaction/amount ?a]
'[(<= ?a ?amount-lte)]]}
:args [(:amount-lte args)]})
(:start (:date-range args))
(merge-query {:query {:in ['?start-date]
:where ['[?e :transaction/date ?date]

View File

@@ -399,6 +399,8 @@
:vendor_id {:type :id}
:bank_account_id {:type :id}
:date_range {:type :date_range}
:amount_lte {:type :money}
:amount_gte {:type :money}
:start {:type 'Int}
:sort_by {:type 'String}
:asc {:type 'Boolean}