1.9.0 • Published 3 years ago

@kfarranger/middleware v1.9.0

Weekly downloads
4
License
AGPL-3.0-or-later
Repository
github
Last release
3 years ago

SQON Filters

Arranger uses a custom JSON object format for filtering that is called SQON (pronounced like "Scone"). SQON provides a flexible system for combining many different filters.

A SQON object consists of nested objects of two types: Operations and Values.

Operation objects apply boolean logic to a list of operation objects. They are of the form:

Combination Operation (aka, Boolean Operation) which groups one or more filters

{
  "op":"", //Operation to apply to content ["and", "or", "not"]
  "content":[] //List of Operation objects that the boolean operation will apply to
}

OR

Field Operation that applies to a filter to Value Object

{
  "op":"", //Operation to apply to content ["in", "<=", ">="]
  "content":{} //Value object specifying the field and list of values that the field must be "in" or "not-in"
}

Value objects specify a list the field name and values for it that the wrapping . This filter can specify to include or exclude fields with any of the listed values. It will have the following format:

{
  "field":"", //name of the field this operation applies to
  "value":[] //List of values for the field if using the "in" operation, or a scalar value for ">=" and "<=" operations
}

The top level of a SQON must always be a Combination Operation, even if only a single filter is being applied.

1.9.0

3 years ago

1.8.1

3 years ago

1.8.0

3 years ago

1.7.0

4 years ago

1.6.0

4 years ago

1.5.2

4 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.0

5 years ago