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
Labels
Merge Requests
140
Merge Requests
140
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
12d5a4c1
Commit
12d5a4c1
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
1e15a1a0
Changes
1
Hide 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 @
12d5a4c1
...
@@ -2440,15 +2440,19 @@ class Catalog(Folder,
...
@@ -2440,15 +2440,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