Index().using() doesnt exist Drizzle ORM 0.38.2

https://orm.drizzle.team/docs/indexes-constraints#indexes According to the docs, this query should be available to add to my schema after 0.31
index('name')
.using('btree', table.column1.asc(), sql`lower(${table.column2})`, table.column1.op('text_ops'))
.where(sql``) // sql expression
.with({ fillfactor: '70' })
index('name')
.using('btree', table.column1.asc(), sql`lower(${table.column2})`, table.column1.op('text_ops'))
.where(sql``) // sql expression
.with({ fillfactor: '70' })
but the .using function does not exist, even in the node module? im trying to implement the following rawsql index for Libsql Vectors
CREATE INDEX IF NOT EXISTS vector_index
ON table_with_vector(vector_column) >> changed names
USING vector_cosine(3)
CREATE INDEX IF NOT EXISTS vector_index
ON table_with_vector(vector_column) >> changed names
USING vector_cosine(3)
Drizzle ORM - Indexes & Constraints
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
4 Replies
TOSL
TOSL3w ago
This is for index creation not querying. I think maybe that's just a mistake that's you written in that. Make sure drizzle-kit is also on latest version.
AldiBoi
AldiBoiOP3w ago
Of course, I used the wrong word, I did mean schema creation, but this is an issue i am having with drizzle 0.38.2 for schema creation, as seen in the title i am well passed the supposed release of this feature.
Mario564
Mario5643w ago
The syntax you're using I believe is only available in Postgres right now. SQLite has some but not all those methods mentioned in the documentation You can feel free to open an issue about it in the Drizzle ORM repo so we can keep track of it
AldiBoi
AldiBoiOP3w ago
Ahh yes looking into the sqlite docs im confused as to why Turso recommends such a rare function to create the index in the drizzle schema, when in their normal docs USING is nowhere to be found

Did you find this page helpful?