Opened 8 months ago

Last modified 11 days ago

#31122 new Cleanup/optimization

Clarify how the Lookup class follow the Query Expression API.

Reported by: Hongtao Ma Owned by:
Component: Documentation Version: 3.0
Severity: Normal Keywords:
Cc: AP Jama Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

For a class to be a lookup, it must follow the Query Expression API. **Lookup and Transform naturally follow this API.**
A Lookup is a generic class to implement lookups. A lookup is a query expression with a left-hand side, lhs; a right-hand side, rhs; and a lookup_name that is used to produce a boolean comparison between lhs and rhs such as lhs in rhs or lhs > rhs.

The notation to use a lookup in an expression is <lhs>__<lookup_name>=<rhs>.

**This class doesn’t follow the Query Expression API** since it has =<rhs> on its construction: lookups are always the end of a lookup expression.

Change History (4)

comment:1 Changed 8 months ago by felixxm

Summary: Contradiction in docs/ref/models/lookupsClarify how `Lookup` follow the Query Expression API.
Triage Stage: UnreviewedAccepted

Agreed, we should clarify how the Lookup class follow the Query Expression API, because it implements as_sql() and as_vendorname().

comment:2 Changed 8 months ago by felixxm

Summary: Clarify how `Lookup` follow the Query Expression API.Clarify how the Lookup class follow the Query Expression API.

comment:3 Changed 2 weeks ago by AP Jama

Owner: changed from nobody to AP Jama
Status: newassigned

comment:4 Changed 11 days ago by AP Jama

Cc: AP Jama added
Owner: AP Jama deleted
Status: assignednew
Note: See TracTickets for help on using tickets.
Back to Top