Skip to content

Commit 66eaac8

Browse files
committed
Minor consistency update
1 parent 59695af commit 66eaac8

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

lib/core/dicts.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -40,34 +40,34 @@
4040
}
4141

4242
SYBASE_TYPES = {
43-
"14": "floatn",
44-
"8": "float",
45-
"15": "datetimn",
46-
"12": "datetime",
47-
"23": "real",
48-
"28": "numericn",
49-
"10": "numeric",
50-
"27": "decimaln",
51-
"26": "decimal",
52-
"17": "moneyn",
53-
"11": "money",
54-
"21": "smallmoney",
55-
"22": "smalldatetime",
56-
"13": "intn",
57-
"7": "int",
58-
"6": "smallint",
59-
"5": "tinyint",
60-
"16": "bit",
61-
"2": "varchar",
62-
"18": "sysname",
63-
"25": "nvarchar",
64-
"1": "char",
65-
"24": "nchar",
66-
"4": "varbinary",
67-
"80": "timestamp",
68-
"3": "binary",
69-
"19": "text",
70-
"20": "image",
43+
14: "floatn",
44+
8: "float",
45+
15: "datetimn",
46+
12: "datetime",
47+
23: "real",
48+
28: "numericn",
49+
10: "numeric",
50+
27: "decimaln",
51+
26: "decimal",
52+
17: "moneyn",
53+
11: "money",
54+
21: "smallmoney",
55+
22: "smalldatetime",
56+
13: "intn",
57+
7: "int",
58+
6: "smallint",
59+
5: "tinyint",
60+
16: "bit",
61+
2: "varchar",
62+
18: "sysname",
63+
25: "nvarchar",
64+
1: "char",
65+
24: "nchar",
66+
4: "varbinary",
67+
80: "timestamp",
68+
3: "binary",
69+
19: "text",
70+
20: "image",
7171
}
7272

7373
MYSQL_PRIVS = {

plugins/dbms/sybase/enumeration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def getColumns(self, onlyColNames=False, colTuple=None, bruteForce=None, dumpMod
287287
columns = {}
288288

289289
for name, type_ in filterPairValues(zip(retVal[0]["%s.name" % randStr], retVal[0]["%s.usertype" % randStr])):
290-
columns[name] = SYBASE_TYPES.get(type_, type_)
290+
columns[name] = SYBASE_TYPES.get(int(type_) if isinstance(type_, basestring) and type_.isdigit() else type_, type_)
291291

292292
table[safeSQLIdentificatorNaming(tbl)] = columns
293293
kb.data.cachedColumns[safeSQLIdentificatorNaming(conf.db)] = table

0 commit comments

Comments
 (0)