AbstractVectorDatabase, then connect to it and open tables.
Defining a database
ExtendAbstractVectorDatabase<DataType> and implement two getters. The type parameter must have a metadata object, which carries your custom fields through records, filters, and results.
getDatabaseUri()
Returns the URI where LanceDB stores its data: a local directory path (./data/articles.lance) or a remote/object-store URI supported by LanceDB.
The constructor
The base class constructor takes theEmbeddingModelType to use and exposes it through getEmbeddingModel(). Every model is served through OpenRouter — see Embeddings for the full list and how to pick one.
getSchema()
Returns the schema for your custom columns, using Apache Arrow data types. The id, text, and vector columns are added automatically, so you only declare the rest. The accepted types are listed in FieldValueType.
Connecting
Callconnect() before any table operation. It opens the LanceDB connection at the database URI.
getDatabase() returns the underlying LanceDB Connection. It throws a VectorDatabaseException if you call it before connect().
Opening a table
open() returns a VectorTable. If the table already exists it is opened as-is; if it does not exist, it is created with the schema and indexed automatically.
Options
The
mode option only applies when the table is being created. If a table with that name already exists, open() returns the existing table and ignores mode.The VectorDatabase starting point
VectorDatabase is a minimal, ready-to-extend AbstractVectorDatabase with an untyped Record<string, unknown> metadata schema, defaulting to the qwen3-embedding-8b embedding model. It’s what talos vector-database:create scaffolds for you — override getDatabaseUri() (and getSchema(), if you need typed fields) rather than writing AbstractVectorDatabase boilerplate from scratch.
Registering with the container
Use thedecorator.vectorDatabase() decorator to register your database class with the DI container, then resolve it anywhere.
FieldValueType
Schema fields accept these Apache Arrow types:
Null, Bool, Int8–Int64, Uint8–Uint64, Float16–Float64, Utf8, LargeUtf8, Binary, LargeBinary, Decimal, DateDay, DateMillisecond, and EmbeddingFunction.
Exceptions
VectorDatabaseException is thrown when a database operation fails, most commonly calling getDatabase() (directly or via open()) before connect(). It carries a machine-readable key (for example VECTOR_DB_NOT_CONNECTED) and a human-readable message.