Replies: 1 comment
-
Found a cheat/workaround for now by creating defining a struct and implementing Example to render: ((CAST(JSON_KEYS(`option_set_refs`) AS char(255) array))) I use: struct JsonKeysRefIndexExpr(&'static str);
impl Iden for JsonKeysRefIndexExpr {
fn prepare(&self, s: &mut dyn std::fmt::Write, q: sq::Quote) {
write!(s, "{}", self.quoted(q)).unwrap();
}
fn quoted(&self, q: sq::Quote) -> String {
format!(
"(CAST(JSON_KEYS({}) AS char(255) array))",
iden(self.0).quoted(q)
)
}
fn unquoted(&self, s: &mut dyn std::fmt::Write) {
write!(s, "(CAST(JSON_KEYS({}) AS char(255) array))", self.0).unwrap();
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In MySQL 8.0.17+, there's now support for indices defined on expressions.
This is currently used on MySQL's multi valued index.
Sample schema:
Taken from: mysql docs
Currently, sea-query only supports indices on column names.
Beta Was this translation helpful? Give feedback.
All reactions