Meta tags:
description= Lightweight WASM Postgres;
Headings (most frequently used words):
orm, prisma, and, query, builder, support, about, docs, extensions, reference, drizzle, kysely, knex, js, orange, typeorm, framework, hooks, pglite, tools, local, development, with, dev,
Text of the page (most frequently used words):
pglite (48), and (19), #prisma (19), the (18), with (14), orm (14), knex (14), const (12), query (12), kysely (12), #typeorm (11), from (11), electric (10), for (10), import (10), sql (10), drizzle (10), new (9), await (8), orange (8), postgres (7), npm (7), use (7), builder (7), support (7), documentation (6), can (6), instance (6), bash (6), database (6), dev (6), sync (5), using (5), more (5), details (5), you (5), your (5), features (5), include (5), done (5), task (5), docs (5), string (5), api (5), client (5), local (5), type (4), dialect (4), key (4), title (4), column (4), map (4), typescript (4), see (4), pglitedialect (4), page (3), repl (3), getpgliteinstance (3), driver (3), pglitedriver (3), javascript (3), add (3), library (3), project (3), many (3), create (3), then (3), built (3), migrations (3), builders (3), user (3), npx (3), development (3), component (2), check (2), function (2), datasource (2), just (2), data (2), third (2), party (2), migration (2), generation (2), relational (2), model (2), that (2), run (2), browser (2), tasks (2), log (2), console (2), false (2), boolean (2), primary (2), uuid (2), table (2), default (2), idb (2), models (2), active (2), record (2), style (2), rich (2), modern (2), first (2), runs (2), node (2), connection (2), clientpglite (2), queries (2), schema (2), path (2), person (2), end (2), databases (2), including (2), safe (2), users (2), email (2), prismaclient (2), database_url (2), this (2), orms (2), extensions (2), about (2), navigation (2), dual, licensed, under, postgresql, license, apache, next, previous, pager, pglitedb, access, internal, pglitedatasource, works, existing, provide, source, option, elegant, syntax, flexible, powerful, querybuilder, automatic, eager, lazy, associations, relations, clean, object, nodejs, other, platforms, stringify, json, where, getall, write, insert, text, gen_random_uuid, not, exists, seamless, integration, across, runtimes, fully, typed, zero, code, change, tracking, querying, deep, filtering, bun, deno, follows, pattern, ships, expressive, linq, now, connectionstring, export, setup, regular, tool, raw, stable, reliable, various, engines, pgdata, also, async, which, case, created, lazily, time, execute, selectall, selectfrom, people, interface, https, generating, types, install, alongside, since, ddl, too, cancellable, pluggable, hookable, composable, predictable, escape, fluent, safety, autocompletion, select, kit, wrap, call, like, declarative, findmany, alice, example, com, push, name, unique, autoincrement, int, define, usual, localhost, port, api_key, __api_key__, starts, backed, copy, shown, cli, init, offers, powered, includes, via, following, are, known, work, properly, debugging, benchmarks, examples, reference, extension, catalog, upgrade, locale, prepopulated, pgdump, package, tools, socket, multi, tab, worker, bundler, vue, react, framework, hooks, filesystems, live, getting, started, videos, what, sidebar, return, top, menu, github, home, main, search, skip, content,
Text of the page (random words):
orm and query builder support pglite skip to content search k main navigation home about docs repl electric github npm menu return to top sidebar navigation about what is pglite videos docs getting started pglite api live queries filesystems framework hooks react vue bundler support multi tab worker repl component orms query builders sync using postgres sync pglite socket pglite tools package pgdump prepopulated fs locale support upgrade path extensions extensions catalog extension development reference examples benchmarks debugging on this page orm and query builder support the following orms and query builders are known to work properly with pglite prisma prisma is a modern type safe orm for typescript and node js prisma includes built in support for local development using pglite via prisma dev local development with prisma dev prisma offers a local dev database powered by pglite just run bash npx prisma init npx prisma dev this starts a local prisma postgres instance backed by pglite copy the connection string shown in the cli and use it as your database_url database_url prisma postgres localhost port api_key __api_key__ you can then define models in your schema prisma and use prisma client and migrations as usual prisma model user id int id default autoincrement email string unique name string bash npx prisma db push ts import prismaclient from prisma client const prisma new prismaclient await prisma user create data email alice example com const users await prisma user findmany console log users see the prisma local dev docs for more details drizzle drizzle is a typescript orm with support for many databases including pglite features include a declarative relational query api an sql like query builder api migrations to use pglite with drizzle wrap you pglite instance with a drizzle call sh npm i drizzle orm electric sql pglite npm i d drizzle kit ts import pglite from electric sql pglite import drizzle from drizzle orm pglite const client new pglite const db drizzle client await db select from see the drizzle documentation for more details kysely kysely is a type safe typescript sql query builder with support for many databases including pglite features include end to end type safety and autocompletion composable predictable escape rich fluent api cancellable pluggable hookable migrations and ddl builders too built in pglite dialect since kysely 0 29 0 to use kysely with pglite install kysely 0 29 alongside electric sql pglite bash npm i electric sql pglite kysely then create a kysely instance using the built in pglitedialect ts import pglite from electric sql pglite import kysely pglitedialect from kysely see https kysely dev docs generating types interface database person id string const db new kysely database dialect new pglitedialect pglite new pglite const people await db selectfrom person selectall execute pglite can also be a function sync or async in which case the pglite instance is created lazily the first time a query runs ts new pglitedialect pglite new pglite path to pgdata see the kysely documentation for more details knex js knex is a stable reliable query builder for various database engines key features include query builder schema builder raw queries database migration tool to use knex js with pglite add knex and the third party knex pglite library to your project bash npm i electric sql pglite knex knex pglite then you can setup a regular knex instance javascript import knex from knex import clientpglite from knex pglite export const db knex client clientpglite dialect postgres connection connectionstring idb my database now you can check knex documentation and knex pglite documentation for more details orange orm orange orm is a modern typescript first orm that runs in node js bun deno and the browser it follows the active record pattern and ships with an expressive linq style query api key features include rich querying and deep filtering active record style change tracking fully typed models with zero code generation seamless integration with pglite across runtimes to use orange orm with pglite add orange orm library to your project bash npm i electric sql pglite orange orm javascript import orange from orange orm const db map pglite idb my db await db query create table if not exists task id uuid primary key default gen_random_uuid title text done boolean const map orange map x task x table task map column id column id uuid primary title column title string done column done boolean await db task insert title write docs done false const tasks await db task getall where x x done eq false console log json stringify tasks typeorm typeorm is an orm that can run in nodejs the browser and many other platforms key features include clean object relational model eager and lazy associations relations automatic migration generation elegant syntax flexible and powerful querybuilder to use typeorm with pglite add the third party typeorm pglite library to your project bash npm i electric sql pglite typeorm pglite typeorm pglite works with typeorm s existing postgres dialect just provide the pglitedriver to the driver data source option javascript import pglitedriver getpgliteinstance from typeorm pglite import datasource from typeorm const pglitedatasource new datasource type postgres driver new pglitedriver driver you can access the internal pglite instance using getpgliteinstance function const pglitedb await getpgliteinstance check typeorm documentation and typeorm pglite documentation for more details pager previous page repl component next page sync using postgres sync dual licensed under apache 2 0 and the postgresql license electric
|