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
138
Merge Requests
138
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
c21b4004
Commit
c21b4004
authored
Jan 13, 2025
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZSQLCatalog: code cleanup.
parent
3770c698
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
31 deletions
+4
-31
product/ZSQLCatalog/SQLCatalog.py
product/ZSQLCatalog/SQLCatalog.py
+4
-31
No files found.
product/ZSQLCatalog/SQLCatalog.py
View file @
c21b4004
...
...
@@ -29,7 +29,6 @@ from OFS.Folder import Folder
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.Permissions
import
(
access_contents_information
,
import_export_objects
,
manage_zcatalog_entries
,
)
from
AccessControl.SimpleObjectPolicies
import
ContainerAssertions
...
...
@@ -54,10 +53,6 @@ import pprint
import
re
import
warnings
from
contextlib
import
contextmanager
from
xml.dom.minidom
import
parse
from
xml.sax.saxutils
import
escape
,
quoteattr
import
os
from
hashlib
import
md5
from
.interfaces.query_catalog
import
ISearchKeyCatalog
from
zope.interface.verify
import
verifyClass
...
...
@@ -1217,11 +1212,10 @@ class Catalog(Folder,
elapse
=
time
.
time
()
c_elapse
=
time
.
clock
()
words
=
0
obj
=
REQUEST
.
PARENTS
[
1
]
path
=
'/'
.
join
(
obj
.
getPhysicalPath
())
results
=
self
.
aq_parent
.
ZopeFindAndApply
(
obj
,
self
.
aq_parent
.
ZopeFindAndApply
(
obj
,
obj_metatypes
=
obj_metatypes
,
obj_ids
=
obj_ids
,
obj_searchterm
=
obj_searchterm
,
...
...
@@ -1874,9 +1868,7 @@ class Catalog(Folder,
"""
search_key
,
related_key_definition
=
self
.
getColumnSearchKey
(
key
,
search_key_name
=
search_key_name
)
if
search_key
is
None
:
result
=
None
else
:
if
search_key
is
not
None
:
if
related_key_definition
is
not
None
:
search_key
=
search_key
.
getSearchKey
(
sql_catalog
=
self
,
related_key_definition
=
related_key_definition
,
...
...
@@ -2450,30 +2442,12 @@ class Catalog(Folder,
if
method
.
meta_type
in
(
'Z SQL Method'
,
'ERP5 SQL Method'
)
and
(
'deferred'
in
method
.
connection_id
)
==
deferred
:
return
method
.
connection_id
def
getSqlCatalogObjectList
(
self
):
try
:
return
self
.
sql_catalog_object
except
AttributeError
:
return
()
def
getSqlUncatalogObjectList
(
self
):
try
:
return
self
.
sql_uncatalog_object
except
AttributeError
:
return
()
def
getSqlUpdateObjectList
(
self
):
try
:
return
self
.
sql_update_object
except
AttributeError
:
return
()
def
getSqlCatalogObjectListList
(
self
):
try
:
return
self
.
sql_catalog_object_list
except
AttributeError
:
return
()
security
.
declarePrivate
(
'getFilterableMethodList'
)
def
getFilterableMethodList
(
self
):
"""
...
...
@@ -2482,10 +2456,9 @@ class Catalog(Folder,
method_id_set
=
set
()
if
withCMF
:
method_id_set
.
update
(
self
.
getSqlCatalogObjectList
()
+
self
.
getSqlCatalogObjectList
List
()
+
self
.
getSqlUncatalogObjectList
()
+
self
.
getSqlUpdateObjectList
()
+
self
.
getSqlCatalogObjectListList
()
self
.
getSqlUpdateObjectList
()
)
return
[
method
...
...
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