-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cube): support postgres cube #3188
base: main
Are you sure you want to change the base?
Conversation
Sorry for the build jobs -- running locally the encoding seems to be fine. Update: have been able to reproduce by using
Locally to test. Will continue to investigate. |
Have handled the text case, tests now passing |
Have made the changes to vector indexing :) |
sqlx-postgres/src/types/cube.rs
Outdated
} | ||
} | ||
|
||
impl TryFrom<&str> for PgCube { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a FromStr
impl.
It's fine to have both, but it's surprising to have a TryFrom<&str>
impl and not a FromStr
impl.
The only reason to do that is if Self
wants to borrow from the string (think zero-copy parsing) which the FromStr
trait doesn't support due to its lack of a lifetime bound.
Have made changes
|
Apologies, I've been away for a little - I've addressed all comments but if there's any other changes that are wanted let me know |
I work on a sqlx codegen tool, and had an issue posted about the lack of support for the 'cube' extension type (https://www.postgresql.org/docs/current/cube.html).
jayy-lmao/sql-gen#9
I could not see any outstanding issues / PRs involving Cube, so can create an issue first if necessary for discussion.
Not particularly attached to how to structure the struct, serialisation, or deserialisation - ultimately just want to be able to support it for my sql-gen tool so that @yellowHatpro can carry on with using it for their project.