Created IndexModel for displaying the indexes on a table. Constraints can now show the SQL to drop and create them.
The keyword list is now directly based of the official keyword list from postgresql.
This commit is contained in:
parent
b436814eb5
commit
97d4e2a1a4
24 changed files with 754 additions and 228 deletions
|
|
@ -105,6 +105,30 @@ void operator<<(ForeignKeyAction &s, const Pgsql::Value &v)
|
|||
}
|
||||
}
|
||||
|
||||
QString ForeignKeyActionToString(ForeignKeyAction fka)
|
||||
{
|
||||
QString result;
|
||||
switch (fka) {
|
||||
case ForeignKeyAction::NoAction:
|
||||
result = "NO ACTION";
|
||||
break;
|
||||
case ForeignKeyAction::Restrict:
|
||||
result = "RESTRICT";
|
||||
break;
|
||||
case ForeignKeyAction::Cascade:
|
||||
result = "CASCADE";
|
||||
break;
|
||||
case ForeignKeyAction::SetNull:
|
||||
result = "SET NULL";
|
||||
break;
|
||||
case ForeignKeyAction::SetDefault:
|
||||
result = "SET DEFAULT";
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void operator<<(ForeignKeyMatch &s, const Pgsql::Value &v)
|
||||
{
|
||||
const char *c = v.c_str();
|
||||
|
|
@ -121,6 +145,22 @@ void operator<<(ForeignKeyMatch &s, const Pgsql::Value &v)
|
|||
}
|
||||
}
|
||||
|
||||
QString ForeignKeyMatchToString(ForeignKeyMatch fkm)
|
||||
{
|
||||
QString result;
|
||||
switch (fkm) {
|
||||
case ForeignKeyMatch::Full :
|
||||
result = "FULL";
|
||||
break;
|
||||
case ForeignKeyMatch::Partial:
|
||||
result = "PARTIAL";
|
||||
break;
|
||||
case ForeignKeyMatch::Simple:
|
||||
result = "SIMPLE";
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
PgConstraint::PgConstraint()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue