Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
6eeb9e1f
Commit
6eeb9e1f
authored
Aug 29, 2000
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Connections did not check for RDB format result data, making the test tab
break for some older DAs.
parent
3d490356
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
254 additions
and
245 deletions
+254
-245
lib/python/Shared/DC/ZRDB/Connection.py
lib/python/Shared/DC/ZRDB/Connection.py
+254
-245
No files found.
lib/python/Shared/DC/ZRDB/Connection.py
View file @
6eeb9e1f
...
...
@@ -84,8 +84,8 @@
##############################################################################
__doc__
=
'''Generic Database Connection Support
$Id: Connection.py,v 1.2
6 2000/07/26 15:44:05 brian Exp $'''
__version__
=
'$Revision: 1.2
6 $'
[
11
:
-
2
]
$Id: Connection.py,v 1.2
7 2000/08/29 15:05:10 brian Exp $'''
__version__
=
'$Revision: 1.2
7 $'
[
11
:
-
2
]
import
Globals
,
OFS
.
SimpleItem
,
AccessControl
.
Role
,
Acquisition
,
sys
from
DateTime
import
DateTime
...
...
@@ -93,8 +93,9 @@ from App.Dialogs import MessageDialog
from
Globals
import
HTMLFile
from
string
import
find
,
join
,
split
from
Aqueduct
import
custom_default_report
from
cStringIO
import
StringIO
from
Results
import
Results
import
DocumentTemplate
import
DocumentTemplate
,
RDB
class
Connection
(
Globals
.
Persistent
,
...
...
@@ -178,7 +179,15 @@ class Connection(
"Executes the SQL in parameter 'query' and returns results"
dbc
=
self
()
#get our connection
res
=
dbc
.
query
(
query
)
if
type
(
res
)
is
type
(
''
):
f
=
StringIO
()
f
.
write
(
res
)
f
.
seek
(
0
)
result
=
RDB
.
File
(
f
)
else
:
result
=
Results
(
res
)
if
REQUEST
is
None
:
return
result
#return unadulterated result objects
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment