type_bridge.crud.lookup¶
lookup
¶
Unified lookup parsing utilities.
This module provides parsing for Django-style lookup filters (e.g. age__gt=30).
Used by TypeDBManager and TypeDBQuery for filter expressions.
build_lookup_expression
¶
Build an Expression for the given lookup operator.
Delegates to Attribute type methods for type-specific logic.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
attr_type
|
type[Attribute]
|
The attribute type class |
required |
lookup
|
str
|
Lookup operator (exact, gt, gte, lt, lte, in, isnull, contains, etc.) |
required |
value
|
Any
|
The filter value |
required |
Returns:
| Type | Description |
|---|---|
Expression
|
Expression object |
Raises:
| Type | Description |
|---|---|
ValueError
|
If unsupported lookup or type mismatch |