Interface: ISearchProvider
Defined in: packages/core/src/interfaces/search.interface.ts:17
Interface for translating a parsed $search expression into a SQL condition.
Implementations are adapter-specific (e.g., TypeOrmSearchProvider). Core uses this interface without importing any ORM code.
Returns null if the search cannot be applied (e.g., no searchable fields defined).
Methods
buildSearchCondition()
buildSearchCondition(
searchNode,entitySetName,alias): {condition:string;params:Record<string,unknown>; } |null
Defined in: packages/core/src/interfaces/search.interface.ts:27
Build a SQL WHERE condition fragment from a parsed $search expression.
Parameters
searchNode
The parsed $search AST node
entitySetName
string
The entity set being queried
alias
string
The query builder alias for the entity table
Returns
{ condition: string; params: Record<string, unknown>; } | null
An object with the SQL condition string and named parameters, or null if search cannot be applied