DomainTool & CMFCategory: Stop generating SQL
SQL generation belongs to catalog, so move SQL generation inside it. Also, improve other ERP5 features and simplify code along the way.
-
The first 2 commits add two special dynamic related keys,
all
andnone
. The naming is still under discussion, so it is a first blocker for this merge request. -
3rd commit (
Add getCategoryParameterDict
) does not depend on previous commits, but it is dead code until the 4th commit goes in, so I would prefer to keep those 2 together. It gets also used more in a later commit. -
4th commit is a generic improvement, but relies on the
all
commit, so it cannot go in until the naming becomes final. -
5th commit (
Drop "strict=False" support
) removes an outdated code path which used to list too many predicates. Keeping it around was a bad idea. Removing it reduces the number of code paths which can be taken, paving the way for 7th commit. Please comment if you have use-cases for this. -
6th commit expands dynamic related keys so it works on
predicate_category
just as it works oncategory
already. -
7th commit (
Unite inner-join and left-join predicate lookups
) is the main commit of this serie. It simplifies DomainTool code and generalises theINNER JOIN
support. Please review. -
8th commit is the idea that caller should not tell us to filter by relations which do not exist on context anyway, as the meaning of this is totally unclear. So @yusei and I think it should raise an exception instead of silently doing the wrong thing. The question is: what will be the impact of such raise ? I do not know how this API is used well enough to tell what's above us in the call stack, and whether triggering such exception could hurt (ex: breaking UI). Please review This commit will either be dropped or squashed before this merge request goes in.
-
9th commit is not strictly needed for this feature, but rather cleanup: these methods generate SQL and are implemented outside of catalog (ERP5Catalog & ZSQLCatalog products). Such methods will eventually break, so we may as well drop them now. Nothing calls them in generic ERP5 anymore. Please comment if you know code in external repositories which call this.