bugfix
This commit is contained in:
parent
1aaf4a1504
commit
246ebad120
@ -2,6 +2,8 @@ from appPublic.jsonConfig import getConfig
|
|||||||
import openpyxl as xlsx
|
import openpyxl as xlsx
|
||||||
import asyncio
|
import asyncio
|
||||||
from sqlor.dbpools import DBPools
|
from sqlor.dbpools import DBPools
|
||||||
|
import aiomysql
|
||||||
|
import aiopg
|
||||||
from typeconv import convrec
|
from typeconv import convrec
|
||||||
|
|
||||||
class CBObject:
|
class CBObject:
|
||||||
|
@ -4,6 +4,7 @@ import decimal
|
|||||||
from asyncio import coroutine
|
from asyncio import coroutine
|
||||||
os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8'
|
os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8'
|
||||||
import sys
|
import sys
|
||||||
|
from datetime import datetime, date
|
||||||
import codecs
|
import codecs
|
||||||
import re
|
import re
|
||||||
import json
|
import json
|
||||||
@ -17,6 +18,10 @@ from .filter import DBFilter
|
|||||||
def db_type_2_py_type(o):
|
def db_type_2_py_type(o):
|
||||||
if isinstance(o,decimal.Decimal):
|
if isinstance(o,decimal.Decimal):
|
||||||
return float(o)
|
return float(o)
|
||||||
|
if isinstance(o,datetime):
|
||||||
|
return '%020d' % int(o.timestamp() * 1000)
|
||||||
|
if isinstance(o, date):
|
||||||
|
return '%04d-%02d-%02d' % (o.year, o.month, o.day)
|
||||||
return o
|
return o
|
||||||
|
|
||||||
class SQLorException(Exception,object):
|
class SQLorException(Exception,object):
|
||||||
|
Loading…
Reference in New Issue
Block a user