Directual Query Language (DQL)
Use advanced search and filtering πŸ”Ž
Data structure can contain millions of objects. For searching and filtering them you can use Directual Query Language (DQL).
Example of applying DQL
Here are some examples of DQL-requests:
Request 42 is a synonym to id = "42" β€” it finds the object with ID = 42.
(title like "sun" AND year < 1950) OR is_good = "true"β€” finds objects of two groups. First: with titles similar to The Sun also rises or Under the Blood-Red Sun, and with year less then 1950. Plus second: with is_good equals true.
email like "" AND name != ""β€” finds objects with email field similar to [email protected], or [email protected], and with not empty name field.
birth_date <= "2000-04-09T00:00:00"β€” finds objects with birth_date before 9th April 2000.
Note that you have to "quote" all the values to compare with. Numbers can be compared both with quotes and without.
Copy link