Skip to content

Commit

Permalink
[优化]with语句获取最后结果
Browse files Browse the repository at this point in the history
  • Loading branch information
longfengpili committed Jun 1, 2022
1 parent ed5e64a commit 9c05781
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
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: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# @Author: chunyang.xu
# @Email: [email protected]
# @Date: 2020-06-09 16:46:54
# @Last Modified time: 2022-03-15 10:12:40
# @Last Modified time: 2022-06-01 13:53:53
# @github: https://github.com/longfengpili

# !/usr/bin/env python3
Expand All @@ -12,7 +12,7 @@
import shutil
import setuptools

VERSION = '0.0.86'
VERSION = '0.0.87'
PROJECT_NAME = 'pydbapi'

with open('README.md', 'r', encoding='utf-8') as f:
Expand Down

0 comments on commit 9c05781

Please sign in to comment.