Skip to content

Commit

Permalink
Merge pull request #93 from tetraptych/convert-type-tuples-to-sets
Browse files Browse the repository at this point in the history
Cast datatype lists as set for faster lookup
  • Loading branch information
escheie committed Jan 18, 2018
2 parents 88b23ae + 541c523 commit 5e960ed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions teradata/datatypes.py
Expand Up @@ -47,15 +47,15 @@
periodRegEx1 = re.compile("\('(.*)',\s*'(.*)'\)")
periodRegEx2 = re.compile("ResultStruct:PERIOD\(.*\)\[(.*),\s*(.*)\]")

NUMBER_TYPES = ("BYTEINT", "BIGINT", "DECIMAL", "DOUBLE", "DOUBLE PRECISION",
NUMBER_TYPES = {"BYTEINT", "BIGINT", "DECIMAL", "DOUBLE", "DOUBLE PRECISION",
"INTEGER", "NUMBER", "SMALLINT", "FLOAT", "INT", "NUMERIC",
"REAL")
"REAL"}

INT_TYPES = ("BYTEINT", "BIGINT", "INTEGER", "SMALLINT", "INT")
INT_TYPES = {"BYTEINT", "BIGINT", "INTEGER", "SMALLINT", "INT"}

FLOAT_TYPES = ("FLOAT", "DOUBLE", "DOUBLE PRECISION", "REAL")
FLOAT_TYPES = {"FLOAT", "DOUBLE", "DOUBLE PRECISION", "REAL"}

BINARY_TYPES = ("BLOB", "BYTE", "VARBYTE")
BINARY_TYPES = {"BLOB", "BYTE", "VARBYTE"}


def _getMs(m, num):
Expand Down

0 comments on commit 5e960ed

Please sign in to comment.