Lime Web Components API Documentation - v7.4.0
    Preparing search index...

    Type Alias InExpression

    IN expression that checks if a property matches any value in a list.

    Tests whether a property's value equals any value in an array of possible values. This is more efficient than using multiple OR expressions when checking against multiple possible values.

    Equivalent to SQL's WHERE property IN (value1, value2, value3) or multiple OR conditions like property = value1 OR property = value2 OR property = value3.

    import { InExpression, Operator } from '@limetech/lime-web-components';

    const stillInProgress: InExpression = {
    key: 'status',
    op: Operator.IN,
    exp: ['open', 'in_progress', 'waiting_for_approval'],
    };
    import { InExpression, Operator } from '@limetech/lime-web-components';

    const inMajorCities: InExpression = {
    key: 'city',
    op: Operator.IN,
    exp: ['Stockholm', 'Gothenburg', 'Malmö'],
    };
    import { InExpression, Operator } from '@limetech/lime-web-components';

    const specificIds: InExpression = {
    key: 'id',
    op: Operator.IN,
    exp: [123, 456, 789],
    };
    import { Expression, Operator } from '@limetech/lime-web-components';

    const activeAndOwnedBySpecificUsers: Expression = {
    op: Operator.AND,
    exp: [
    { key: 'status', op: Operator.EQUALS, exp: 'active' },
    { key: 'owner', op: Operator.IN, exp: [101, 102, 103] },
    ],
    };
    type InExpression = {
        exp: ExpressionValue[];
        key: string;
        op: IN;
    }
    Index

    Properties

    Properties

    Array of possible values to match against.

    key: string

    Name of the property to check.

    op: IN

    IN operator.