oracle / quicksql

A library for generating DDL SQL and entity-relationship-diagrams from Quick SQL code
Universal Permissive License v1.0
53 stars 11 forks source link

Add support for check constraints other than "value in list" #37

Closed dmcghan closed 8 months ago

dmcghan commented 11 months ago

QSQL currently supports check constraints at the column level, but only for "value in list" types of constraints. There are lots of other types of constraints we might want to model in QSQL. For example, you might want to ensure values in a number column are higher or lower than a fixed value. Or you might want to ensure text going into a text column is a certain case.

Such constraints would require QSQL to allow the developer to provide an expression and (potentially) a name for the constraint.

vadim-tropashko commented 8 months ago

implemented in 1.2.1, see https://github.com/oracle/quicksql/blob/main/test/constraints.qsql