mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
feat: add pg_trgm extension in PGlite constructor
This commit is contained in:
parent
8bc8712cf3
commit
b5aefdd93e
1 changed files with 2 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { PGlite } from '@electric-sql/pglite';
|
||||
import { pg_trgm } from '@electric-sql/pglite/contrib/pg_trgm';
|
||||
import { PgliteDialect } from '@soapbox/kysely-pglite';
|
||||
import { Kysely } from 'kysely';
|
||||
|
||||
|
|
@ -10,7 +11,7 @@ export class DittoPglite {
|
|||
static create(databaseUrl: string): DittoDatabase {
|
||||
const kysely = new Kysely<DittoTables>({
|
||||
dialect: new PgliteDialect({
|
||||
database: new PGlite(databaseUrl),
|
||||
database: new PGlite(databaseUrl, { extensions: { pg_trgm } }),
|
||||
}),
|
||||
log: KyselyLogger,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue