jwadhams / json-logic-js

Build complex rules, serialize them as JSON, and execute them in JavaScript
MIT License
1.26k stars 140 forks source link

Example on how to persist in a relational database #129

Closed ekeuus closed 1 year ago

ekeuus commented 1 year ago

Hi all,

We are very interested in using this for one of our projects to store our complex and nested conditions.

I was just wondering if anyone had some ideas on what schema has worked for existing projects. I am between a JSON column and somehow trying to normalise the nested AST with parent_id references.

Thanks!

ekeuus commented 1 year ago

We decided to just store the JSON string.

"We won't get any consistency checks like this but it should be fine for now." - famous last words.