from sqlalchemy.sql import compiler
from sqlalchemy.types import (BIGINT, BLOB, BOOLEAN, CHAR, DATE,
- FLOAT, INTEGER, NUMERIC, SMALLINT,
- TEXT, TIME, TIMESTAMP, VARCHAR)
-
-
-RESERVED_WORDS = set(
- ["action", "active", "add", "admin", "after", "all", "alter", "and", "any",
- "as", "asc", "ascending", "at", "auto", "autoddl", "avg", "based", "basename",
- "base_name", "before", "begin", "between", "bigint", "blob", "blobedit", "buffer",
- "by", "cache", "cascade", "case", "cast", "char", "character", "character_length",
- "char_length", "check", "check_point_len", "check_point_length", "close", "collate",
- "collation", "column", "commit", "committed", "compiletime", "computed", "conditional",
- "connect", "constraint", "containing", "continue", "count", "create", "cstring",
- "current", "current_connection", "current_date", "current_role", "current_time",
- "current_timestamp", "current_transaction", "current_user", "cursor", "database",
- "date", "day", "db_key", "debug", "dec", "decimal", "declare", "default", "delete",
- "desc", "descending", "describe", "descriptor", "disconnect", "display", "distinct",
- "do", "domain", "double", "drop", "echo", "edit", "else", "end", "entry_point",
- "escape", "event", "exception", "execute", "exists", "exit", "extern", "external",
- "extract", "fetch", "file", "filter", "float", "for", "foreign", "found", "free_it",
- "from", "full", "function", "gdscode", "generator", "gen_id", "global", "goto",
- "grant", "group", "group_commit_", "group_commit_wait", "having", "help", "hour",
- "if", "immediate", "in", "inactive", "index", "indicator", "init", "inner", "input",
- "input_type", "insert", "int", "integer", "into", "is", "isolation", "isql", "join",
- "key", "lc_messages", "lc_type", "left", "length", "lev", "level", "like", "logfile",
- "log_buffer_size", "log_buf_size", "long", "manual", "max", "maximum", "maximum_segment",
- "max_segment", "merge", "message", "min", "minimum", "minute", "module_name", "month",
- "names", "national", "natural", "nchar", "no", "noauto", "not", "null", "numeric",
- "num_log_buffers", "num_log_bufs", "octet_length", "of", "on", "only", "open", "option",
- "or", "order", "outer", "output", "output_type", "overflow", "page", "pagelength",
- "pages", "page_size", "parameter", "password", "plan", "position", "post_event",
- "precision", "prepare", "primary", "privileges", "procedure", "protected", "public",
- "quit", "raw_partitions", "rdb$db_key", "read", "real", "record_version", "recreate",
- "references", "release", "release", "reserv", "reserving", "restrict", "retain",
- "return", "returning_values", "returns", "revoke", "right", "role", "rollback",
- "row_count", "runtime", "savepoint", "schema", "second", "segment", "select",
- "set", "shadow", "shared", "shell", "show", "singular", "size", "smallint",
- "snapshot", "some", "sort", "sqlcode", "sqlerror", "sqlwarning", "stability",
- "starting", "starts", "statement", "static", "statistics", "sub_type", "sum",
- "suspend", "table", "terminator", "then", "time", "timestamp", "to", "transaction",
- "translate", "translation", "trigger", "trim", "type", "uncommitted", "union",
- "unique", "update", "upper", "user", "using", "value", "values", "varchar",
- "variable", "varying", "version", "view", "wait", "wait_time", "weekday", "when",
- "whenever", "where", "while", "with", "work", "write", "year", "yearday" ])
+ FLOAT, INTEGER, NUMERIC, SMALLINT,
+ TEXT, TIME, TIMESTAMP, VARCHAR)
+
+
+RESERVED_WORDS = set([
+ "active", "add", "admin", "after", "all", "alter", "and", "any", "as",
+ "asc", "ascending", "at", "auto", "avg", "before", "begin", "between",
+ "bigint", "bit_length", "blob", "both", "by", "case", "cast", "char",
+ "character", "character_length", "char_length", "check", "close",
+ "collate", "column", "commit", "committed", "computed", "conditional",
+ "connect", "constraint", "containing", "count", "create", "cross",
+ "cstring", "current", "current_connection", "current_date",
+ "current_role", "current_time", "current_timestamp",
+ "current_transaction", "current_user", "cursor", "database", "date",
+ "day", "dec", "decimal", "declare", "default", "delete", "desc",
+ "descending", "disconnect", "distinct", "do", "domain", "double",
+ "drop", "else", "end", "entry_point", "escape", "exception",
+ "execute", "exists", "exit", "external", "extract", "fetch", "file",
+ "filter", "float", "for", "foreign", "from", "full", "function",
+ "gdscode", "generator", "gen_id", "global", "grant", "group",
+ "having", "hour", "if", "in", "inactive", "index", "inner",
+ "input_type", "insensitive", "insert", "int", "integer", "into", "is",
+ "isolation", "join", "key", "leading", "left", "length", "level",
+ "like", "long", "lower", "manual", "max", "maximum_segment", "merge",
+ "min", "minute", "module_name", "month", "names", "national",
+ "natural", "nchar", "no", "not", "null", "numeric", "octet_length",
+ "of", "on", "only", "open", "option", "or", "order", "outer",
+ "output_type", "overflow", "page", "pages", "page_size", "parameter",
+ "password", "plan", "position", "post_event", "precision", "primary",
+ "privileges", "procedure", "protected", "rdb$db_key", "read", "real",
+ "record_version", "recreate", "recursive", "references", "release",
+ "reserv", "reserving", "retain", "returning_values", "returns",
+ "revoke", "right", "rollback", "rows", "row_count", "savepoint",
+ "schema", "second", "segment", "select", "sensitive", "set", "shadow",
+ "shared", "singular", "size", "smallint", "snapshot", "some", "sort",
+ "sqlcode", "stability", "start", "starting", "starts", "statistics",
+ "sub_type", "sum", "suspend", "table", "then", "time", "timestamp",
+ "to", "trailing", "transaction", "trigger", "trim", "uncommitted",
+ "union", "unique", "update", "upper", "user", "using", "value",
+ "values", "varchar", "variable", "varying", "view", "wait", "when",
+ "where", "while", "with", "work", "write", "year",
+ ])
class _FBBoolean(sqltypes.Boolean):