from mag_tools.model.base_enum import BaseEnum


class OperatorType(BaseEnum):
    CREATE_TABLE = ("CREATE TABLE", "创建表")
    DROP_TABLE = ('DROP TABLE IF EXISTS', "删除表")
    INSERT = ("INSERT INTO", "插入数据")
    DELETE = ("DELETE FROM", "删除数据")
    UPDATE = ("UPDATE", "更新数据")
    SELECT = ("SELECT", "查询数据")
    ALTER_TABLE = ("ALTER TABLE", "修改表")
    LOAD_DATA = ("LOAD DATA", "加载数据")
    VALUES = ("VALUES", "值")
    FROM = ("FROM", "从")
    SET = ("SET", "设置")
    ADD = ("ADD", "添加")
    DROP_COLUMN = ("DROP COLUMN", "删除列")
    WHERE = ("WHERE", "条件")
    NOT_IN = ("NOT IN", "不在")
    IN = ("IN", "在")
    DISTINCT = ("SELECT DISTINCT", "选择不同")
    GROUP_BY = ("GROUP BY", "分组")
    GROUP = ("GROUP", "分组")
    ORDER_BY = ("ORDER BY", "排序")
    ORDER = ("ORDER", "排序")
    HAVING = ("HAVING", "条件")
    AS = ("AS", "别名")
    AND = ("AND", "和")
    OR = ("OR", "或")
    DESC = ("DESC", "降序")
    LIMIT = ("LIMIT", "限制")
    FOR_UPDATE = ("FOR UPDATE", "更新")
    DUPLICATE_UPDATE = ("ON DUPLICATE KEY UPDATE", "重复键更新")
    NULL = ("NULL", "空")
    NOT_NULL = ("NOT NULL", "非空")
    DEFAULT = ("DEFAULT", "默认")
    COMMENT = ("COMMENT", "注释")
    PRIMARY_KEY = ("PRIMARY KEY", "主键")
    UNIQUE = ("UNIQUE", "唯一")
    ENGINE = ("ENGINE", "引擎")
    DEFAULT_CHARSET = ("DEFAULT CHARSET", "默认字符集")
    UNSIGNED = ("UNSIGNED", "无符号")
    ZEROFILL = ("ZEROFILL", "零填充")
    AUTO_INCREMENT = ("AUTO INCREMENT", "自动增长")
    LOCAL = ("LOCAL", "本地")
    INFILE = ("INFILE", "文件")
    REPLACE = ("REPLACE", "替换")
    IGNORE = ("IGNORE", "忽略")
    INTO_TABLE = ("INTO TABLE", "进入表")
    FIELDS_TERMINATED = ("FIELDS TERMINATED BY", "字段终止于")
    ENCLOSED = ("ENCLOSED BY", "包围")
    LINES_TERMINATED = ("LINES TERMINATED BY", "行终止于")
    LINES = ("LINES", "行")
