Sqlite: Add check constraint

Change-Id: Ib4b909da40c7fe07dcb6a07c4650a720313391c2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2020-05-14 12:13:51 +02:00
parent 9936b92de3
commit 4b7aeae749
6 changed files with 204 additions and 171 deletions

View File

@@ -154,6 +154,13 @@ public:
void operator()(const NotNull &) { columnDefinitionString.append(" NOT NULL"); }
void operator()(const Check &check)
{
columnDefinitionString.append(" CHECK (");
columnDefinitionString.append(check.expression);
columnDefinitionString.append(")");
}
void operator()(const DefaultValue &defaultValue)
{
columnDefinitionString.append(" DEFAULT ");