Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bf77dd0

Browse filesBrowse files
authored
Update FIELD_TYPEs (PyMySQL#309)
1 parent aca3a39 commit bf77dd0
Copy full SHA for bf77dd0

File tree

Expand file treeCollapse file tree

2 files changed

+6
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-3
lines changed

‎MySQLdb/__init__.py

Copy file name to clipboardExpand all lines: MySQLdb/__init__.py
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
from sets import ImmutableSet as frozenset
3838

3939
class DBAPISet(frozenset):
40-
4140
"""A special type of set for which A == x is true if A is a
4241
DBAPISet and x is a member of that set."""
4342

@@ -54,7 +53,7 @@ def __eq__(self, other):
5453
NUMBER = DBAPISet([FIELD_TYPE.DECIMAL, FIELD_TYPE.DOUBLE, FIELD_TYPE.FLOAT,
5554
FIELD_TYPE.INT24, FIELD_TYPE.LONG, FIELD_TYPE.LONGLONG,
5655
FIELD_TYPE.TINY, FIELD_TYPE.YEAR, FIELD_TYPE.NEWDECIMAL])
57-
DATE = DBAPISet([FIELD_TYPE.DATE, FIELD_TYPE.NEWDATE])
56+
DATE = DBAPISet([FIELD_TYPE.DATE])
5857
TIME = DBAPISet([FIELD_TYPE.TIME])
5958
TIMESTAMP = DBAPISet([FIELD_TYPE.TIMESTAMP, FIELD_TYPE.DATETIME])
6059
DATETIME = TIMESTAMP

‎MySQLdb/constants/FIELD_TYPE.py

Copy file name to clipboardExpand all lines: MySQLdb/constants/FIELD_TYPE.py
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@
1818
TIME = 11
1919
DATETIME = 12
2020
YEAR = 13
21-
NEWDATE = 14
21+
# NEWDATE = 14 # Internal to MySQL.
2222
VARCHAR = 15
2323
BIT = 16
24+
# TIMESTAMP2 = 17
25+
# DATETIME2 = 18
26+
# TIME2 = 19
27+
JSON = 245
2428
NEWDECIMAL = 246
2529
ENUM = 247
2630
SET = 248

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.