Skip to content

Latest commit

 

History

History
63 lines (46 loc) · 1.38 KB

mysql-dialect-evaluating.md

File metadata and controls

63 lines (46 loc) · 1.38 KB

MySQL Dialect

The MySQL dialect is not yet available. The examples provided illustrate what the output would look like if a MySQL dialect were implemented. The results are intentionally generated using non-official expressions to highlight the differences that occur when applying the same criteria expression across different dialects.

We are currently working on the official MySQL dialect. In the meantime, you can use the SQL dialect to implement your own MySQL dialect.

For these examples we will use the defined expressions in the Defining Criteria Expressions document.

expr[MySQL]
// res: ((field1 <<< '3') AND (field2 <<< '4')) OR (field3 = 'c')

Case of use

ageCriteria[MySQL]
// res: ((age > '18') AND (age < '65'))
refCriteria[MySQL]("id", UUID.randomUUID())
// res: id = '07715cee-5d87-427d-99a7-cc03f2b5ef4a'

Using IS NULL expression

isNullExpr[MySQL]("field")
// res: field IS NULL

Using NOT expression

notExpr[Mysql]("field")
// res: (NOT (field > '2')) AND (field <= '10')

Using BETWEEN expression

betweenExpr[MySQL]("field")
// res: field BETWEEN 100 AND 150

Using ARRAY expression

arrayExpr[MySQL]("field")
// res: field IN (1, 2, 3)

Using LIKE expression

likeExpr[MySQL]("field")
// res: field LIKE 'a%'