Skip to content
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

Add option to specify the schema for the table #26

Merged
merged 1 commit into from
Aug 22, 2024
Merged

Conversation

cevian
Copy link
Collaborator

@cevian cevian commented Aug 19, 2024

No description provided.

@jgpruitt jgpruitt self-requested a review August 19, 2024 21:23
Copy link
Collaborator

@jgpruitt jgpruitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the doc comments need updating. Missing the schema parameter.

@@ -80,6 +80,9 @@ The client constructor takes three required arguments:
| table_name | Name of the table to use for storing the embeddings. Think of this as the collection name |
| num_dimensions | Number of dimensions in the vector |

You can also specify the schema name, distance type, primary key type,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not adding it to the table above with a column marking it as optional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to keep this part as simple as possible

@@ -805,7 +820,7 @@ def __init__(
The type of the id column. Can be either 'UUID' or 'TEXT'.
"""
self.builder = QueryBuilder(
table_name, num_dimensions, distance_type, id_type, time_partition_interval, infer_filters)
table_name, num_dimensions, distance_type, id_type, time_partition_interval, infer_filters, schema_name)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add schema_name to the docs. Would it make it easier if instead of None we default to "public"? That way we don't have to do the if self.schema_name is not None checks.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None and public are not the same since public is not always the default schema. None means use the default schema defined by the db

@@ -787,6 +801,7 @@ def __init__(
time_partition_interval: Optional[timedelta] = None,
max_db_connections: Optional[int] = None,
infer_filters: bool = True,
schema_name: Optional[str] = None,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add this to the constructor docs

@cevian cevian merged commit c6c74c4 into main Aug 22, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants