Back to bricks list
Introduction
Technical Documentation
Other Classes
ResourceSearchBuilder SearchBuilder
Version

ResourceSearchBuilder

Search build for the resource model

:param SearchBuilder: [description] :type SearchBuilder: [type]

Attributes

entity_type: EntityType

Functions

__INIT__

Create a search build to make dynamic search

ADD_EXPRESSION
Parameters:
NameTypeDefault valueDescription
expressionExpression
Return type:
SearchBuilderType
ADD_FLAGGED_FILTER

Filter the search query by a specific flag

Parameters:
NameTypeDefault valueDescription
flaggedbool
Return type:
ResourceSearchBuilder
ADD_FOLDER_FILTER

Filter the search query by a specific folder

Parameters:
NameTypeDefault valueDescription
folder_idstr
Return type:
ResourceSearchBuilder
ADD_IS_ARCHIVED_FILTER

Filter the search query by a specific archived status

Parameters:
NameTypeDefault valueDescription
is_archivedbool
Return type:
ResourceSearchBuilder
ADD_JOIN
Parameters:
NameTypeDefault valueDescription
tableType
onExpression
Return type:
SearchBuilderType
ADD_NAME_FILTER

Filter the search query by a specific name

Parameters:
NameTypeDefault valueDescription
namestr
Return type:
ResourceSearchBuilder
ADD_ORDERING
Parameters:
NameTypeDefault valueDescription
orderOrdering
Return type:
SearchBuilderType
ADD_ORIGIN_FILTER

Filter the search query by a specific origin

Parameters:
NameTypeDefault valueDescription
originResourceOrigin
Return type:
ResourceSearchBuilder
ADD_PARENT_FILTER

Filter the search query by a specific parent

Parameters:
NameTypeDefault valueDescription
parent_idstr
Return type:
ResourceSearchBuilder
ADD_RESOURCE_TYPE_FILTER

Filter the search query by a specific resource type

Parameters:
NameTypeDefault valueDescription
resource_typeType
Return type:
ResourceSearchBuilder
ADD_RESOURCE_TYPING_NAME_FILTER

Filter the search query by a specific resource typing name

Parameters:
NameTypeDefault valueDescription
resource_typing_namestr
Return type:
ResourceSearchBuilder
ADD_SEARCH_PARAMS
Parameters:
NameTypeDefault valueDescription
searchSearchParams
Return type:
SearchBuilderType
ADD_TAG_FILTER
Parameters:
NameTypeDefault valueDescription
tagTag
value_operatorSearchOperator SearchOperator.EQ
error_if_key_not_existsbool False
Return type:
SearchBuilderType
CONVERT_FILTER_TO_EXPRESSION
Parameters:
NameTypeDefault valueDescription
filter_SearchFilterCriteria
Return type:
Expression
CONVERT_ORDER_TO_PEEWEE_ORDERING

Convert a search order criteria to a peewee ordering

Parameters:
NameTypeDefault valueDescription
orderSearchSortCriteria
Return type:
Ordering
CONVERT_VALUE

Method to convert the search value (or values) to type of field

Parameters:
NameTypeDefault valueDescription
fieldField
valueAny
Return type:
Any
SEARCH_ALL
Return type:
List
SEARCH_PAGE
Parameters:
NameTypeDefault valueDescription
pageint 0
number_of_items_per_pageint 20
Return type:
Paginator
SET_ORDERING
Parameters:
NameTypeDefault valueDescription
ordersList
Return type:
SearchBuilderType