OptionalfilterFilter expression to limit which objects are returned.
Build complex filter criteria using Expression with operators like AND, OR, NOT, and comparison operators. Leave undefined to load all objects.
import { LoadOptions, Operator } from '@limetech/lime-web-components';
const options: LoadOptions = {
filter: {
key: 'status',
op: Operator.EQUALS,
exp: 'active',
},
};
import { LoadOptions, Operator } from '@limetech/lime-web-components';
const options: LoadOptions = {
filter: {
op: Operator.AND,
exp: [
{ key: 'status', op: Operator.EQUALS, exp: 'active' },
{
op: Operator.OR,
exp: [
{ key: 'priority', op: Operator.EQUALS, exp: 'high' },
{ key: 'value', op: Operator.GREATER, exp: 50_000 },
],
},
],
},
};
Optional AlphaincludeWhether to include totals (totalCount, totalRelations, aggregates) in
the response. Set to false to skip the extra COUNT query on the server,
which can significantly improve performance for large datasets.
When false, totalCount and totalRelations will be null in the
response. Use a separate request with limit: 0 to fetch totals
without object data.
Maps to the ?includeTotals=false query parameter. Defaults to true.
OptionallimitMaximum number of objects to load.
Use this with offset for pagination. If omitted, a default limit will be applied by the backend.
OptionaloffsetNumber of objects to skip before starting to return results.
Use this with limit for pagination. For example, limit=50 and offset=100 will return objects 101-150.
OptionalorderProperties to sort results by.
Specify one or more properties with their sort direction (ASC or DESC). Objects will be sorted in the order specified, with earlier entries taking precedence.
OptionalpropertiesProperties to load on the objects.
Specify which properties to include in the loaded objects. This can improve performance by only loading needed data. Can include:
If omitted, all properties will be loaded.
import { LoadOptions } from '@limetech/lime-web-components';
const options: LoadOptions = {
properties: ['name', 'status', 'value', 'company.name'],
};
import { AggregateOperator, LoadOptions } from '@limetech/lime-web-components';
const options: LoadOptions = {
properties: [
'name',
'value',
{
name: 'deals.value',
key: 'total_deal_value',
operator: AggregateOperator.Sum,
},
],
};
AggregateProperty for aggregate definitions
Options for loading objects from the Lime CRM database.
LoadOptions defines how to query objects when using LimeObjectRepository methods like loadObjects and loadRelations. Supports filtering, sorting, pagination, and selecting specific properties to load.
This provides a simpler interface compared to Query, with automatic state management and integration with the component platform.
Example: Filter, sort, and limit a query
See