aboutsummaryrefslogtreecommitdiffstats
path: root/Plugins/SqlEnterpriseFormatter
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2025-01-16 01:57:37 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2025-01-16 01:57:37 -0500
commit81a21e6ce040e7740de86340c8ea4dba30e69bc3 (patch)
tree95fc1741b907d5ba6d029a42d80092cb7c056c5e /Plugins/SqlEnterpriseFormatter
parent3565aad630864ecdbe53fdaa501ea708555b3c7c (diff)
New upstream version 3.4.13+dfsg.upstream/3.4.13+dfsgupstream
Diffstat (limited to 'Plugins/SqlEnterpriseFormatter')
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatcreatetable.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/Plugins/SqlEnterpriseFormatter/formatcreatetable.cpp b/Plugins/SqlEnterpriseFormatter/formatcreatetable.cpp
index 28020af..1fefbdd 100644
--- a/Plugins/SqlEnterpriseFormatter/formatcreatetable.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatcreatetable.cpp
@@ -199,8 +199,26 @@ void FormatCreateTableColumnConstraint::formatInternal()
break;
}
case SqliteCreateTable::Column::Constraint::NULL_:
- case SqliteCreateTable::Column::Constraint::NAME_ONLY:
+ {
+ // Is the default and unofficial. Pass through
+ withKeyword("NULL");
+ break;
+ }
case SqliteCreateTable::Column::Constraint::DEFERRABLE_ONLY:
+ {
+ // Pass through
+ if (constr->deferrable == SqliteDeferrable::NOT_DEFERRABLE)
+ withKeyword("NOT");
+ withKeyword("DEFERRABLE");
+ if (constr->initially != SqliteInitially::null)
+ {
+ withKeyword("INITIALLY");
+ withKeyword(constr->initially == SqliteInitially::DEFERRED ? "DEFERRED" : "IMMEDIATE");
+ }
+ break;
+ }
+ case SqliteCreateTable::Column::Constraint::NAME_ONLY:
+ // The CONSTRAINT <name> clause has already been output
break;
}
}