blob: ee30aa9fdedf68011716463add0fe6d058426a09 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "formatpragma.h"
#include "parser/ast/sqlitepragma.h"
FormatPragma::FormatPragma(SqlitePragma* pragma) :
pragma(pragma)
{
}
void FormatPragma::formatInternal()
{
handleExplainQuery(pragma);
withKeyword("PRAGMA");
if (!pragma->database.isNull())
withId(pragma->database).withIdDot();
withId(pragma->pragmaName);
if (pragma->equalsOp)
withOperator("=").withLiteral(pragma->value);
else if (pragma->parenthesis)
withParExprLeft().withLiteral(pragma->value).withParExprRight();
withSemicolon();
}
|