1.0.11 • Published 5 months ago

@useverk/drizzle-pgvector v1.0.11

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

Do

npm install @useverk/drizzle-pgvector

or

yarn add @useverk/drizzle-pgvector

or

pnpm add @useverk/drizzle-pgvector

And then in your code:

import { customVector } from '@useverk/drizzle-pgvector'
export const myTable = pgTable(
  'mytable',
  {
    ...
    embedding: customVector('embedding', { dimensions: 1536 }),
    ...
  })

Known issues

  • running drizzle-kit generate will generate the following sql migration file:

    CREATE TABLE IF NOT EXISTS "myTable" (
    "id" serial PRIMARY KEY NOT NULL,
    "vector" "vector(1536)"
    );

    which is not valid postgresql syntax. Simply remove the quotes around the type name to fix it. The correct syntax is:

    CREATE TABLE IF NOT EXISTS "myTable" (
    "id" serial PRIMARY KEY NOT NULL,
    "vector" vector(1536)
    );

    Will fix this once drizzle-kit is open-source.

1.0.9

5 months ago

1.0.8

5 months ago

1.0.11

5 months ago

1.0.10

5 months ago

1.0.7

6 months ago

1.0.6

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago