Index with functions in SQLite

Hey I need to create a complex index that requires to invoke a function...is there a way to do it with Drizzle?

I've tried doing this

export const vector_table = sqliteTable(
    'vector_table',
    {
        id: integer('id').primaryKey(),
        text: text('text'),
        vector: float_32_array('vector', { dimensions: 3 }),
    },
    () => [index('vector_table_vector_index').on(sql`libsql_vector_idx(vector\, 'metric=cosine')`)],
);

but it generates the wrong sql
Was this page helpful?