Currently, we allow the structure column of the column table to have multiple constraints, and currently the prototype code grabs all of them simply by splitting on spaces. This was never meant as a permanent solution to the problem and so far it has been fine for the simple conditions we've had to deal with like unique, primary, and tree(child), which we can rely on to not have any spaces. Since constraints like under(table.column, value) have multiple arguments, and since presumably we don't want to force the end user to omit a space between arguments, we need to handle things more intelligently.
The best solution is to implement a simple grammar for this. For python, we can use the lark library.
Currently, we allow the
structure
column of thecolumn
table to have multiple constraints, and currently the prototype code grabs all of them simply by splitting on spaces. This was never meant as a permanent solution to the problem and so far it has been fine for the simple conditions we've had to deal with likeunique
,primary
, andtree(child)
, which we can rely on to not have any spaces. Since constraints likeunder(table.column, value)
have multiple arguments, and since presumably we don't want to force the end user to omit a space between arguments, we need to handle things more intelligently.The best solution is to implement a simple grammar for this. For python, we can use the lark library.