Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5 erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 140
    • Merge requests 140
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !307

Merged
Created Jun 28, 2017 by Vincent Pelletier@vpelletierOwner

DomainTool & CMFCategory: Stop generating SQL

  • Overview 11
  • Commits 8
  • Changes 12

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 and none. 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 on category already.

  • 7th commit (Unite inner-join and left-join predicate lookups) is the main commit of this serie. It simplifies DomainTool code and generalises the INNER 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.

/cc @seb @jerome @jp @jm @kazuhiko

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: DomainTool
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7