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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
erp5
Commits
a9803798
Commit
a9803798
authored
Aug 22, 2017
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web: Stop relying on portal_selections for SQL expression generation
parent
b7e644e4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
17 deletions
+12
-17
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_zGetDocumentValueList.sql
...og/erp5_mysql_innodb/SQLCatalog_zGetDocumentValueList.sql
+12
-17
No files found.
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_zGetDocumentValueList.sql
View file @
a9803798
<
dtml
-
let
query
=
"getattr(search_context, 'buildSQLQuery', portal_catalog.buildSQLQuery)(query=portal_catalog.getSecurityQuery(**kw), **kw)"
selection_domain
=
"kw.get('selection_domain', None)"
selection_report
=
"kw.get('selection_report', None)"
optimizer_switch_key_list
=
"getOptimizerSwitchKeyList()"
>
<
dtml
-
let
asQuery
=
"getattr(search_context, 'asQuery', None)"
dummy
=
"None if asQuery is None else kw.update({'websection_query': asQuery()})"
query
=
"
buildSQLQuery(
security_query=getSecurityQuery(sql_catalog_id=getId(),
local_roles=kw.pop('local_roles', None)),
**kw
)
"
optimizer_switch_key_list
=
"getOptimizerSwitchKeyList()"
>
<
dtml
-
comment
>
Currently
,
there
is
no
other
choice
to
implement
this
method
as
an
SQL
catalog
until
SQLCatalog
can
support
more
features
which
are
needed
here
.
Once
SQLCatalog
supports
those
feature
,
...
...
@@ -39,24 +46,12 @@
<
dtml
-
in
prefix
=
"table"
expr
=
"query['from_table_list']"
>
<
dtml
-
var
table_item
>
AS
<
dtml
-
var
table_key
>
,
</
dtml
-
in
>
<
dtml
-
if
selection_domain
>
<
dtml
-
var
"portal_selections.buildSQLJoinExpressionFromDomainSelection(selection_domain)"
>
,
</
dtml
-
if
>
<
dtml
-
if
selection_report
>
<
dtml
-
var
"portal_selections.buildSQLJoinExpressionFromDomainSelection(selection_report)"
>
,
</
dtml
-
if
>
versioning
AS
my_versioning
WHERE
my_versioning
.
uid
=
catalog
.
uid
<
dtml
-
if
"query['where_expression']"
>
AND
<
dtml
-
var
"query['where_expression']"
>
</
dtml
-
if
>
<
dtml
-
if
selection_domain
>
AND
<
dtml
-
var
"portal_selections.buildSQLExpressionFromDomainSelection(selection_domain)"
>
</
dtml
-
if
>
<
dtml
-
if
selection_report
>
AND
<
dtml
-
var
"portal_selections.buildSQLExpressionFromDomainSelection(selection_report)"
>
</
dtml
-
if
>
<
dtml
-
if
strict_language
>
AND
my_versioning
.
language
IN
(
<
dtml
-
sqlvar
language
type
=
"string"
>
,
''
)
</
dtml
-
if
>
...
...
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