aboutsummaryrefslogtreecommitdiffstats
path: root/Plugins/SqlEnterpriseFormatter/formatcreatetrigger.h
blob: 108a31e2b9767f47eaf0303651582ffba15d84a5 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef FORMATCREATETRIGGER_H
#define FORMATCREATETRIGGER_H

#include "formatstatement.h"
#include "parser/ast/sqlitecreatetrigger.h"
#include "common/global.h"

class FormatCreateTrigger : public FormatStatement
{
    public:
        FormatCreateTrigger(SqliteCreateTrigger* createTrig);

    protected:
        void formatInternal();

    private:
        SqliteCreateTrigger* createTrig = nullptr;

        static_char* TRIGGER_MARK = "TRIGGER";
};

class FormatCreateTriggerEvent : public FormatStatement
{
    public:
        FormatCreateTriggerEvent(SqliteCreateTrigger::Event* ev);
        void setLineUpKeyword(const QString& lineUpKw);

    protected:
        void formatInternal();

    private:
        SqliteCreateTrigger::Event* ev = nullptr;
        QString lineUpKw;

        static_char* TRIGGER_MARK = "TRIGGER";
};

#endif // FORMATCREATETRIGGER_H