This commit is contained in:
yumoqing 2023-04-19 14:50:25 +08:00
parent 1aaf4a1504
commit 246ebad120
2 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,8 @@ from appPublic.jsonConfig import getConfig
import openpyxl as xlsx
import asyncio
from sqlor.dbpools import DBPools
import aiomysql
import aiopg
from typeconv import convrec
class CBObject:

View File

@ -4,6 +4,7 @@ import decimal
from asyncio import coroutine
os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8'
import sys
from datetime import datetime, date
import codecs
import re
import json
@ -17,6 +18,10 @@ from .filter import DBFilter
def db_type_2_py_type(o):
if isinstance(o,decimal.Decimal):
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
class SQLorException(Exception,object):