Skip to content

Commit

Permalink
[优化]单例模式
Browse files Browse the repository at this point in the history
  • Loading branch information
longfengpili committed Aug 8, 2022
2 parents 4755cde + 9c05781 commit 88dcaec
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,11 @@ row, action, result = db.execute(sql)
可以自动执行表名(表名包含即可)
+ REDSHIFT_AUTO_RULES
Amazon Redshift 可以自动执行表名(表名包含即可)

## jupyter notebook 调用日志格式
```python
import logging
from pydbapi.conf.settings import LOGGING_CONFIG
import logging.config
logging.config.dictConfig(LOGGING_CONFIG)
```
5 changes: 3 additions & 2 deletions pydbapi/db/base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# @Author: chunyang.xu
# @Email: [email protected]
# @Date: 2020-06-02 18:46:58
# @Last Modified time: 2022-03-15 10:11:49
# @Last Modified time: 2022-06-01 13:57:39
# @github: https://github.com/longfengpili

# !/usr/bin/env python3
Expand Down Expand Up @@ -113,7 +113,8 @@ def execute(self, sql, count=None, ehandling='raise', verbose=0):

self.__execute_step(cur, sql, ehandling=ehandling)

if action == 'SELECT' and (verbose or idx == sqls_length):
if (action == 'SELECT' and (verbose or idx == sqls_length)) \
or (action == 'WITH' and idx == sqls_length):
# columns, results = cur_getresults(cur, count)
results = self.cur_results(cur, count)
desc, columns = self.cur_columns(cur)
Expand Down
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# @Author: chunyang.xu
# @Email: [email protected]
# @Date: 2020-06-09 16:46:54
<<<<<<< HEAD
# @Last Modified time: 2022-08-08 18:55:36
=======
# @Last Modified time: 2022-06-01 13:53:53
>>>>>>> 9c05781523e26879c1aee8020974b5c99057d544
# @github: https://github.com/longfengpili

# !/usr/bin/env python3
Expand Down

0 comments on commit 88dcaec

Please sign in to comment.