durcno@1.0.0-alpha.14
Minor Changes
-
d2a23ad - Thanks to @almahdi404 !
feat: add pgvector extension support
Adds complete pgvector extension support to Durcno, enabling vector similarity search and distance calculations.
New Features
- pgvector column type: New
pgvectorcolumns for storing and querying vector embeddings - Distance functions: L2, L1, Hamming, and cosine distance operators for vector comparisons
- Vector operations: Support for pgvector distance, similarity search, and filtering
- Index opclass support: Ability to specify custom operator classes for indexes to support pgvector and other specialized index types
Usage
Define vectors in your schema and perform similarity searches:
import { pgvector, pk, table } from "durcno";export const Records = table("public", "records", {id: pk(),embedding: pgvector.vector({ dimensions: 1536 }),});// Query with distance operationsconst results = await db.from(Records).select().where(lt(l2Distance(Records.embedding, queryVector), 1.0)) // threshold.orderBy(asc(l2Distance(Records.embedding, queryVector))).limit(10); - pgvector column type: New
-
58e60e0 - Thanks to @almahdi404 !
change(connectors): reduce default connection pool size from 10 to 5
The default maximum connection pool size (
DEFAULT_POOL_MAX) has been lowered from10to5.This change affects all connectors (
pg,postgres,pglite,bun) when no explicitpool.maxis configured. The previous default of 10 was unnecessarily high for most use cases and could exhaust database connection limits in environments with many application instances.Users who need more than 5 concurrent connections should set
pool.maxexplicitly:connector: pg({dbCredentials: { url: process.env.DATABASE_URL! },pool: { max: 10 },});