-
Hi, pg_vector postgres extension offers sqlx support. When I try to create a column of the #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "example")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
// does not help - #[sea_orm(column_type = "custom(\"vector\")")]
pub vector: pgvector::Vector,
}
Is it possible to support types with sqlX support? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
Hey @alexpusch, is it possible to define it as |
Beta Was this translation helpful? Give feedback.
-
@billy1624 trying to just use it with |
Beta Was this translation helpful? Give feedback.
-
@billy1624 I've noticed that some support was added sea-query in SeaQL/sea-query#774 Are there plans to improve vector column support? #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "example")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
#[sea_orm(column_type = "custom(\"vector\")")]
pub vector: String,
} |
Beta Was this translation helpful? Give feedback.
-
I have written a short article on how to use pgVector with SeaORM. Maybe this is useful to people that end up here 🙂 https://cosminsanda.com/posts/using-pgvector-with-seaorm-in-rust/ |
Beta Was this translation helpful? Give feedback.
-
Released! https://github.com/SeaQL/sea-orm/releases/tag/1.1.6 https://github.com/SeaQL/sea-orm/blob/master/tests/embedding_tests.rs |
Beta Was this translation helpful? Give feedback.
Released! https://github.com/SeaQL/sea-orm/releases/tag/1.1.6
https://github.com/SeaQL/sea-orm/blob/master/tests/embedding_tests.rs