Getting rid of {as,build}SQL*Expression
This is the next step on the road of re-concentrating SQL generation inside ZSQLCatalog + ZSQLMethods.
As with previous patch set ( !307 (merged) on DomainTool), there was some preparatory work which I believe does not require review (small-ish functional extensions, API abuses tolerated by old code but detected by new code) and which I already pushed to master.
Preparatory work in this merge request, so the maybe-non-consensual stuff:
-
one commit by @kazuhiko which fixes aEDIT: now merged, and rebased over latest master, fixing conflicts.testSecurity.TestSecurity
failure. It does not belong to this Merge Request, but helped getting cleaner test results. It should be pushed by @kazuhiko to master independently from the merge request. -
extendparent
relation condition generation ingetCategoryValueDictParameterDict
as I realise working on this that legacy SQL generation methods support more than single-level matches. I would prefer to not have to include this commit, as it makesparent
relation more expensive than other relations when non-strict, and a bit more expensive when reversed (aka "related"). Also, I believe extending the usual non-strict relation mechanism to the specialparent
one is not easy to mentally map (because there is one less indirection level), so I would expect it to rarely be actualy needed or used consciously. Anyway, if it goes in, this implementation will be more efficient than existing one by implementing non-strict forward relation as aLIKE
match on path instead of recursing through subcontainers. please comment if you knew about this support.EDIT: While this change is still visible in this merge request, I now consider it as good for master.EDIT: now pushed to master -
two deletion commits please comment if you really want to save these:EDIT: Pushed to reduce the amount of diff in this merge request.getting rid of Resource_zGetInventory, which is dead code for years in public master. If any project depend on it, they can trivially copy it, but it is not maintained in master - this is just making it clear.getting rid of never used erp5_mysql_ndb_catalog BT. I'm a bit annoyed that this gets rid of the only "other" catalog BT, but it never actually worked, as MySQL NDB quickly proved too buggy back when I created it (2006~2007), and it has not been tested (automatically or otherwise) since, so there is no way it works now. And the code value is close to zero too: it is basically a copy from innodb catalog with a few columns types changes to fit NDB type constraints from that time.
And the main beef of this change please review:
- two new methods producing catalog Queries where legacy code produces SQL.
- three commits moving to the API added above
- one commit to drop legacy SQL-generating methods: just like for DomainTool in previous merge request, such methods will eventually break (hopefully soon) even if we keep them right now.