Skip to content

Commit 4321055

Browse files
committed
docs(database): Clarify terminology in database README
1 parent 9d185a7 commit 4321055

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/vectorcode/database/README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ To add support for a new database backend, you'd need to:
3636
> and [the `ChromaDB0Connector`](./chroma0.py) implementations as reference designs of
3737
> a new database connector.
3838
39-
In the following sections, I'll use _database_ to refer to the actual database (chromadb,
40-
pgvector, etc.) that holds the data and performs the CRUD operations, and _connector_ to
41-
refer to our compatibility layer (child classes of
39+
In the following sections, I'll use the term _database_ to refer to the actual database
40+
backends (chromadb, pgvector, etc.) that holds the data and performs the CRUD operations,
41+
and the term _connector_ to refer to our compatibility layer (child classes of
4242
`vectorcode.database.base.DatabaseConnectorBase`).
4343

4444
## Connector Configuration
@@ -80,3 +80,10 @@ database operation (`query()`, `vectorise()`, `list()`, etc.) should read the ne
8080
parameters (`project_root`, file paths, query keywords, etc.) from the `self._configs`
8181
attribute. Note that the `self._configs` attribute is mutable, so you should always read
8282
the parameters from it directly for each of the operations.
83+
84+
> Some methods support keyword arguments that allows temporarily overriding some
85+
> parameters. For example, the `list_collection_content` method supports overriding
86+
> `self._configs` by passing `_collection_id` and `collection_path`. The idea is that
87+
> these methods can usually be used by the implementation of other methods or subcommands
88+
> (for example, `list_collection_content` is used in `count` and `check_orphanes`),
89+
> and being able to pass such parameters are convenient when writing those implementations.

0 commit comments

Comments
 (0)