Minor consistency update

This commit is contained in:
Miroslav Stampar 2016-01-14 22:47:56 +01:00
parent 59695af101
commit 66eaac862b
2 changed files with 29 additions and 29 deletions

View File

@ -40,34 +40,34 @@ FIREBIRD_TYPES = {
} }
SYBASE_TYPES = { SYBASE_TYPES = {
"14": "floatn", 14: "floatn",
"8": "float", 8: "float",
"15": "datetimn", 15: "datetimn",
"12": "datetime", 12: "datetime",
"23": "real", 23: "real",
"28": "numericn", 28: "numericn",
"10": "numeric", 10: "numeric",
"27": "decimaln", 27: "decimaln",
"26": "decimal", 26: "decimal",
"17": "moneyn", 17: "moneyn",
"11": "money", 11: "money",
"21": "smallmoney", 21: "smallmoney",
"22": "smalldatetime", 22: "smalldatetime",
"13": "intn", 13: "intn",
"7": "int", 7: "int",
"6": "smallint", 6: "smallint",
"5": "tinyint", 5: "tinyint",
"16": "bit", 16: "bit",
"2": "varchar", 2: "varchar",
"18": "sysname", 18: "sysname",
"25": "nvarchar", 25: "nvarchar",
"1": "char", 1: "char",
"24": "nchar", 24: "nchar",
"4": "varbinary", 4: "varbinary",
"80": "timestamp", 80: "timestamp",
"3": "binary", 3: "binary",
"19": "text", 19: "text",
"20": "image", 20: "image",
} }
MYSQL_PRIVS = { MYSQL_PRIVS = {

View File

@ -287,7 +287,7 @@ class Enumeration(GenericEnumeration):
columns = {} columns = {}
for name, type_ in filterPairValues(zip(retVal[0]["%s.name" % randStr], retVal[0]["%s.usertype" % randStr])): for name, type_ in filterPairValues(zip(retVal[0]["%s.name" % randStr], retVal[0]["%s.usertype" % randStr])):
columns[name] = SYBASE_TYPES.get(type_, type_) columns[name] = SYBASE_TYPES.get(int(type_) if isinstance(type_, basestring) and type_.isdigit() else type_, type_)
table[safeSQLIdentificatorNaming(tbl)] = columns table[safeSQLIdentificatorNaming(tbl)] = columns
kb.data.cachedColumns[safeSQLIdentificatorNaming(conf.db)] = table kb.data.cachedColumns[safeSQLIdentificatorNaming(conf.db)] = table