Objectiphy
  • Introduction
  • Quick Start
  • Basic Fetching
  • Basic Saving
  • Deleting
  • Mapping Providers
    • Attributes
    • Objectiphy Mapping
    • Doctrine Mapping
  • Defining Relationships
    • One to one
    • One to Many
    • Many to one
    • Many to Many
    • Scalar Joins
  • Query Builder
    • Running a Query
    • Select Queries
    • Update Queries
    • Insert Queries
    • Delete Queries
    • Criteria
      • Operators
      • Filtering by Child Objects
      • Filtering by Aggregates
    • Joins
  • Pagination and Sorting
  • Embedded Value Objects
  • Serialization Groups
  • Late Binding and Lazy Loading
  • Streaming Results
  • Custom Repositories
  • Optimisation
  • Configuration Options
  • Mapping Overrides
  • Caching
  • Comparison with Doctrine
  • Code Generation etc.
  • Troubleshooting
  • Licence, Copyright, Credits
Powered by GitBook
On this page

Was this helpful?

  1. Query Builder
  2. Criteria

Operators

The operator for a criteria item in a query can be specified as a string, or using a class constant. For more concise syntax, the QueryBuilder class can be referred to using the alias QB, and each operator has a shorthand alias also. But you can just use the operator itself as a string if you prefer. The following operators are supported (all are case insensitive):

Operator String

Constant

Notes

=

QB::EQUALS or QB::EQ

!=

QB::NOT_EQUALS or QB::NOT_EQ

>

QB::GREATER_THAN or QB::GT

>=

QB::GREATER_THAN_OR_EQUAL_TO or QB::GTE

<

QB::LESS_THAN or QB::LT

<=

QB::LESS_THAN_OR_EQUAL_TO or QB::LTE

IN

QB::IN

Value must be an array

NOT IN

QB::NOT_IN

Value must be an array

IS

QB::IS

Value must be null

IS NOT

QB::IS_NOT

Value must be null

BETWEEN

QB::BETWEEN

Two values must be supplied (in an array)

BEGINSWITH

QB::BEGINS_WITH

ENDSWITH

QB::ENDS_WITH

CONTAINS

QB::CONTAINS

LIKE

QB::LIKE

PreviousCriteriaNextFiltering by Child Objects

Last updated 3 years ago

Was this helpful?