vapor / fluent-mysql-driver

🖋🐬 Swift ORM (queries, models, relations, etc) built on MySQL.
MIT License
78 stars 52 forks source link

[question] It is possible to use JSON_CONTAINS? #140

Closed Stajor closed 4 years ago

Stajor commented 5 years ago

MySQL 8 Property in my model

var week_days: [Int]

Data in MySQL looks like:

[3,4,5]

field data type JSON

tanner0101 commented 4 years ago

This is possible using sql(raw:), see https://docs.vapor.codes/4.0/fluent/advanced/#sql-custom