vecs icon indicating copy to clipboard operation
vecs copied to clipboard

Feat: add support for initializing vecs client with custom schema

Open majamil16 opened this issue 2 years ago • 9 comments

What kind of change does this PR introduce?

Feature: add support for connecting to a user-specified database schema (instead of hard-coding vecs).

This was accomplished by adding the schema argument to the Client class and replacing all hard-coded references to schema vecs.

Also added schema parameter to create_client method. For backwards compatibility, it still defaults to vecs.

What is the current behavior?

Currently, the client defaults to schema vecs. Users may want to place vecs collections under a schema according to their own naming conventions.

Addresses #62

Please link any relevant issues here.

What is the new behavior?

Users can now instantiate a Client instance with a custom schema. For example:

DB_CONNECTION = "postgresql://<user>:<password>@<host>:<port>/<db_name>"

# create vector store client
vx = vecs.create_client(DB_CONNECTION, schema="my_schema")

Additional context

Add any other context or screenshots.

Test coverage attached Screen Shot 2023-12-06 at 9 32 26 PM

majamil16 avatar Dec 07 '23 02:12 majamil16

@olirice thanks for the feedback! sure, I'm definitely up to implement that change.

majamil16 avatar Dec 12 '23 16:12 majamil16

hey @olirice, made some updates. let me know your thoughts, thanks!

majamil16 avatar Jan 15 '24 16:01 majamil16

looks great. if we can address those last few concerns this will merge

olirice avatar Jan 16 '24 20:01 olirice

I'm looking forward to this PR being merged!

yusofy avatar Feb 04 '24 21:02 yusofy

hey, thanks @olirice for the review! will finish this up this week

majamil16 avatar Feb 07 '24 21:02 majamil16

Hi Guys !

Any news about it ?

rodrezende avatar Mar 17 '25 05:03 rodrezende