---
source: cli/src/handlers/smoke_tests.rs
expression: "String::from_utf8(stdout.0.clone()).unwrap()"
---
Dynamic playlists are playlists that are generated based on a query.

The syntax for queries is as follows:

```bnf
<query> ::= <clause>

<clause> ::= <compound> | <leaf>

<compound> ::= (<clause> (" OR " | " AND ") <clause>)

<leaf> ::= <value> <operator> <value>

<value> ::= <string> | <int> | <set> | <field>

<field> ::= "title" | "artist" | "album" | "album_artist" | "genre" | "release_year"

<operator> ::= "=" | "!=" | "?=" | "*=" | ">" | ">=" | "<" | "<=" | "~" | "!~" | "?~" | "*~" | "IN" | "NOT IN" | "CONTAINS" | "CONTAINSNOT" | "CONTAINSALL" | "CONTAINSANY" | "CONTAINSNONE"

<string> ::= <quote> {{ <char> }} <quote>

<set> ::= '[' <value> {{ ", " <value> }} ']' | '[' ']'

<quote> ::= '"' | "'"

<int> ::= <digit> {{ <digit> }}
```
