Skip to main content

Drop a store

Permanently delete a store and all its contents. This is destructive and cannot be undone.

Every operation works on both Vector DB stores (you supply raw vectors) and AI stores (you supply text or images and Ahnlich AI generates the embeddings for you). Use the Vector DB / AI switch in the sample below.

Parameters

ParameterTypeDescription
storestringName of the store to delete.
error_if_not_existsbool · optionalIf true, errors when the store doesn't exist.
schemastring · optionalSchema to target. Defaults to public.

All requests accept an optional schema field. When omitted, the server uses the public schema.

Behavior

  • Removes the store and its data from the engine.
  • Pair with error_if_not_exists to make missing-store deletes a hard error.

Sample query

Python
import asyncio
from grpclib.client import Channel
from grpclib.exceptions import GRPCError
from ahnlich_client_py.grpc.services.db_service import DbServiceStub
from ahnlich_client_py.grpc.db import query as db_query
from ahnlich_client_py.grpc.db.server import Del


async def drop_store():
async with Channel(host="127.0.0.1", port=1369) as channel:
client = DbServiceStub(channel)

response = await client.drop_store(
db_query.DropStore(
store="my_store",
schema="analytics",
error_if_not_exists=True
)
)
# response contains deleted_count
if __name__ == "__main__":
asyncio.run(drop_store())

Response

A confirmation response with the deleted count.