aboutsummaryrefslogtreecommitdiffstats
path: root/Plugins/SqlEnterpriseFormatter/formatdetach.cpp
blob: e788da7d9164603b0e1381ab23c260c1857525b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "formatdetach.h"
#include "parser/ast/sqlitedetach.h"
#include "parser/ast/sqliteexpr.h"

FormatDetach::FormatDetach(SqliteDetach* detach) :
    detach(detach)
{
}

void FormatDetach::formatInternal()
{
    withKeyword("DETACH");

    if (detach->databaseKw)
        withKeyword("DATABASE");

    withStatement(detach->name).withSemicolon();
}