We are trying to use hylang as DSL for some financial business flow. We were trying to use business rules as JSON, but switched to DSL using hy language. Now we need to persist s-expression items into postgreSQL as like previous JSON-B items. Is there a standard way to do this or we have to use text fields instead?
Previous:
"conditions": {
"all": [
{
"name": "order_create_date",
"value": 1620675000,
"operator": "greater_than_or_equal_to"
},
{
"name": "order_create_date",
"value": 1624217400,
"operator": "less_than_or_equal_to"
}
}
Current:
(defn check_condition [params] (
and (> params.order_create_date "2021/06/22") (< params.order_create_date "2021/07/22"))
)