dbsrgits / sql-translator

SQL::Translator (SQLFairy)
http://sqlfairy.sourceforge.net/
82 stars 91 forks source link

Improve SQLite grammar for check constraints #173

Open kiwiroy opened 4 months ago

kiwiroy commented 4 months ago

Improve the SQLite grammar and support for check constraints.

This PR updates the grammar to parse check constraints with function calls, such as, check(json_valid(vet_visits) and json_type(vet_visits) = 'array').

Additionally, the expression and fields properties on the constraint object are set, whether the constraint is specified as part of a column definition, or separately within the table definition.