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: Add vector as column type to postgres #10138
base: master
Are you sure you want to change the base?
Conversation
Since |
Added a note in the English docs |
Hello @hinogi, it would be great to have such a feature in a new release, when can we expect it? |
This feature is needed but this PR is incomplete. It doesn't support passing dimensions, using indexes for approximate search, installing the extension automatically or have any tests. |
I am not a maintainer, I just try to help out with additional code reviews and stuff. |
please merge this PR, I need the feature and forking isn't working! |
@strongpauly please update Postgres column types test with the new type to make sure synchronization works as expected |
Would be nice if you also update Postgres driver to install the extention automatically. |
any news on this? |
Sorry, I can do nothing. |
I created this PR because it was a simple change that I was already hacking in in my codebase. However, the requested additions require more time than I can devote at the moment. Apologies. Feel free to take what I've started and expand upon it. |
@strongpauly how did you hack it? I'm getting this error:
|
import { ColumnType, DataSource, DataSourceOptions } from 'typeorm';
export const dataSourceFactory = (options?: DataSourceOptions): DataSource => {
const dataSource = new DataSource(options);
dataSource.driver.supportedDataTypes.push('vector' as ColumnType);
dataSource.driver.withLengthColumnTypes.push('vector' as ColumnType);
return dataSource;
}; |
Comments in this PR must be addressed before it can be merged. |
what's the status of this one would love to see this in typeorm! ❤️ |
@lukasholzer I have been using a build from my branch via #10789 which works quite well for my usecases. I won't be able to update my code any more since I have moved on from typeorm to another ORM because of various issues, but anyone's free to spin off from it if they like. |
@firtoz thanks so much! Out of curiosity which ORM did you choose and why? MikroORM? |
@lukasholzer trying out drizzle for now, the community and the repo feels active, may consider prisma if it doesn't work out |
Description of change
Added vector as column type to postgres
Fixes #10056
Pull-Request Checklist
master
branchnpm run format
to apply prettier formattingnpm run test
passes with this change: N/AFixes #10056