-
BackendPostgreSQL Diesel version2.3.2 Diesel Featurespostgres Operating System VersionFedora Linux 42 (COSMIC) x86_64 Third party librariesNo response What do you want to do?I'm currently implementing the conversion of a vector to a half-vector using the pgvector extension. I managed to output this It is possible to achieve with diesel ? Compile time errorNo response What code do you already have?impl KnownCastSqlTypeName<Pg> for HalfVectorType {
const SQL_TYPE_NAME: &'static str = "halfvec";
}
impl FallibleCastsTo<HalfVectorType> for Vector {}
impl CastsTo<HalfVectorType> for Vector {}The work in question is here: Additional detailsNo response Checklist
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Yes that's not supported by the built-in cast operator. You should likely define your own query DSL extension for that. The code generated by |
Beta Was this translation helpful? Give feedback.
Yes that's not supported by the built-in cast operator. You should likely define your own query DSL extension for that. The code generated by
diesel::infix_operator!might be a good starting point for that, although that macro also cannot completely handle this case out of the box.