ExChromaDb.Api.Operations (ex_chroma_db v0.1.0)
View SourceProvides API endpoints related to operations
Summary
Functions
Adds records to a collection.
Retrieves the number of records in a collection.
Deletes records in a collection. Can filter by IDs or metadata.
Retrieves records from a collection by ID or metadata filter.
Query a collection in a variety of ways, including vector search, metadata filtering, and full-text search
Updates records in a collection by ID.
Upserts records in a collection (create if not exists, otherwise update).
Retrieves the total number of collections in a given database.
Creates a new collection under the specified database.
Creates a new database for a given tenant.
Creates a new tenant.
Deletes a collection in a given database.
Deletes a specific database.
Retrieves a collection by ID or name.
Retrieves a specific database by name.
Returns an existing tenant by name.
Retrieves the current user's identity, tenant, and databases.
Health check endpoint that returns 200 if the server and executor are ready
Heartbeat endpoint that returns a nanosecond timestamp of the current time.
Lists all collections in the specified database.
Lists all databases for a given tenant.
Pre-flight checks endpoint reporting basic readiness info.
Reset endpoint allowing authorized users to reset the database.
Updates an existing collection's name or metadata.
Returns the version of the server.
Functions
@spec collection_add( String.t(), String.t(), String.t(), ExChromaDb.Api.AddCollectionRecordsPayload.t(), keyword() ) :: {:ok, map()} | :error
Adds records to a collection.
@spec collection_count(String.t(), String.t(), String.t(), keyword()) :: {:ok, integer()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Retrieves the number of records in a collection.
@spec collection_delete( String.t(), String.t(), String.t(), ExChromaDb.Api.DeleteCollectionRecordsPayload.t(), keyword() ) :: {:ok, map()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Deletes records in a collection. Can filter by IDs or metadata.
@spec collection_get( String.t(), String.t(), String.t(), ExChromaDb.Api.GetRequestPayload.t(), keyword() ) :: {:ok, ExChromaDb.Api.GetResponse.t()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Retrieves records from a collection by ID or metadata filter.
@spec collection_query( String.t(), String.t(), String.t(), ExChromaDb.Api.QueryRequestPayload.t(), keyword() ) :: {:ok, ExChromaDb.Api.QueryResponse.t()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Query a collection in a variety of ways, including vector search, metadata filtering, and full-text search
Options
limit
: Limit for paginationoffset
: Offset for pagination
@spec collection_update( String.t(), String.t(), String.t(), ExChromaDb.Api.UpdateCollectionRecordsPayload.t(), keyword() ) :: {:ok, map()} | :error
Updates records in a collection by ID.
@spec collection_upsert( String.t(), String.t(), String.t(), ExChromaDb.Api.UpsertCollectionRecordsPayload.t(), keyword() ) :: {:ok, map()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Upserts records in a collection (create if not exists, otherwise update).
@spec count_collections(String.t(), String.t(), keyword()) :: {:ok, integer()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Retrieves the total number of collections in a given database.
@spec create_collection( String.t(), String.t(), ExChromaDb.Api.CreateCollectionPayload.t(), keyword() ) :: {:ok, ExChromaDb.Api.Collection.t()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Creates a new collection under the specified database.
@spec create_database(String.t(), ExChromaDb.Api.CreateDatabasePayload.t(), keyword()) :: {:ok, map()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Creates a new database for a given tenant.
@spec create_tenant( ExChromaDb.Api.CreateTenantPayload.t(), keyword() ) :: {:ok, map()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Creates a new tenant.
@spec delete_collection(String.t(), String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Deletes a collection in a given database.
@spec delete_database(String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Deletes a specific database.
@spec get_collection(String.t(), String.t(), String.t(), keyword()) :: {:ok, ExChromaDb.Api.Collection.t()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Retrieves a collection by ID or name.
@spec get_database(String.t(), String.t(), keyword()) :: {:ok, ExChromaDb.Api.Database.t()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Retrieves a specific database by name.
@spec get_tenant( String.t(), keyword() ) :: {:ok, ExChromaDb.Api.GetTenantResponse.t()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Returns an existing tenant by name.
@spec get_user_identity(keyword()) :: {:ok, ExChromaDb.Api.GetUserIdentityResponse.t()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Retrieves the current user's identity, tenant, and databases.
@spec healthcheck(keyword()) :: {:ok, String.t()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Health check endpoint that returns 200 if the server and executor are ready
@spec heartbeat(keyword()) :: {:ok, ExChromaDb.Api.HeartbeatResponse.t()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Heartbeat endpoint that returns a nanosecond timestamp of the current time.
@spec list_collections(String.t(), String.t(), keyword()) :: {:ok, [ExChromaDb.Api.Vec.t()]} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Lists all collections in the specified database.
Options
limit
: Limit for paginationoffset
: Offset for pagination
@spec list_databases( String.t(), keyword() ) :: {:ok, [ExChromaDb.Api.Vec.t()]} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Lists all databases for a given tenant.
Options
limit
: Limit for paginationoffset
: Offset for pagination
@spec pre_flight_checks(keyword()) :: {:ok, ExChromaDb.Api.ChecklistResponse.t()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Pre-flight checks endpoint reporting basic readiness info.
@spec reset(keyword()) :: {:ok, boolean()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Reset endpoint allowing authorized users to reset the database.
@spec update_collection( String.t(), String.t(), String.t(), ExChromaDb.Api.UpdateCollectionPayload.t(), keyword() ) :: {:ok, map()} | {:error, ExChromaDb.Api.ErrorResponse.t()}
Updates an existing collection's name or metadata.
Returns the version of the server.