From 32733db363fdc3f22c10011e7ab76f3f87445781 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 22 Jun 2022 16:45:00 +0800 Subject: [PATCH] bugfix --- requirements.txt | 2 +- sqlor/mysqlor.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index ad324bf..44e24a9 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ aiomysql -mysql-connector +PyMySQL aiosqlite asyncio jinja2 diff --git a/sqlor/mysqlor.py b/sqlor/mysqlor.py index d68b621..a2822e5 100755 --- a/sqlor/mysqlor.py +++ b/sqlor/mysqlor.py @@ -1,5 +1,5 @@ # -*- coding:utf8 -*- -from mysql import connector +import pymysql from appPublic.argsConvert import ArgsConvert,ConditionConvert from .sor import SQLor @@ -50,7 +50,7 @@ class MySqlor(SQLor): } @classmethod def isMe(self,name): - if name=='mysql.connector': + if name=='pymysql' return True if name=='aiomysql': return True @@ -62,7 +62,7 @@ class MySqlor(SQLor): } def _opendb(self): - self.conn = connector.connect(**self.dbdesc['kwargs']) + self.conn = pymysql.connect(**self.dbdesc['kwargs']) def placeHolder(self,varname,pos=None): if varname=='__mainsql__' :