Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
erp5
Commits
d95690fc
Commit
d95690fc
authored
Dec 04, 2023
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQLCatalog: add read_committed argument in getConnectionId().
parent
edccff06
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
product/ZSQLCatalog/SQLCatalog.py
product/ZSQLCatalog/SQLCatalog.py
+7
-3
No files found.
product/ZSQLCatalog/SQLCatalog.py
View file @
d95690fc
...
@@ -2433,15 +2433,19 @@ class Catalog(Folder,
...
@@ -2433,15 +2433,19 @@ class Catalog(Folder,
return
method
(
catalog
=
catalog
)
return
method
(
catalog
=
catalog
)
security
.
declarePublic
(
'getConnectionId'
)
security
.
declarePublic
(
'getConnectionId'
)
def
getConnectionId
(
self
,
deferred
=
False
):
def
getConnectionId
(
self
,
deferred
=
False
,
read_committed
=
False
):
"""
"""
Returns the 'normal' connection being used by the SQL Method(s) in this
Returns the 'normal' connection being used by the SQL Method(s) in this
catalog.
catalog.
If 'deferred' is True, then returns the deferred connection
If 'deferred' is True, then returns the deferred connection
"""
"""
assert
not
(
deferred
and
read_committed
),
'No connection should have deferred AND read_committed.'
for
method
in
self
.
objectValues
():
for
method
in
self
.
objectValues
():
if
method
.
meta_type
in
(
'Z SQL Method'
,
'ERP5 SQL Method'
)
and
(
'deferred'
in
method
.
connection_id
)
==
deferred
:
if
method
.
meta_type
in
(
'Z SQL Method'
,
'ERP5 SQL Method'
):
return
method
.
connection_id
connection_id
=
method
.
connection_id
if
(
'deferred'
in
connection_id
)
==
deferred
and
\
(
'read_committed'
in
connection_id
)
==
read_committed
:
return
connection_id
def
getSqlCatalogObjectList
(
self
):
def
getSqlCatalogObjectList
(
self
):
try
:
try
:
...
...
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