From 81a21e6ce040e7740de86340c8ea4dba30e69bc3 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Thu, 16 Jan 2025 01:57:37 -0500 Subject: New upstream version 3.4.13+dfsg. --- Plugins/SqlEnterpriseFormatter/formatcreatetable.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'Plugins/SqlEnterpriseFormatter') 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 clause has already been output break; } } -- cgit v1.2.3