Hi,
I have some questions on writing the datasource files(ds.xml files).
1) Can default clauses like $defaultWhereClause etc be used in any part of the operation binding. i.e can $defaultWhereClause be used inside the <tableClause>
of the operating binding.
We need this because we have inner queries.
2) We have lot of recurring logic in most of the clauses in different OperationBinding tags in the ds.xml file. Can this be declared somewhere outside of the OperationBinding and use it as a variable.
This would greatly reduce the recurring logic in ds.xml file for various OperationBindings.
The logic is quite hefty because the columns selected etc. are highly dynamic and seperating them into multiple OperationBindings will bloat it up.
3) In the query constructed I see lot of 'IS NULL' and 'IS NOT NULL' checks on some columns. What is the basis for this. I mean I see it on some columns but not on all. We don't need this. How to get rid of this in the default where clause costruction. Also I see lot of '1'='1' statements. Is there a way to get rid of these.
4) Can we have multiple clauses for where clause. I have a scenario where the query uses UNION. Though this can be split in a manner that part of the query goes into the table clause, it has two different where clauses one for each part. So it possible to generate two different $defaultWhereClauses in this case. I wanted to make use of smartgwt feature of generating query from Criteria objects just like the $defaultWhereClause.
Apart from this, we have highly dynamic queries which are very complex ( with inner queries, grouping at various levels etc, with unions etc.) and this doesn't fall in line with the standard approach of one tableclause, selectclause, etc. I would like to know any tricks in approach. Currently we put the whole of inner query etc in the tableclause itself.
Thanks.
I have some questions on writing the datasource files(ds.xml files).
1) Can default clauses like $defaultWhereClause etc be used in any part of the operation binding. i.e can $defaultWhereClause be used inside the <tableClause>
of the operating binding.
We need this because we have inner queries.
2) We have lot of recurring logic in most of the clauses in different OperationBinding tags in the ds.xml file. Can this be declared somewhere outside of the OperationBinding and use it as a variable.
This would greatly reduce the recurring logic in ds.xml file for various OperationBindings.
The logic is quite hefty because the columns selected etc. are highly dynamic and seperating them into multiple OperationBindings will bloat it up.
3) In the query constructed I see lot of 'IS NULL' and 'IS NOT NULL' checks on some columns. What is the basis for this. I mean I see it on some columns but not on all. We don't need this. How to get rid of this in the default where clause costruction. Also I see lot of '1'='1' statements. Is there a way to get rid of these.
4) Can we have multiple clauses for where clause. I have a scenario where the query uses UNION. Though this can be split in a manner that part of the query goes into the table clause, it has two different where clauses one for each part. So it possible to generate two different $defaultWhereClauses in this case. I wanted to make use of smartgwt feature of generating query from Criteria objects just like the $defaultWhereClause.
Apart from this, we have highly dynamic queries which are very complex ( with inner queries, grouping at various levels etc, with unions etc.) and this doesn't fall in line with the standard approach of one tableclause, selectclause, etc. I would like to know any tricks in approach. Currently we put the whole of inner query etc in the tableclause itself.
Thanks.
Comment