[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-encore-encore-database":3,"mdc--6ib3o7-key":37,"related-repo-encore-encore-database":3692,"related-org-encore-encore-database":3788},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":24,"repoUrl":25,"updatedAt":26,"license":27,"forks":28,"topics":29,"repo":32,"sourceUrl":35,"mdContent":36},"encore-database","build Encore databases","Work with PostgreSQL in Encore.ts using `SQLDatabase` from `encore.dev\u002Fstorage\u002Fsqldb` — schema migrations and SQL queries.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"encore","Encore","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fencore.png","encoredev",[13,17,18,21],{"name":14,"slug":15,"type":16},"TypeScript","typescript","tag",{"name":9,"slug":8,"type":16},{"name":19,"slug":20,"type":16},"Database","database",{"name":22,"slug":23,"type":16},"ORM","orm",26,"https:\u002F\u002Fgithub.com\u002Fencoredev\u002Fskills","2026-04-06T18:09:54.823017",null,5,[30,31],"claude-code","skills",{"repoUrl":25,"stars":24,"forks":28,"topics":33,"description":34},[30,31],"Agent Skills for development with Encore.","https:\u002F\u002Fgithub.com\u002Fencoredev\u002Fskills\u002Ftree\u002FHEAD\u002Fencore\u002Fdatabase","---\nname: encore-database\ndescription: Work with PostgreSQL in Encore.ts using `SQLDatabase` from `encore.dev\u002Fstorage\u002Fsqldb` — schema migrations and SQL queries.\nwhen_to_use: >-\n  User wants to add a database table, write a migration, run a SQL query, insert\u002Fupdate\u002Fdelete rows, set up Drizzle or Prisma against an Encore database, or design a relational schema. Covers `new SQLDatabase(...)`, `db.query`, `db.queryRow`, `db.exec`, the `migrations\u002F` directory, `*.up.sql` files, sequential migration numbering, and ORM integration via `db.connectionString`. Trigger phrases: \"Postgres table\", \"user_sessions table\", \"SQL\", \"migration\", \"queryRow\", \"INSERT\", \"SELECT\", \"schema\", \"Drizzle\", \"Prisma\".\n---\n\n# Encore Database Operations\n\n## Instructions\n\n### Database Setup\n\n```typescript\nimport { SQLDatabase } from \"encore.dev\u002Fstorage\u002Fsqldb\";\n\nconst db = new SQLDatabase(\"mydb\", {\n  migrations: \".\u002Fmigrations\",\n});\n```\n\n## Query Methods\n\nEncore provides several query methods:\n\n### `query` - Multiple Rows\n\nReturns an async iterator for multiple rows:\n\n```typescript\ninterface User {\n  id: string;\n  email: string;\n  name: string;\n}\n\nconst rows = await db.query\u003CUser>`\n  SELECT id, email, name FROM users WHERE active = true\n`;\n\nconst users: User[] = [];\nfor await (const row of rows) {\n  users.push(row);\n}\n```\n\n### `queryAll` - All Rows as Array\n\nReturns all rows as an array (convenience wrapper around `query`):\n\n```typescript\nconst users = await db.queryAll\u003CUser>`\n  SELECT id, email, name FROM users WHERE active = true\n`;\n\u002F\u002F users is User[]\n```\n\n### `queryRow` - Single Row\n\nReturns one row or null:\n\n```typescript\nconst user = await db.queryRow\u003CUser>`\n  SELECT id, email, name FROM users WHERE id = ${userId}\n`;\n\nif (!user) {\n  throw APIError.notFound(\"user not found\");\n}\n```\n\n### `exec` - No Return Value\n\nFor INSERT, UPDATE, DELETE operations:\n\n```typescript\nawait db.exec`\n  INSERT INTO users (id, email, name)\n  VALUES (${id}, ${email}, ${name})\n`;\n\nawait db.exec`\n  UPDATE users SET name = ${newName} WHERE id = ${id}\n`;\n\nawait db.exec`\n  DELETE FROM users WHERE id = ${id}\n`;\n```\n\n### Raw Query Methods\n\nUse raw SQL strings with positional parameters (`$1`, `$2`, etc.) instead of template literals:\n\n```typescript\n\u002F\u002F Raw query returning multiple rows\nconst rows = await db.rawQuery\u003CUser>(\"SELECT * FROM users WHERE active = $1\", true);\n\n\u002F\u002F Raw query returning single row\nconst user = await db.rawQueryRow\u003CUser>(\"SELECT * FROM users WHERE id = $1\", userId);\n\n\u002F\u002F Raw query returning all rows as array\nconst users = await db.rawQueryAll\u003CUser>(\"SELECT * FROM users WHERE role = $1\", \"admin\");\n\n\u002F\u002F Raw exec for INSERT\u002FUPDATE\u002FDELETE\nawait db.rawExec(\"INSERT INTO users (id, email) VALUES ($1, $2)\", id, email);\n```\n\n## Database Sharing Across Services\n\nReference a database owned by another service using `SQLDatabase.named()`:\n\n```typescript\nimport { SQLDatabase } from \"encore.dev\u002Fstorage\u002Fsqldb\";\n\n\u002F\u002F In the service that owns the database\nconst db = new SQLDatabase(\"shared-db\", {\n  migrations: \".\u002Fmigrations\",\n});\n\n\u002F\u002F In another service that needs access\nconst sharedDb = SQLDatabase.named(\"shared-db\");\n\n\u002F\u002F Now you can query the shared database\nconst user = await sharedDb.queryRow\u003CUser>`SELECT * FROM users WHERE id = ${id}`;\n```\n\n## Migrations\n\n### File Structure\n\n```\nservice\u002F\n└── migrations\u002F\n    ├── 001_create_users.up.sql\n    ├── 002_add_posts.up.sql\n    └── 003_add_indexes.up.sql\n```\n\n### Naming Convention\n\n- Start with a number (001, 002, etc.)\n- Followed by underscore and description\n- End with `.up.sql`\n- Numbers must be sequential\n\n### Example Migration\n\n```sql\n-- migrations\u002F001_create_users.up.sql\nCREATE TABLE users (\n    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n    email TEXT UNIQUE NOT NULL,\n    name TEXT NOT NULL,\n    created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()\n);\n\nCREATE INDEX idx_users_email ON users(email);\n```\n\n## Drizzle ORM Integration\n\n### Setup\n\n```typescript\n\u002F\u002F db.ts\nimport { SQLDatabase } from \"encore.dev\u002Fstorage\u002Fsqldb\";\nimport { drizzle } from \"drizzle-orm\u002Fnode-postgres\";\n\nconst db = new SQLDatabase(\"mydb\", {\n  migrations: {\n    path: \"migrations\",\n    source: \"drizzle\",\n  },\n});\n\nexport const orm = drizzle(db.connectionString);\n```\n\n### Schema\n\n```typescript\n\u002F\u002F schema.ts\nimport * as p from \"drizzle-orm\u002Fpg-core\";\n\nexport const users = p.pgTable(\"users\", {\n  id: p.uuid().primaryKey().defaultRandom(),\n  email: p.text().unique().notNull(),\n  name: p.text().notNull(),\n  createdAt: p.timestamp().defaultNow(),\n});\n```\n\n### Drizzle Config\n\n```typescript\n\u002F\u002F drizzle.config.ts\nimport { defineConfig } from \"drizzle-kit\";\n\nexport default defineConfig({\n  out: \"migrations\",\n  schema: \"schema.ts\",\n  dialect: \"postgresql\",\n});\n```\n\nGenerate migrations: `drizzle-kit generate`\n\n### Using Drizzle\n\n```typescript\nimport { orm } from \".\u002Fdb\";\nimport { users } from \".\u002Fschema\";\nimport { eq } from \"drizzle-orm\";\n\n\u002F\u002F Select\nconst allUsers = await orm.select().from(users);\nconst user = await orm.select().from(users).where(eq(users.id, id));\n\n\u002F\u002F Insert\nawait orm.insert(users).values({ email, name });\n\n\u002F\u002F Update\nawait orm.update(users).set({ name }).where(eq(users.id, id));\n\n\u002F\u002F Delete\nawait orm.delete(users).where(eq(users.id, id));\n```\n\n## SQL Injection Protection\n\nEncore's template literals automatically escape values:\n\n```typescript\n\u002F\u002F SAFE - values are parameterized\nconst email = \"user@example.com\";\nawait db.queryRow`SELECT * FROM users WHERE email = ${email}`;\n\n\u002F\u002F WRONG - SQL injection risk\nawait db.queryRow(`SELECT * FROM users WHERE email = '${email}'`);\n```\n\n## Guidelines\n\n- Always use template literals for queries (automatic escaping)\n- Specify types with generics: `query\u003CUser>`, `queryRow\u003CUser>`\n- Migrations are applied automatically on startup\n- Use `queryRow` when expecting 0 or 1 result\n- Use `query` with async iteration for multiple rows\n- Database names should be lowercase, descriptive\n- Each service typically has its own database\n",{"data":38,"body":40},{"name":4,"description":6,"when_to_use":39},"User wants to add a database table, write a migration, run a SQL query, insert\u002Fupdate\u002Fdelete rows, set up Drizzle or Prisma against an Encore database, or design a relational schema. Covers `new SQLDatabase(...)`, `db.query`, `db.queryRow`, `db.exec`, the `migrations\u002F` directory, `*.up.sql` files, sequential migration numbering, and ORM integration via `db.connectionString`. Trigger phrases: \"Postgres table\", \"user_sessions table\", \"SQL\", \"migration\", \"queryRow\", \"INSERT\", \"SELECT\", \"schema\", \"Drizzle\", \"Prisma\".",{"type":41,"children":42},"root",[43,52,59,66,250,256,262,274,279,591,603,615,697,709,714,889,901,906,1157,1163,1183,1541,1547,1559,1863,1869,1875,1885,1891,1922,1928,2008,2014,2020,2315,2321,2665,2671,2859,2870,2876,3437,3443,3448,3616,3622,3686],{"type":44,"tag":45,"props":46,"children":48},"element","h1",{"id":47},"encore-database-operations",[49],{"type":50,"value":51},"text","Encore Database Operations",{"type":44,"tag":53,"props":54,"children":56},"h2",{"id":55},"instructions",[57],{"type":50,"value":58},"Instructions",{"type":44,"tag":60,"props":61,"children":63},"h3",{"id":62},"database-setup",[64],{"type":50,"value":65},"Database Setup",{"type":44,"tag":67,"props":68,"children":72},"pre",{"className":69,"code":70,"language":15,"meta":71,"style":71},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { SQLDatabase } from \"encore.dev\u002Fstorage\u002Fsqldb\";\n\nconst db = new SQLDatabase(\"mydb\", {\n  migrations: \".\u002Fmigrations\",\n});\n","",[73],{"type":44,"tag":74,"props":75,"children":76},"code",{"__ignoreMap":71},[77,132,142,200,233],{"type":44,"tag":78,"props":79,"children":82},"span",{"class":80,"line":81},"line",1,[83,89,95,101,106,111,116,122,127],{"type":44,"tag":78,"props":84,"children":86},{"style":85},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[87],{"type":50,"value":88},"import",{"type":44,"tag":78,"props":90,"children":92},{"style":91},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[93],{"type":50,"value":94}," {",{"type":44,"tag":78,"props":96,"children":98},{"style":97},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[99],{"type":50,"value":100}," SQLDatabase",{"type":44,"tag":78,"props":102,"children":103},{"style":91},[104],{"type":50,"value":105}," }",{"type":44,"tag":78,"props":107,"children":108},{"style":85},[109],{"type":50,"value":110}," from",{"type":44,"tag":78,"props":112,"children":113},{"style":91},[114],{"type":50,"value":115}," \"",{"type":44,"tag":78,"props":117,"children":119},{"style":118},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[120],{"type":50,"value":121},"encore.dev\u002Fstorage\u002Fsqldb",{"type":44,"tag":78,"props":123,"children":124},{"style":91},[125],{"type":50,"value":126},"\"",{"type":44,"tag":78,"props":128,"children":129},{"style":91},[130],{"type":50,"value":131},";\n",{"type":44,"tag":78,"props":133,"children":135},{"class":80,"line":134},2,[136],{"type":44,"tag":78,"props":137,"children":139},{"emptyLinePlaceholder":138},true,[140],{"type":50,"value":141},"\n",{"type":44,"tag":78,"props":143,"children":145},{"class":80,"line":144},3,[146,152,157,162,167,172,177,181,186,190,195],{"type":44,"tag":78,"props":147,"children":149},{"style":148},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[150],{"type":50,"value":151},"const",{"type":44,"tag":78,"props":153,"children":154},{"style":97},[155],{"type":50,"value":156}," db ",{"type":44,"tag":78,"props":158,"children":159},{"style":91},[160],{"type":50,"value":161},"=",{"type":44,"tag":78,"props":163,"children":164},{"style":91},[165],{"type":50,"value":166}," new",{"type":44,"tag":78,"props":168,"children":170},{"style":169},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[171],{"type":50,"value":100},{"type":44,"tag":78,"props":173,"children":174},{"style":97},[175],{"type":50,"value":176},"(",{"type":44,"tag":78,"props":178,"children":179},{"style":91},[180],{"type":50,"value":126},{"type":44,"tag":78,"props":182,"children":183},{"style":118},[184],{"type":50,"value":185},"mydb",{"type":44,"tag":78,"props":187,"children":188},{"style":91},[189],{"type":50,"value":126},{"type":44,"tag":78,"props":191,"children":192},{"style":91},[193],{"type":50,"value":194},",",{"type":44,"tag":78,"props":196,"children":197},{"style":91},[198],{"type":50,"value":199}," {\n",{"type":44,"tag":78,"props":201,"children":203},{"class":80,"line":202},4,[204,210,215,219,224,228],{"type":44,"tag":78,"props":205,"children":207},{"style":206},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[208],{"type":50,"value":209},"  migrations",{"type":44,"tag":78,"props":211,"children":212},{"style":91},[213],{"type":50,"value":214},":",{"type":44,"tag":78,"props":216,"children":217},{"style":91},[218],{"type":50,"value":115},{"type":44,"tag":78,"props":220,"children":221},{"style":118},[222],{"type":50,"value":223},".\u002Fmigrations",{"type":44,"tag":78,"props":225,"children":226},{"style":91},[227],{"type":50,"value":126},{"type":44,"tag":78,"props":229,"children":230},{"style":91},[231],{"type":50,"value":232},",\n",{"type":44,"tag":78,"props":234,"children":235},{"class":80,"line":28},[236,241,246],{"type":44,"tag":78,"props":237,"children":238},{"style":91},[239],{"type":50,"value":240},"}",{"type":44,"tag":78,"props":242,"children":243},{"style":97},[244],{"type":50,"value":245},")",{"type":44,"tag":78,"props":247,"children":248},{"style":91},[249],{"type":50,"value":131},{"type":44,"tag":53,"props":251,"children":253},{"id":252},"query-methods",[254],{"type":50,"value":255},"Query Methods",{"type":44,"tag":257,"props":258,"children":259},"p",{},[260],{"type":50,"value":261},"Encore provides several query methods:",{"type":44,"tag":60,"props":263,"children":265},{"id":264},"query-multiple-rows",[266,272],{"type":44,"tag":74,"props":267,"children":269},{"className":268},[],[270],{"type":50,"value":271},"query",{"type":50,"value":273}," - Multiple Rows",{"type":44,"tag":257,"props":275,"children":276},{},[277],{"type":50,"value":278},"Returns an async iterator for multiple rows:",{"type":44,"tag":67,"props":280,"children":282},{"className":69,"code":281,"language":15,"meta":71,"style":71},"interface User {\n  id: string;\n  email: string;\n  name: string;\n}\n\nconst rows = await db.query\u003CUser>`\n  SELECT id, email, name FROM users WHERE active = true\n`;\n\nconst users: User[] = [];\nfor await (const row of rows) {\n  users.push(row);\n}\n",[283],{"type":44,"tag":74,"props":284,"children":285},{"__ignoreMap":71},[286,304,325,345,365,373,381,437,446,459,467,506,548,583],{"type":44,"tag":78,"props":287,"children":288},{"class":80,"line":81},[289,294,300],{"type":44,"tag":78,"props":290,"children":291},{"style":148},[292],{"type":50,"value":293},"interface",{"type":44,"tag":78,"props":295,"children":297},{"style":296},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[298],{"type":50,"value":299}," User",{"type":44,"tag":78,"props":301,"children":302},{"style":91},[303],{"type":50,"value":199},{"type":44,"tag":78,"props":305,"children":306},{"class":80,"line":134},[307,312,316,321],{"type":44,"tag":78,"props":308,"children":309},{"style":206},[310],{"type":50,"value":311},"  id",{"type":44,"tag":78,"props":313,"children":314},{"style":91},[315],{"type":50,"value":214},{"type":44,"tag":78,"props":317,"children":318},{"style":296},[319],{"type":50,"value":320}," string",{"type":44,"tag":78,"props":322,"children":323},{"style":91},[324],{"type":50,"value":131},{"type":44,"tag":78,"props":326,"children":327},{"class":80,"line":144},[328,333,337,341],{"type":44,"tag":78,"props":329,"children":330},{"style":206},[331],{"type":50,"value":332},"  email",{"type":44,"tag":78,"props":334,"children":335},{"style":91},[336],{"type":50,"value":214},{"type":44,"tag":78,"props":338,"children":339},{"style":296},[340],{"type":50,"value":320},{"type":44,"tag":78,"props":342,"children":343},{"style":91},[344],{"type":50,"value":131},{"type":44,"tag":78,"props":346,"children":347},{"class":80,"line":202},[348,353,357,361],{"type":44,"tag":78,"props":349,"children":350},{"style":206},[351],{"type":50,"value":352},"  name",{"type":44,"tag":78,"props":354,"children":355},{"style":91},[356],{"type":50,"value":214},{"type":44,"tag":78,"props":358,"children":359},{"style":296},[360],{"type":50,"value":320},{"type":44,"tag":78,"props":362,"children":363},{"style":91},[364],{"type":50,"value":131},{"type":44,"tag":78,"props":366,"children":367},{"class":80,"line":28},[368],{"type":44,"tag":78,"props":369,"children":370},{"style":91},[371],{"type":50,"value":372},"}\n",{"type":44,"tag":78,"props":374,"children":376},{"class":80,"line":375},6,[377],{"type":44,"tag":78,"props":378,"children":379},{"emptyLinePlaceholder":138},[380],{"type":50,"value":141},{"type":44,"tag":78,"props":382,"children":384},{"class":80,"line":383},7,[385,389,394,398,403,408,413,417,422,427,432],{"type":44,"tag":78,"props":386,"children":387},{"style":148},[388],{"type":50,"value":151},{"type":44,"tag":78,"props":390,"children":391},{"style":97},[392],{"type":50,"value":393}," rows ",{"type":44,"tag":78,"props":395,"children":396},{"style":91},[397],{"type":50,"value":161},{"type":44,"tag":78,"props":399,"children":400},{"style":85},[401],{"type":50,"value":402}," await",{"type":44,"tag":78,"props":404,"children":405},{"style":97},[406],{"type":50,"value":407}," db",{"type":44,"tag":78,"props":409,"children":410},{"style":91},[411],{"type":50,"value":412},".",{"type":44,"tag":78,"props":414,"children":415},{"style":169},[416],{"type":50,"value":271},{"type":44,"tag":78,"props":418,"children":419},{"style":91},[420],{"type":50,"value":421},"\u003C",{"type":44,"tag":78,"props":423,"children":424},{"style":296},[425],{"type":50,"value":426},"User",{"type":44,"tag":78,"props":428,"children":429},{"style":91},[430],{"type":50,"value":431},">",{"type":44,"tag":78,"props":433,"children":434},{"style":91},[435],{"type":50,"value":436},"`\n",{"type":44,"tag":78,"props":438,"children":440},{"class":80,"line":439},8,[441],{"type":44,"tag":78,"props":442,"children":443},{"style":118},[444],{"type":50,"value":445},"  SELECT id, email, name FROM users WHERE active = true\n",{"type":44,"tag":78,"props":447,"children":449},{"class":80,"line":448},9,[450,455],{"type":44,"tag":78,"props":451,"children":452},{"style":91},[453],{"type":50,"value":454},"`",{"type":44,"tag":78,"props":456,"children":457},{"style":91},[458],{"type":50,"value":131},{"type":44,"tag":78,"props":460,"children":462},{"class":80,"line":461},10,[463],{"type":44,"tag":78,"props":464,"children":465},{"emptyLinePlaceholder":138},[466],{"type":50,"value":141},{"type":44,"tag":78,"props":468,"children":470},{"class":80,"line":469},11,[471,475,480,484,488,493,497,502],{"type":44,"tag":78,"props":472,"children":473},{"style":148},[474],{"type":50,"value":151},{"type":44,"tag":78,"props":476,"children":477},{"style":97},[478],{"type":50,"value":479}," users",{"type":44,"tag":78,"props":481,"children":482},{"style":91},[483],{"type":50,"value":214},{"type":44,"tag":78,"props":485,"children":486},{"style":296},[487],{"type":50,"value":299},{"type":44,"tag":78,"props":489,"children":490},{"style":97},[491],{"type":50,"value":492},"[] ",{"type":44,"tag":78,"props":494,"children":495},{"style":91},[496],{"type":50,"value":161},{"type":44,"tag":78,"props":498,"children":499},{"style":97},[500],{"type":50,"value":501}," []",{"type":44,"tag":78,"props":503,"children":504},{"style":91},[505],{"type":50,"value":131},{"type":44,"tag":78,"props":507,"children":509},{"class":80,"line":508},12,[510,515,519,524,528,533,538,543],{"type":44,"tag":78,"props":511,"children":512},{"style":85},[513],{"type":50,"value":514},"for",{"type":44,"tag":78,"props":516,"children":517},{"style":85},[518],{"type":50,"value":402},{"type":44,"tag":78,"props":520,"children":521},{"style":97},[522],{"type":50,"value":523}," (",{"type":44,"tag":78,"props":525,"children":526},{"style":148},[527],{"type":50,"value":151},{"type":44,"tag":78,"props":529,"children":530},{"style":97},[531],{"type":50,"value":532}," row ",{"type":44,"tag":78,"props":534,"children":535},{"style":91},[536],{"type":50,"value":537},"of",{"type":44,"tag":78,"props":539,"children":540},{"style":97},[541],{"type":50,"value":542}," rows) ",{"type":44,"tag":78,"props":544,"children":545},{"style":91},[546],{"type":50,"value":547},"{\n",{"type":44,"tag":78,"props":549,"children":551},{"class":80,"line":550},13,[552,557,561,566,570,575,579],{"type":44,"tag":78,"props":553,"children":554},{"style":97},[555],{"type":50,"value":556},"  users",{"type":44,"tag":78,"props":558,"children":559},{"style":91},[560],{"type":50,"value":412},{"type":44,"tag":78,"props":562,"children":563},{"style":169},[564],{"type":50,"value":565},"push",{"type":44,"tag":78,"props":567,"children":568},{"style":206},[569],{"type":50,"value":176},{"type":44,"tag":78,"props":571,"children":572},{"style":97},[573],{"type":50,"value":574},"row",{"type":44,"tag":78,"props":576,"children":577},{"style":206},[578],{"type":50,"value":245},{"type":44,"tag":78,"props":580,"children":581},{"style":91},[582],{"type":50,"value":131},{"type":44,"tag":78,"props":584,"children":586},{"class":80,"line":585},14,[587],{"type":44,"tag":78,"props":588,"children":589},{"style":91},[590],{"type":50,"value":372},{"type":44,"tag":60,"props":592,"children":594},{"id":593},"queryall-all-rows-as-array",[595,601],{"type":44,"tag":74,"props":596,"children":598},{"className":597},[],[599],{"type":50,"value":600},"queryAll",{"type":50,"value":602}," - All Rows as Array",{"type":44,"tag":257,"props":604,"children":605},{},[606,608,613],{"type":50,"value":607},"Returns all rows as an array (convenience wrapper around ",{"type":44,"tag":74,"props":609,"children":611},{"className":610},[],[612],{"type":50,"value":271},{"type":50,"value":614},"):",{"type":44,"tag":67,"props":616,"children":618},{"className":69,"code":617,"language":15,"meta":71,"style":71},"const users = await db.queryAll\u003CUser>`\n  SELECT id, email, name FROM users WHERE active = true\n`;\n\u002F\u002F users is User[]\n",[619],{"type":44,"tag":74,"props":620,"children":621},{"__ignoreMap":71},[622,670,677,688],{"type":44,"tag":78,"props":623,"children":624},{"class":80,"line":81},[625,629,634,638,642,646,650,654,658,662,666],{"type":44,"tag":78,"props":626,"children":627},{"style":148},[628],{"type":50,"value":151},{"type":44,"tag":78,"props":630,"children":631},{"style":97},[632],{"type":50,"value":633}," users ",{"type":44,"tag":78,"props":635,"children":636},{"style":91},[637],{"type":50,"value":161},{"type":44,"tag":78,"props":639,"children":640},{"style":85},[641],{"type":50,"value":402},{"type":44,"tag":78,"props":643,"children":644},{"style":97},[645],{"type":50,"value":407},{"type":44,"tag":78,"props":647,"children":648},{"style":91},[649],{"type":50,"value":412},{"type":44,"tag":78,"props":651,"children":652},{"style":169},[653],{"type":50,"value":600},{"type":44,"tag":78,"props":655,"children":656},{"style":91},[657],{"type":50,"value":421},{"type":44,"tag":78,"props":659,"children":660},{"style":296},[661],{"type":50,"value":426},{"type":44,"tag":78,"props":663,"children":664},{"style":91},[665],{"type":50,"value":431},{"type":44,"tag":78,"props":667,"children":668},{"style":91},[669],{"type":50,"value":436},{"type":44,"tag":78,"props":671,"children":672},{"class":80,"line":134},[673],{"type":44,"tag":78,"props":674,"children":675},{"style":118},[676],{"type":50,"value":445},{"type":44,"tag":78,"props":678,"children":679},{"class":80,"line":144},[680,684],{"type":44,"tag":78,"props":681,"children":682},{"style":91},[683],{"type":50,"value":454},{"type":44,"tag":78,"props":685,"children":686},{"style":91},[687],{"type":50,"value":131},{"type":44,"tag":78,"props":689,"children":690},{"class":80,"line":202},[691],{"type":44,"tag":78,"props":692,"children":694},{"style":693},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[695],{"type":50,"value":696},"\u002F\u002F users is User[]\n",{"type":44,"tag":60,"props":698,"children":700},{"id":699},"queryrow-single-row",[701,707],{"type":44,"tag":74,"props":702,"children":704},{"className":703},[],[705],{"type":50,"value":706},"queryRow",{"type":50,"value":708}," - Single Row",{"type":44,"tag":257,"props":710,"children":711},{},[712],{"type":50,"value":713},"Returns one row or null:",{"type":44,"tag":67,"props":715,"children":717},{"className":69,"code":716,"language":15,"meta":71,"style":71},"const user = await db.queryRow\u003CUser>`\n  SELECT id, email, name FROM users WHERE id = ${userId}\n`;\n\nif (!user) {\n  throw APIError.notFound(\"user not found\");\n}\n",[718],{"type":44,"tag":74,"props":719,"children":720},{"__ignoreMap":71},[721,769,791,802,809,835,882],{"type":44,"tag":78,"props":722,"children":723},{"class":80,"line":81},[724,728,733,737,741,745,749,753,757,761,765],{"type":44,"tag":78,"props":725,"children":726},{"style":148},[727],{"type":50,"value":151},{"type":44,"tag":78,"props":729,"children":730},{"style":97},[731],{"type":50,"value":732}," user ",{"type":44,"tag":78,"props":734,"children":735},{"style":91},[736],{"type":50,"value":161},{"type":44,"tag":78,"props":738,"children":739},{"style":85},[740],{"type":50,"value":402},{"type":44,"tag":78,"props":742,"children":743},{"style":97},[744],{"type":50,"value":407},{"type":44,"tag":78,"props":746,"children":747},{"style":91},[748],{"type":50,"value":412},{"type":44,"tag":78,"props":750,"children":751},{"style":169},[752],{"type":50,"value":706},{"type":44,"tag":78,"props":754,"children":755},{"style":91},[756],{"type":50,"value":421},{"type":44,"tag":78,"props":758,"children":759},{"style":296},[760],{"type":50,"value":426},{"type":44,"tag":78,"props":762,"children":763},{"style":91},[764],{"type":50,"value":431},{"type":44,"tag":78,"props":766,"children":767},{"style":91},[768],{"type":50,"value":436},{"type":44,"tag":78,"props":770,"children":771},{"class":80,"line":134},[772,777,782,787],{"type":44,"tag":78,"props":773,"children":774},{"style":118},[775],{"type":50,"value":776},"  SELECT id, email, name FROM users WHERE id = ",{"type":44,"tag":78,"props":778,"children":779},{"style":91},[780],{"type":50,"value":781},"${",{"type":44,"tag":78,"props":783,"children":784},{"style":97},[785],{"type":50,"value":786},"userId",{"type":44,"tag":78,"props":788,"children":789},{"style":91},[790],{"type":50,"value":372},{"type":44,"tag":78,"props":792,"children":793},{"class":80,"line":144},[794,798],{"type":44,"tag":78,"props":795,"children":796},{"style":91},[797],{"type":50,"value":454},{"type":44,"tag":78,"props":799,"children":800},{"style":91},[801],{"type":50,"value":131},{"type":44,"tag":78,"props":803,"children":804},{"class":80,"line":202},[805],{"type":44,"tag":78,"props":806,"children":807},{"emptyLinePlaceholder":138},[808],{"type":50,"value":141},{"type":44,"tag":78,"props":810,"children":811},{"class":80,"line":28},[812,817,821,826,831],{"type":44,"tag":78,"props":813,"children":814},{"style":85},[815],{"type":50,"value":816},"if",{"type":44,"tag":78,"props":818,"children":819},{"style":97},[820],{"type":50,"value":523},{"type":44,"tag":78,"props":822,"children":823},{"style":91},[824],{"type":50,"value":825},"!",{"type":44,"tag":78,"props":827,"children":828},{"style":97},[829],{"type":50,"value":830},"user) ",{"type":44,"tag":78,"props":832,"children":833},{"style":91},[834],{"type":50,"value":547},{"type":44,"tag":78,"props":836,"children":837},{"class":80,"line":375},[838,843,848,852,857,861,865,870,874,878],{"type":44,"tag":78,"props":839,"children":840},{"style":85},[841],{"type":50,"value":842},"  throw",{"type":44,"tag":78,"props":844,"children":845},{"style":97},[846],{"type":50,"value":847}," APIError",{"type":44,"tag":78,"props":849,"children":850},{"style":91},[851],{"type":50,"value":412},{"type":44,"tag":78,"props":853,"children":854},{"style":169},[855],{"type":50,"value":856},"notFound",{"type":44,"tag":78,"props":858,"children":859},{"style":206},[860],{"type":50,"value":176},{"type":44,"tag":78,"props":862,"children":863},{"style":91},[864],{"type":50,"value":126},{"type":44,"tag":78,"props":866,"children":867},{"style":118},[868],{"type":50,"value":869},"user not found",{"type":44,"tag":78,"props":871,"children":872},{"style":91},[873],{"type":50,"value":126},{"type":44,"tag":78,"props":875,"children":876},{"style":206},[877],{"type":50,"value":245},{"type":44,"tag":78,"props":879,"children":880},{"style":91},[881],{"type":50,"value":131},{"type":44,"tag":78,"props":883,"children":884},{"class":80,"line":383},[885],{"type":44,"tag":78,"props":886,"children":887},{"style":91},[888],{"type":50,"value":372},{"type":44,"tag":60,"props":890,"children":892},{"id":891},"exec-no-return-value",[893,899],{"type":44,"tag":74,"props":894,"children":896},{"className":895},[],[897],{"type":50,"value":898},"exec",{"type":50,"value":900}," - No Return Value",{"type":44,"tag":257,"props":902,"children":903},{},[904],{"type":50,"value":905},"For INSERT, UPDATE, DELETE operations:",{"type":44,"tag":67,"props":907,"children":909},{"className":69,"code":908,"language":15,"meta":71,"style":71},"await db.exec`\n  INSERT INTO users (id, email, name)\n  VALUES (${id}, ${email}, ${name})\n`;\n\nawait db.exec`\n  UPDATE users SET name = ${newName} WHERE id = ${id}\n`;\n\nawait db.exec`\n  DELETE FROM users WHERE id = ${id}\n`;\n",[910],{"type":44,"tag":74,"props":911,"children":912},{"__ignoreMap":71},[913,937,945,1006,1017,1024,1047,1085,1096,1103,1126,1146],{"type":44,"tag":78,"props":914,"children":915},{"class":80,"line":81},[916,921,925,929,933],{"type":44,"tag":78,"props":917,"children":918},{"style":85},[919],{"type":50,"value":920},"await",{"type":44,"tag":78,"props":922,"children":923},{"style":97},[924],{"type":50,"value":407},{"type":44,"tag":78,"props":926,"children":927},{"style":91},[928],{"type":50,"value":412},{"type":44,"tag":78,"props":930,"children":931},{"style":169},[932],{"type":50,"value":898},{"type":44,"tag":78,"props":934,"children":935},{"style":91},[936],{"type":50,"value":436},{"type":44,"tag":78,"props":938,"children":939},{"class":80,"line":134},[940],{"type":44,"tag":78,"props":941,"children":942},{"style":118},[943],{"type":50,"value":944},"  INSERT INTO users (id, email, name)\n",{"type":44,"tag":78,"props":946,"children":947},{"class":80,"line":144},[948,953,957,962,966,971,975,980,984,988,992,997,1001],{"type":44,"tag":78,"props":949,"children":950},{"style":118},[951],{"type":50,"value":952},"  VALUES (",{"type":44,"tag":78,"props":954,"children":955},{"style":91},[956],{"type":50,"value":781},{"type":44,"tag":78,"props":958,"children":959},{"style":97},[960],{"type":50,"value":961},"id",{"type":44,"tag":78,"props":963,"children":964},{"style":91},[965],{"type":50,"value":240},{"type":44,"tag":78,"props":967,"children":968},{"style":118},[969],{"type":50,"value":970},", ",{"type":44,"tag":78,"props":972,"children":973},{"style":91},[974],{"type":50,"value":781},{"type":44,"tag":78,"props":976,"children":977},{"style":97},[978],{"type":50,"value":979},"email",{"type":44,"tag":78,"props":981,"children":982},{"style":91},[983],{"type":50,"value":240},{"type":44,"tag":78,"props":985,"children":986},{"style":118},[987],{"type":50,"value":970},{"type":44,"tag":78,"props":989,"children":990},{"style":91},[991],{"type":50,"value":781},{"type":44,"tag":78,"props":993,"children":994},{"style":97},[995],{"type":50,"value":996},"name",{"type":44,"tag":78,"props":998,"children":999},{"style":91},[1000],{"type":50,"value":240},{"type":44,"tag":78,"props":1002,"children":1003},{"style":118},[1004],{"type":50,"value":1005},")\n",{"type":44,"tag":78,"props":1007,"children":1008},{"class":80,"line":202},[1009,1013],{"type":44,"tag":78,"props":1010,"children":1011},{"style":91},[1012],{"type":50,"value":454},{"type":44,"tag":78,"props":1014,"children":1015},{"style":91},[1016],{"type":50,"value":131},{"type":44,"tag":78,"props":1018,"children":1019},{"class":80,"line":28},[1020],{"type":44,"tag":78,"props":1021,"children":1022},{"emptyLinePlaceholder":138},[1023],{"type":50,"value":141},{"type":44,"tag":78,"props":1025,"children":1026},{"class":80,"line":375},[1027,1031,1035,1039,1043],{"type":44,"tag":78,"props":1028,"children":1029},{"style":85},[1030],{"type":50,"value":920},{"type":44,"tag":78,"props":1032,"children":1033},{"style":97},[1034],{"type":50,"value":407},{"type":44,"tag":78,"props":1036,"children":1037},{"style":91},[1038],{"type":50,"value":412},{"type":44,"tag":78,"props":1040,"children":1041},{"style":169},[1042],{"type":50,"value":898},{"type":44,"tag":78,"props":1044,"children":1045},{"style":91},[1046],{"type":50,"value":436},{"type":44,"tag":78,"props":1048,"children":1049},{"class":80,"line":383},[1050,1055,1059,1064,1068,1073,1077,1081],{"type":44,"tag":78,"props":1051,"children":1052},{"style":118},[1053],{"type":50,"value":1054},"  UPDATE users SET name = ",{"type":44,"tag":78,"props":1056,"children":1057},{"style":91},[1058],{"type":50,"value":781},{"type":44,"tag":78,"props":1060,"children":1061},{"style":97},[1062],{"type":50,"value":1063},"newName",{"type":44,"tag":78,"props":1065,"children":1066},{"style":91},[1067],{"type":50,"value":240},{"type":44,"tag":78,"props":1069,"children":1070},{"style":118},[1071],{"type":50,"value":1072}," WHERE id = ",{"type":44,"tag":78,"props":1074,"children":1075},{"style":91},[1076],{"type":50,"value":781},{"type":44,"tag":78,"props":1078,"children":1079},{"style":97},[1080],{"type":50,"value":961},{"type":44,"tag":78,"props":1082,"children":1083},{"style":91},[1084],{"type":50,"value":372},{"type":44,"tag":78,"props":1086,"children":1087},{"class":80,"line":439},[1088,1092],{"type":44,"tag":78,"props":1089,"children":1090},{"style":91},[1091],{"type":50,"value":454},{"type":44,"tag":78,"props":1093,"children":1094},{"style":91},[1095],{"type":50,"value":131},{"type":44,"tag":78,"props":1097,"children":1098},{"class":80,"line":448},[1099],{"type":44,"tag":78,"props":1100,"children":1101},{"emptyLinePlaceholder":138},[1102],{"type":50,"value":141},{"type":44,"tag":78,"props":1104,"children":1105},{"class":80,"line":461},[1106,1110,1114,1118,1122],{"type":44,"tag":78,"props":1107,"children":1108},{"style":85},[1109],{"type":50,"value":920},{"type":44,"tag":78,"props":1111,"children":1112},{"style":97},[1113],{"type":50,"value":407},{"type":44,"tag":78,"props":1115,"children":1116},{"style":91},[1117],{"type":50,"value":412},{"type":44,"tag":78,"props":1119,"children":1120},{"style":169},[1121],{"type":50,"value":898},{"type":44,"tag":78,"props":1123,"children":1124},{"style":91},[1125],{"type":50,"value":436},{"type":44,"tag":78,"props":1127,"children":1128},{"class":80,"line":469},[1129,1134,1138,1142],{"type":44,"tag":78,"props":1130,"children":1131},{"style":118},[1132],{"type":50,"value":1133},"  DELETE FROM users WHERE id = ",{"type":44,"tag":78,"props":1135,"children":1136},{"style":91},[1137],{"type":50,"value":781},{"type":44,"tag":78,"props":1139,"children":1140},{"style":97},[1141],{"type":50,"value":961},{"type":44,"tag":78,"props":1143,"children":1144},{"style":91},[1145],{"type":50,"value":372},{"type":44,"tag":78,"props":1147,"children":1148},{"class":80,"line":508},[1149,1153],{"type":44,"tag":78,"props":1150,"children":1151},{"style":91},[1152],{"type":50,"value":454},{"type":44,"tag":78,"props":1154,"children":1155},{"style":91},[1156],{"type":50,"value":131},{"type":44,"tag":60,"props":1158,"children":1160},{"id":1159},"raw-query-methods",[1161],{"type":50,"value":1162},"Raw Query Methods",{"type":44,"tag":257,"props":1164,"children":1165},{},[1166,1168,1174,1175,1181],{"type":50,"value":1167},"Use raw SQL strings with positional parameters (",{"type":44,"tag":74,"props":1169,"children":1171},{"className":1170},[],[1172],{"type":50,"value":1173},"$1",{"type":50,"value":970},{"type":44,"tag":74,"props":1176,"children":1178},{"className":1177},[],[1179],{"type":50,"value":1180},"$2",{"type":50,"value":1182},", etc.) instead of template literals:",{"type":44,"tag":67,"props":1184,"children":1186},{"className":69,"code":1185,"language":15,"meta":71,"style":71},"\u002F\u002F Raw query returning multiple rows\nconst rows = await db.rawQuery\u003CUser>(\"SELECT * FROM users WHERE active = $1\", true);\n\n\u002F\u002F Raw query returning single row\nconst user = await db.rawQueryRow\u003CUser>(\"SELECT * FROM users WHERE id = $1\", userId);\n\n\u002F\u002F Raw query returning all rows as array\nconst users = await db.rawQueryAll\u003CUser>(\"SELECT * FROM users WHERE role = $1\", \"admin\");\n\n\u002F\u002F Raw exec for INSERT\u002FUPDATE\u002FDELETE\nawait db.rawExec(\"INSERT INTO users (id, email) VALUES ($1, $2)\", id, email);\n",[1187],{"type":44,"tag":74,"props":1188,"children":1189},{"__ignoreMap":71},[1190,1198,1277,1284,1292,1366,1373,1381,1467,1474,1482],{"type":44,"tag":78,"props":1191,"children":1192},{"class":80,"line":81},[1193],{"type":44,"tag":78,"props":1194,"children":1195},{"style":693},[1196],{"type":50,"value":1197},"\u002F\u002F Raw query returning multiple rows\n",{"type":44,"tag":78,"props":1199,"children":1200},{"class":80,"line":134},[1201,1205,1209,1213,1217,1221,1225,1230,1234,1238,1242,1246,1250,1255,1259,1263,1269,1273],{"type":44,"tag":78,"props":1202,"children":1203},{"style":148},[1204],{"type":50,"value":151},{"type":44,"tag":78,"props":1206,"children":1207},{"style":97},[1208],{"type":50,"value":393},{"type":44,"tag":78,"props":1210,"children":1211},{"style":91},[1212],{"type":50,"value":161},{"type":44,"tag":78,"props":1214,"children":1215},{"style":85},[1216],{"type":50,"value":402},{"type":44,"tag":78,"props":1218,"children":1219},{"style":97},[1220],{"type":50,"value":407},{"type":44,"tag":78,"props":1222,"children":1223},{"style":91},[1224],{"type":50,"value":412},{"type":44,"tag":78,"props":1226,"children":1227},{"style":169},[1228],{"type":50,"value":1229},"rawQuery",{"type":44,"tag":78,"props":1231,"children":1232},{"style":91},[1233],{"type":50,"value":421},{"type":44,"tag":78,"props":1235,"children":1236},{"style":296},[1237],{"type":50,"value":426},{"type":44,"tag":78,"props":1239,"children":1240},{"style":91},[1241],{"type":50,"value":431},{"type":44,"tag":78,"props":1243,"children":1244},{"style":97},[1245],{"type":50,"value":176},{"type":44,"tag":78,"props":1247,"children":1248},{"style":91},[1249],{"type":50,"value":126},{"type":44,"tag":78,"props":1251,"children":1252},{"style":118},[1253],{"type":50,"value":1254},"SELECT * FROM users WHERE active = $1",{"type":44,"tag":78,"props":1256,"children":1257},{"style":91},[1258],{"type":50,"value":126},{"type":44,"tag":78,"props":1260,"children":1261},{"style":91},[1262],{"type":50,"value":194},{"type":44,"tag":78,"props":1264,"children":1266},{"style":1265},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[1267],{"type":50,"value":1268}," true",{"type":44,"tag":78,"props":1270,"children":1271},{"style":97},[1272],{"type":50,"value":245},{"type":44,"tag":78,"props":1274,"children":1275},{"style":91},[1276],{"type":50,"value":131},{"type":44,"tag":78,"props":1278,"children":1279},{"class":80,"line":144},[1280],{"type":44,"tag":78,"props":1281,"children":1282},{"emptyLinePlaceholder":138},[1283],{"type":50,"value":141},{"type":44,"tag":78,"props":1285,"children":1286},{"class":80,"line":202},[1287],{"type":44,"tag":78,"props":1288,"children":1289},{"style":693},[1290],{"type":50,"value":1291},"\u002F\u002F Raw query returning single row\n",{"type":44,"tag":78,"props":1293,"children":1294},{"class":80,"line":28},[1295,1299,1303,1307,1311,1315,1319,1324,1328,1332,1336,1340,1344,1349,1353,1357,1362],{"type":44,"tag":78,"props":1296,"children":1297},{"style":148},[1298],{"type":50,"value":151},{"type":44,"tag":78,"props":1300,"children":1301},{"style":97},[1302],{"type":50,"value":732},{"type":44,"tag":78,"props":1304,"children":1305},{"style":91},[1306],{"type":50,"value":161},{"type":44,"tag":78,"props":1308,"children":1309},{"style":85},[1310],{"type":50,"value":402},{"type":44,"tag":78,"props":1312,"children":1313},{"style":97},[1314],{"type":50,"value":407},{"type":44,"tag":78,"props":1316,"children":1317},{"style":91},[1318],{"type":50,"value":412},{"type":44,"tag":78,"props":1320,"children":1321},{"style":169},[1322],{"type":50,"value":1323},"rawQueryRow",{"type":44,"tag":78,"props":1325,"children":1326},{"style":91},[1327],{"type":50,"value":421},{"type":44,"tag":78,"props":1329,"children":1330},{"style":296},[1331],{"type":50,"value":426},{"type":44,"tag":78,"props":1333,"children":1334},{"style":91},[1335],{"type":50,"value":431},{"type":44,"tag":78,"props":1337,"children":1338},{"style":97},[1339],{"type":50,"value":176},{"type":44,"tag":78,"props":1341,"children":1342},{"style":91},[1343],{"type":50,"value":126},{"type":44,"tag":78,"props":1345,"children":1346},{"style":118},[1347],{"type":50,"value":1348},"SELECT * FROM users WHERE id = $1",{"type":44,"tag":78,"props":1350,"children":1351},{"style":91},[1352],{"type":50,"value":126},{"type":44,"tag":78,"props":1354,"children":1355},{"style":91},[1356],{"type":50,"value":194},{"type":44,"tag":78,"props":1358,"children":1359},{"style":97},[1360],{"type":50,"value":1361}," userId)",{"type":44,"tag":78,"props":1363,"children":1364},{"style":91},[1365],{"type":50,"value":131},{"type":44,"tag":78,"props":1367,"children":1368},{"class":80,"line":375},[1369],{"type":44,"tag":78,"props":1370,"children":1371},{"emptyLinePlaceholder":138},[1372],{"type":50,"value":141},{"type":44,"tag":78,"props":1374,"children":1375},{"class":80,"line":383},[1376],{"type":44,"tag":78,"props":1377,"children":1378},{"style":693},[1379],{"type":50,"value":1380},"\u002F\u002F Raw query returning all rows as array\n",{"type":44,"tag":78,"props":1382,"children":1383},{"class":80,"line":439},[1384,1388,1392,1396,1400,1404,1408,1413,1417,1421,1425,1429,1433,1438,1442,1446,1450,1455,1459,1463],{"type":44,"tag":78,"props":1385,"children":1386},{"style":148},[1387],{"type":50,"value":151},{"type":44,"tag":78,"props":1389,"children":1390},{"style":97},[1391],{"type":50,"value":633},{"type":44,"tag":78,"props":1393,"children":1394},{"style":91},[1395],{"type":50,"value":161},{"type":44,"tag":78,"props":1397,"children":1398},{"style":85},[1399],{"type":50,"value":402},{"type":44,"tag":78,"props":1401,"children":1402},{"style":97},[1403],{"type":50,"value":407},{"type":44,"tag":78,"props":1405,"children":1406},{"style":91},[1407],{"type":50,"value":412},{"type":44,"tag":78,"props":1409,"children":1410},{"style":169},[1411],{"type":50,"value":1412},"rawQueryAll",{"type":44,"tag":78,"props":1414,"children":1415},{"style":91},[1416],{"type":50,"value":421},{"type":44,"tag":78,"props":1418,"children":1419},{"style":296},[1420],{"type":50,"value":426},{"type":44,"tag":78,"props":1422,"children":1423},{"style":91},[1424],{"type":50,"value":431},{"type":44,"tag":78,"props":1426,"children":1427},{"style":97},[1428],{"type":50,"value":176},{"type":44,"tag":78,"props":1430,"children":1431},{"style":91},[1432],{"type":50,"value":126},{"type":44,"tag":78,"props":1434,"children":1435},{"style":118},[1436],{"type":50,"value":1437},"SELECT * FROM users WHERE role = $1",{"type":44,"tag":78,"props":1439,"children":1440},{"style":91},[1441],{"type":50,"value":126},{"type":44,"tag":78,"props":1443,"children":1444},{"style":91},[1445],{"type":50,"value":194},{"type":44,"tag":78,"props":1447,"children":1448},{"style":91},[1449],{"type":50,"value":115},{"type":44,"tag":78,"props":1451,"children":1452},{"style":118},[1453],{"type":50,"value":1454},"admin",{"type":44,"tag":78,"props":1456,"children":1457},{"style":91},[1458],{"type":50,"value":126},{"type":44,"tag":78,"props":1460,"children":1461},{"style":97},[1462],{"type":50,"value":245},{"type":44,"tag":78,"props":1464,"children":1465},{"style":91},[1466],{"type":50,"value":131},{"type":44,"tag":78,"props":1468,"children":1469},{"class":80,"line":448},[1470],{"type":44,"tag":78,"props":1471,"children":1472},{"emptyLinePlaceholder":138},[1473],{"type":50,"value":141},{"type":44,"tag":78,"props":1475,"children":1476},{"class":80,"line":461},[1477],{"type":44,"tag":78,"props":1478,"children":1479},{"style":693},[1480],{"type":50,"value":1481},"\u002F\u002F Raw exec for INSERT\u002FUPDATE\u002FDELETE\n",{"type":44,"tag":78,"props":1483,"children":1484},{"class":80,"line":469},[1485,1489,1493,1497,1502,1506,1510,1515,1519,1523,1528,1532,1537],{"type":44,"tag":78,"props":1486,"children":1487},{"style":85},[1488],{"type":50,"value":920},{"type":44,"tag":78,"props":1490,"children":1491},{"style":97},[1492],{"type":50,"value":407},{"type":44,"tag":78,"props":1494,"children":1495},{"style":91},[1496],{"type":50,"value":412},{"type":44,"tag":78,"props":1498,"children":1499},{"style":169},[1500],{"type":50,"value":1501},"rawExec",{"type":44,"tag":78,"props":1503,"children":1504},{"style":97},[1505],{"type":50,"value":176},{"type":44,"tag":78,"props":1507,"children":1508},{"style":91},[1509],{"type":50,"value":126},{"type":44,"tag":78,"props":1511,"children":1512},{"style":118},[1513],{"type":50,"value":1514},"INSERT INTO users (id, email) VALUES ($1, $2)",{"type":44,"tag":78,"props":1516,"children":1517},{"style":91},[1518],{"type":50,"value":126},{"type":44,"tag":78,"props":1520,"children":1521},{"style":91},[1522],{"type":50,"value":194},{"type":44,"tag":78,"props":1524,"children":1525},{"style":97},[1526],{"type":50,"value":1527}," id",{"type":44,"tag":78,"props":1529,"children":1530},{"style":91},[1531],{"type":50,"value":194},{"type":44,"tag":78,"props":1533,"children":1534},{"style":97},[1535],{"type":50,"value":1536}," email)",{"type":44,"tag":78,"props":1538,"children":1539},{"style":91},[1540],{"type":50,"value":131},{"type":44,"tag":53,"props":1542,"children":1544},{"id":1543},"database-sharing-across-services",[1545],{"type":50,"value":1546},"Database Sharing Across Services",{"type":44,"tag":257,"props":1548,"children":1549},{},[1550,1552,1558],{"type":50,"value":1551},"Reference a database owned by another service using ",{"type":44,"tag":74,"props":1553,"children":1555},{"className":1554},[],[1556],{"type":50,"value":1557},"SQLDatabase.named()",{"type":50,"value":214},{"type":44,"tag":67,"props":1560,"children":1562},{"className":69,"code":1561,"language":15,"meta":71,"style":71},"import { SQLDatabase } from \"encore.dev\u002Fstorage\u002Fsqldb\";\n\n\u002F\u002F In the service that owns the database\nconst db = new SQLDatabase(\"shared-db\", {\n  migrations: \".\u002Fmigrations\",\n});\n\n\u002F\u002F In another service that needs access\nconst sharedDb = SQLDatabase.named(\"shared-db\");\n\n\u002F\u002F Now you can query the shared database\nconst user = await sharedDb.queryRow\u003CUser>`SELECT * FROM users WHERE id = ${id}`;\n",[1563],{"type":44,"tag":74,"props":1564,"children":1565},{"__ignoreMap":71},[1566,1605,1612,1620,1668,1695,1710,1717,1725,1778,1785,1793],{"type":44,"tag":78,"props":1567,"children":1568},{"class":80,"line":81},[1569,1573,1577,1581,1585,1589,1593,1597,1601],{"type":44,"tag":78,"props":1570,"children":1571},{"style":85},[1572],{"type":50,"value":88},{"type":44,"tag":78,"props":1574,"children":1575},{"style":91},[1576],{"type":50,"value":94},{"type":44,"tag":78,"props":1578,"children":1579},{"style":97},[1580],{"type":50,"value":100},{"type":44,"tag":78,"props":1582,"children":1583},{"style":91},[1584],{"type":50,"value":105},{"type":44,"tag":78,"props":1586,"children":1587},{"style":85},[1588],{"type":50,"value":110},{"type":44,"tag":78,"props":1590,"children":1591},{"style":91},[1592],{"type":50,"value":115},{"type":44,"tag":78,"props":1594,"children":1595},{"style":118},[1596],{"type":50,"value":121},{"type":44,"tag":78,"props":1598,"children":1599},{"style":91},[1600],{"type":50,"value":126},{"type":44,"tag":78,"props":1602,"children":1603},{"style":91},[1604],{"type":50,"value":131},{"type":44,"tag":78,"props":1606,"children":1607},{"class":80,"line":134},[1608],{"type":44,"tag":78,"props":1609,"children":1610},{"emptyLinePlaceholder":138},[1611],{"type":50,"value":141},{"type":44,"tag":78,"props":1613,"children":1614},{"class":80,"line":144},[1615],{"type":44,"tag":78,"props":1616,"children":1617},{"style":693},[1618],{"type":50,"value":1619},"\u002F\u002F In the service that owns the database\n",{"type":44,"tag":78,"props":1621,"children":1622},{"class":80,"line":202},[1623,1627,1631,1635,1639,1643,1647,1651,1656,1660,1664],{"type":44,"tag":78,"props":1624,"children":1625},{"style":148},[1626],{"type":50,"value":151},{"type":44,"tag":78,"props":1628,"children":1629},{"style":97},[1630],{"type":50,"value":156},{"type":44,"tag":78,"props":1632,"children":1633},{"style":91},[1634],{"type":50,"value":161},{"type":44,"tag":78,"props":1636,"children":1637},{"style":91},[1638],{"type":50,"value":166},{"type":44,"tag":78,"props":1640,"children":1641},{"style":169},[1642],{"type":50,"value":100},{"type":44,"tag":78,"props":1644,"children":1645},{"style":97},[1646],{"type":50,"value":176},{"type":44,"tag":78,"props":1648,"children":1649},{"style":91},[1650],{"type":50,"value":126},{"type":44,"tag":78,"props":1652,"children":1653},{"style":118},[1654],{"type":50,"value":1655},"shared-db",{"type":44,"tag":78,"props":1657,"children":1658},{"style":91},[1659],{"type":50,"value":126},{"type":44,"tag":78,"props":1661,"children":1662},{"style":91},[1663],{"type":50,"value":194},{"type":44,"tag":78,"props":1665,"children":1666},{"style":91},[1667],{"type":50,"value":199},{"type":44,"tag":78,"props":1669,"children":1670},{"class":80,"line":28},[1671,1675,1679,1683,1687,1691],{"type":44,"tag":78,"props":1672,"children":1673},{"style":206},[1674],{"type":50,"value":209},{"type":44,"tag":78,"props":1676,"children":1677},{"style":91},[1678],{"type":50,"value":214},{"type":44,"tag":78,"props":1680,"children":1681},{"style":91},[1682],{"type":50,"value":115},{"type":44,"tag":78,"props":1684,"children":1685},{"style":118},[1686],{"type":50,"value":223},{"type":44,"tag":78,"props":1688,"children":1689},{"style":91},[1690],{"type":50,"value":126},{"type":44,"tag":78,"props":1692,"children":1693},{"style":91},[1694],{"type":50,"value":232},{"type":44,"tag":78,"props":1696,"children":1697},{"class":80,"line":375},[1698,1702,1706],{"type":44,"tag":78,"props":1699,"children":1700},{"style":91},[1701],{"type":50,"value":240},{"type":44,"tag":78,"props":1703,"children":1704},{"style":97},[1705],{"type":50,"value":245},{"type":44,"tag":78,"props":1707,"children":1708},{"style":91},[1709],{"type":50,"value":131},{"type":44,"tag":78,"props":1711,"children":1712},{"class":80,"line":383},[1713],{"type":44,"tag":78,"props":1714,"children":1715},{"emptyLinePlaceholder":138},[1716],{"type":50,"value":141},{"type":44,"tag":78,"props":1718,"children":1719},{"class":80,"line":439},[1720],{"type":44,"tag":78,"props":1721,"children":1722},{"style":693},[1723],{"type":50,"value":1724},"\u002F\u002F In another service that needs access\n",{"type":44,"tag":78,"props":1726,"children":1727},{"class":80,"line":448},[1728,1732,1737,1741,1745,1749,1754,1758,1762,1766,1770,1774],{"type":44,"tag":78,"props":1729,"children":1730},{"style":148},[1731],{"type":50,"value":151},{"type":44,"tag":78,"props":1733,"children":1734},{"style":97},[1735],{"type":50,"value":1736}," sharedDb ",{"type":44,"tag":78,"props":1738,"children":1739},{"style":91},[1740],{"type":50,"value":161},{"type":44,"tag":78,"props":1742,"children":1743},{"style":97},[1744],{"type":50,"value":100},{"type":44,"tag":78,"props":1746,"children":1747},{"style":91},[1748],{"type":50,"value":412},{"type":44,"tag":78,"props":1750,"children":1751},{"style":169},[1752],{"type":50,"value":1753},"named",{"type":44,"tag":78,"props":1755,"children":1756},{"style":97},[1757],{"type":50,"value":176},{"type":44,"tag":78,"props":1759,"children":1760},{"style":91},[1761],{"type":50,"value":126},{"type":44,"tag":78,"props":1763,"children":1764},{"style":118},[1765],{"type":50,"value":1655},{"type":44,"tag":78,"props":1767,"children":1768},{"style":91},[1769],{"type":50,"value":126},{"type":44,"tag":78,"props":1771,"children":1772},{"style":97},[1773],{"type":50,"value":245},{"type":44,"tag":78,"props":1775,"children":1776},{"style":91},[1777],{"type":50,"value":131},{"type":44,"tag":78,"props":1779,"children":1780},{"class":80,"line":461},[1781],{"type":44,"tag":78,"props":1782,"children":1783},{"emptyLinePlaceholder":138},[1784],{"type":50,"value":141},{"type":44,"tag":78,"props":1786,"children":1787},{"class":80,"line":469},[1788],{"type":44,"tag":78,"props":1789,"children":1790},{"style":693},[1791],{"type":50,"value":1792},"\u002F\u002F Now you can query the shared database\n",{"type":44,"tag":78,"props":1794,"children":1795},{"class":80,"line":508},[1796,1800,1804,1808,1812,1817,1821,1825,1829,1833,1837,1841,1846,1850,1854,1859],{"type":44,"tag":78,"props":1797,"children":1798},{"style":148},[1799],{"type":50,"value":151},{"type":44,"tag":78,"props":1801,"children":1802},{"style":97},[1803],{"type":50,"value":732},{"type":44,"tag":78,"props":1805,"children":1806},{"style":91},[1807],{"type":50,"value":161},{"type":44,"tag":78,"props":1809,"children":1810},{"style":85},[1811],{"type":50,"value":402},{"type":44,"tag":78,"props":1813,"children":1814},{"style":97},[1815],{"type":50,"value":1816}," sharedDb",{"type":44,"tag":78,"props":1818,"children":1819},{"style":91},[1820],{"type":50,"value":412},{"type":44,"tag":78,"props":1822,"children":1823},{"style":169},[1824],{"type":50,"value":706},{"type":44,"tag":78,"props":1826,"children":1827},{"style":91},[1828],{"type":50,"value":421},{"type":44,"tag":78,"props":1830,"children":1831},{"style":296},[1832],{"type":50,"value":426},{"type":44,"tag":78,"props":1834,"children":1835},{"style":91},[1836],{"type":50,"value":431},{"type":44,"tag":78,"props":1838,"children":1839},{"style":91},[1840],{"type":50,"value":454},{"type":44,"tag":78,"props":1842,"children":1843},{"style":118},[1844],{"type":50,"value":1845},"SELECT * FROM users WHERE id = ",{"type":44,"tag":78,"props":1847,"children":1848},{"style":91},[1849],{"type":50,"value":781},{"type":44,"tag":78,"props":1851,"children":1852},{"style":97},[1853],{"type":50,"value":961},{"type":44,"tag":78,"props":1855,"children":1856},{"style":91},[1857],{"type":50,"value":1858},"}`",{"type":44,"tag":78,"props":1860,"children":1861},{"style":91},[1862],{"type":50,"value":131},{"type":44,"tag":53,"props":1864,"children":1866},{"id":1865},"migrations",[1867],{"type":50,"value":1868},"Migrations",{"type":44,"tag":60,"props":1870,"children":1872},{"id":1871},"file-structure",[1873],{"type":50,"value":1874},"File Structure",{"type":44,"tag":67,"props":1876,"children":1880},{"className":1877,"code":1879,"language":50},[1878],"language-text","service\u002F\n└── migrations\u002F\n    ├── 001_create_users.up.sql\n    ├── 002_add_posts.up.sql\n    └── 003_add_indexes.up.sql\n",[1881],{"type":44,"tag":74,"props":1882,"children":1883},{"__ignoreMap":71},[1884],{"type":50,"value":1879},{"type":44,"tag":60,"props":1886,"children":1888},{"id":1887},"naming-convention",[1889],{"type":50,"value":1890},"Naming Convention",{"type":44,"tag":1892,"props":1893,"children":1894},"ul",{},[1895,1901,1906,1917],{"type":44,"tag":1896,"props":1897,"children":1898},"li",{},[1899],{"type":50,"value":1900},"Start with a number (001, 002, etc.)",{"type":44,"tag":1896,"props":1902,"children":1903},{},[1904],{"type":50,"value":1905},"Followed by underscore and description",{"type":44,"tag":1896,"props":1907,"children":1908},{},[1909,1911],{"type":50,"value":1910},"End with ",{"type":44,"tag":74,"props":1912,"children":1914},{"className":1913},[],[1915],{"type":50,"value":1916},".up.sql",{"type":44,"tag":1896,"props":1918,"children":1919},{},[1920],{"type":50,"value":1921},"Numbers must be sequential",{"type":44,"tag":60,"props":1923,"children":1925},{"id":1924},"example-migration",[1926],{"type":50,"value":1927},"Example Migration",{"type":44,"tag":67,"props":1929,"children":1933},{"className":1930,"code":1931,"language":1932,"meta":71,"style":71},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","-- migrations\u002F001_create_users.up.sql\nCREATE TABLE users (\n    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n    email TEXT UNIQUE NOT NULL,\n    name TEXT NOT NULL,\n    created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()\n);\n\nCREATE INDEX idx_users_email ON users(email);\n","sql",[1934],{"type":44,"tag":74,"props":1935,"children":1936},{"__ignoreMap":71},[1937,1945,1953,1961,1969,1977,1985,1993,2000],{"type":44,"tag":78,"props":1938,"children":1939},{"class":80,"line":81},[1940],{"type":44,"tag":78,"props":1941,"children":1942},{},[1943],{"type":50,"value":1944},"-- migrations\u002F001_create_users.up.sql\n",{"type":44,"tag":78,"props":1946,"children":1947},{"class":80,"line":134},[1948],{"type":44,"tag":78,"props":1949,"children":1950},{},[1951],{"type":50,"value":1952},"CREATE TABLE users (\n",{"type":44,"tag":78,"props":1954,"children":1955},{"class":80,"line":144},[1956],{"type":44,"tag":78,"props":1957,"children":1958},{},[1959],{"type":50,"value":1960},"    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n",{"type":44,"tag":78,"props":1962,"children":1963},{"class":80,"line":202},[1964],{"type":44,"tag":78,"props":1965,"children":1966},{},[1967],{"type":50,"value":1968},"    email TEXT UNIQUE NOT NULL,\n",{"type":44,"tag":78,"props":1970,"children":1971},{"class":80,"line":28},[1972],{"type":44,"tag":78,"props":1973,"children":1974},{},[1975],{"type":50,"value":1976},"    name TEXT NOT NULL,\n",{"type":44,"tag":78,"props":1978,"children":1979},{"class":80,"line":375},[1980],{"type":44,"tag":78,"props":1981,"children":1982},{},[1983],{"type":50,"value":1984},"    created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()\n",{"type":44,"tag":78,"props":1986,"children":1987},{"class":80,"line":383},[1988],{"type":44,"tag":78,"props":1989,"children":1990},{},[1991],{"type":50,"value":1992},");\n",{"type":44,"tag":78,"props":1994,"children":1995},{"class":80,"line":439},[1996],{"type":44,"tag":78,"props":1997,"children":1998},{"emptyLinePlaceholder":138},[1999],{"type":50,"value":141},{"type":44,"tag":78,"props":2001,"children":2002},{"class":80,"line":448},[2003],{"type":44,"tag":78,"props":2004,"children":2005},{},[2006],{"type":50,"value":2007},"CREATE INDEX idx_users_email ON users(email);\n",{"type":44,"tag":53,"props":2009,"children":2011},{"id":2010},"drizzle-orm-integration",[2012],{"type":50,"value":2013},"Drizzle ORM Integration",{"type":44,"tag":60,"props":2015,"children":2017},{"id":2016},"setup",[2018],{"type":50,"value":2019},"Setup",{"type":44,"tag":67,"props":2021,"children":2023},{"className":69,"code":2022,"language":15,"meta":71,"style":71},"\u002F\u002F db.ts\nimport { SQLDatabase } from \"encore.dev\u002Fstorage\u002Fsqldb\";\nimport { drizzle } from \"drizzle-orm\u002Fnode-postgres\";\n\nconst db = new SQLDatabase(\"mydb\", {\n  migrations: {\n    path: \"migrations\",\n    source: \"drizzle\",\n  },\n});\n\nexport const orm = drizzle(db.connectionString);\n",[2024],{"type":44,"tag":74,"props":2025,"children":2026},{"__ignoreMap":71},[2027,2035,2074,2115,2122,2169,2184,2212,2241,2249,2264,2271],{"type":44,"tag":78,"props":2028,"children":2029},{"class":80,"line":81},[2030],{"type":44,"tag":78,"props":2031,"children":2032},{"style":693},[2033],{"type":50,"value":2034},"\u002F\u002F db.ts\n",{"type":44,"tag":78,"props":2036,"children":2037},{"class":80,"line":134},[2038,2042,2046,2050,2054,2058,2062,2066,2070],{"type":44,"tag":78,"props":2039,"children":2040},{"style":85},[2041],{"type":50,"value":88},{"type":44,"tag":78,"props":2043,"children":2044},{"style":91},[2045],{"type":50,"value":94},{"type":44,"tag":78,"props":2047,"children":2048},{"style":97},[2049],{"type":50,"value":100},{"type":44,"tag":78,"props":2051,"children":2052},{"style":91},[2053],{"type":50,"value":105},{"type":44,"tag":78,"props":2055,"children":2056},{"style":85},[2057],{"type":50,"value":110},{"type":44,"tag":78,"props":2059,"children":2060},{"style":91},[2061],{"type":50,"value":115},{"type":44,"tag":78,"props":2063,"children":2064},{"style":118},[2065],{"type":50,"value":121},{"type":44,"tag":78,"props":2067,"children":2068},{"style":91},[2069],{"type":50,"value":126},{"type":44,"tag":78,"props":2071,"children":2072},{"style":91},[2073],{"type":50,"value":131},{"type":44,"tag":78,"props":2075,"children":2076},{"class":80,"line":144},[2077,2081,2085,2090,2094,2098,2102,2107,2111],{"type":44,"tag":78,"props":2078,"children":2079},{"style":85},[2080],{"type":50,"value":88},{"type":44,"tag":78,"props":2082,"children":2083},{"style":91},[2084],{"type":50,"value":94},{"type":44,"tag":78,"props":2086,"children":2087},{"style":97},[2088],{"type":50,"value":2089}," drizzle",{"type":44,"tag":78,"props":2091,"children":2092},{"style":91},[2093],{"type":50,"value":105},{"type":44,"tag":78,"props":2095,"children":2096},{"style":85},[2097],{"type":50,"value":110},{"type":44,"tag":78,"props":2099,"children":2100},{"style":91},[2101],{"type":50,"value":115},{"type":44,"tag":78,"props":2103,"children":2104},{"style":118},[2105],{"type":50,"value":2106},"drizzle-orm\u002Fnode-postgres",{"type":44,"tag":78,"props":2108,"children":2109},{"style":91},[2110],{"type":50,"value":126},{"type":44,"tag":78,"props":2112,"children":2113},{"style":91},[2114],{"type":50,"value":131},{"type":44,"tag":78,"props":2116,"children":2117},{"class":80,"line":202},[2118],{"type":44,"tag":78,"props":2119,"children":2120},{"emptyLinePlaceholder":138},[2121],{"type":50,"value":141},{"type":44,"tag":78,"props":2123,"children":2124},{"class":80,"line":28},[2125,2129,2133,2137,2141,2145,2149,2153,2157,2161,2165],{"type":44,"tag":78,"props":2126,"children":2127},{"style":148},[2128],{"type":50,"value":151},{"type":44,"tag":78,"props":2130,"children":2131},{"style":97},[2132],{"type":50,"value":156},{"type":44,"tag":78,"props":2134,"children":2135},{"style":91},[2136],{"type":50,"value":161},{"type":44,"tag":78,"props":2138,"children":2139},{"style":91},[2140],{"type":50,"value":166},{"type":44,"tag":78,"props":2142,"children":2143},{"style":169},[2144],{"type":50,"value":100},{"type":44,"tag":78,"props":2146,"children":2147},{"style":97},[2148],{"type":50,"value":176},{"type":44,"tag":78,"props":2150,"children":2151},{"style":91},[2152],{"type":50,"value":126},{"type":44,"tag":78,"props":2154,"children":2155},{"style":118},[2156],{"type":50,"value":185},{"type":44,"tag":78,"props":2158,"children":2159},{"style":91},[2160],{"type":50,"value":126},{"type":44,"tag":78,"props":2162,"children":2163},{"style":91},[2164],{"type":50,"value":194},{"type":44,"tag":78,"props":2166,"children":2167},{"style":91},[2168],{"type":50,"value":199},{"type":44,"tag":78,"props":2170,"children":2171},{"class":80,"line":375},[2172,2176,2180],{"type":44,"tag":78,"props":2173,"children":2174},{"style":206},[2175],{"type":50,"value":209},{"type":44,"tag":78,"props":2177,"children":2178},{"style":91},[2179],{"type":50,"value":214},{"type":44,"tag":78,"props":2181,"children":2182},{"style":91},[2183],{"type":50,"value":199},{"type":44,"tag":78,"props":2185,"children":2186},{"class":80,"line":383},[2187,2192,2196,2200,2204,2208],{"type":44,"tag":78,"props":2188,"children":2189},{"style":206},[2190],{"type":50,"value":2191},"    path",{"type":44,"tag":78,"props":2193,"children":2194},{"style":91},[2195],{"type":50,"value":214},{"type":44,"tag":78,"props":2197,"children":2198},{"style":91},[2199],{"type":50,"value":115},{"type":44,"tag":78,"props":2201,"children":2202},{"style":118},[2203],{"type":50,"value":1865},{"type":44,"tag":78,"props":2205,"children":2206},{"style":91},[2207],{"type":50,"value":126},{"type":44,"tag":78,"props":2209,"children":2210},{"style":91},[2211],{"type":50,"value":232},{"type":44,"tag":78,"props":2213,"children":2214},{"class":80,"line":439},[2215,2220,2224,2228,2233,2237],{"type":44,"tag":78,"props":2216,"children":2217},{"style":206},[2218],{"type":50,"value":2219},"    source",{"type":44,"tag":78,"props":2221,"children":2222},{"style":91},[2223],{"type":50,"value":214},{"type":44,"tag":78,"props":2225,"children":2226},{"style":91},[2227],{"type":50,"value":115},{"type":44,"tag":78,"props":2229,"children":2230},{"style":118},[2231],{"type":50,"value":2232},"drizzle",{"type":44,"tag":78,"props":2234,"children":2235},{"style":91},[2236],{"type":50,"value":126},{"type":44,"tag":78,"props":2238,"children":2239},{"style":91},[2240],{"type":50,"value":232},{"type":44,"tag":78,"props":2242,"children":2243},{"class":80,"line":448},[2244],{"type":44,"tag":78,"props":2245,"children":2246},{"style":91},[2247],{"type":50,"value":2248},"  },\n",{"type":44,"tag":78,"props":2250,"children":2251},{"class":80,"line":461},[2252,2256,2260],{"type":44,"tag":78,"props":2253,"children":2254},{"style":91},[2255],{"type":50,"value":240},{"type":44,"tag":78,"props":2257,"children":2258},{"style":97},[2259],{"type":50,"value":245},{"type":44,"tag":78,"props":2261,"children":2262},{"style":91},[2263],{"type":50,"value":131},{"type":44,"tag":78,"props":2265,"children":2266},{"class":80,"line":469},[2267],{"type":44,"tag":78,"props":2268,"children":2269},{"emptyLinePlaceholder":138},[2270],{"type":50,"value":141},{"type":44,"tag":78,"props":2272,"children":2273},{"class":80,"line":508},[2274,2279,2284,2289,2293,2297,2302,2306,2311],{"type":44,"tag":78,"props":2275,"children":2276},{"style":85},[2277],{"type":50,"value":2278},"export",{"type":44,"tag":78,"props":2280,"children":2281},{"style":148},[2282],{"type":50,"value":2283}," const",{"type":44,"tag":78,"props":2285,"children":2286},{"style":97},[2287],{"type":50,"value":2288}," orm ",{"type":44,"tag":78,"props":2290,"children":2291},{"style":91},[2292],{"type":50,"value":161},{"type":44,"tag":78,"props":2294,"children":2295},{"style":169},[2296],{"type":50,"value":2089},{"type":44,"tag":78,"props":2298,"children":2299},{"style":97},[2300],{"type":50,"value":2301},"(db",{"type":44,"tag":78,"props":2303,"children":2304},{"style":91},[2305],{"type":50,"value":412},{"type":44,"tag":78,"props":2307,"children":2308},{"style":97},[2309],{"type":50,"value":2310},"connectionString)",{"type":44,"tag":78,"props":2312,"children":2313},{"style":91},[2314],{"type":50,"value":131},{"type":44,"tag":60,"props":2316,"children":2318},{"id":2317},"schema",[2319],{"type":50,"value":2320},"Schema",{"type":44,"tag":67,"props":2322,"children":2324},{"className":69,"code":2323,"language":15,"meta":71,"style":71},"\u002F\u002F schema.ts\nimport * as p from \"drizzle-orm\u002Fpg-core\";\n\nexport const users = p.pgTable(\"users\", {\n  id: p.uuid().primaryKey().defaultRandom(),\n  email: p.text().unique().notNull(),\n  name: p.text().notNull(),\n  createdAt: p.timestamp().defaultNow(),\n});\n",[2325],{"type":44,"tag":74,"props":2326,"children":2327},{"__ignoreMap":71},[2328,2336,2380,2387,2445,2504,2561,2604,2650],{"type":44,"tag":78,"props":2329,"children":2330},{"class":80,"line":81},[2331],{"type":44,"tag":78,"props":2332,"children":2333},{"style":693},[2334],{"type":50,"value":2335},"\u002F\u002F schema.ts\n",{"type":44,"tag":78,"props":2337,"children":2338},{"class":80,"line":134},[2339,2343,2348,2353,2358,2363,2367,2372,2376],{"type":44,"tag":78,"props":2340,"children":2341},{"style":85},[2342],{"type":50,"value":88},{"type":44,"tag":78,"props":2344,"children":2345},{"style":91},[2346],{"type":50,"value":2347}," *",{"type":44,"tag":78,"props":2349,"children":2350},{"style":85},[2351],{"type":50,"value":2352}," as",{"type":44,"tag":78,"props":2354,"children":2355},{"style":97},[2356],{"type":50,"value":2357}," p ",{"type":44,"tag":78,"props":2359,"children":2360},{"style":85},[2361],{"type":50,"value":2362},"from",{"type":44,"tag":78,"props":2364,"children":2365},{"style":91},[2366],{"type":50,"value":115},{"type":44,"tag":78,"props":2368,"children":2369},{"style":118},[2370],{"type":50,"value":2371},"drizzle-orm\u002Fpg-core",{"type":44,"tag":78,"props":2373,"children":2374},{"style":91},[2375],{"type":50,"value":126},{"type":44,"tag":78,"props":2377,"children":2378},{"style":91},[2379],{"type":50,"value":131},{"type":44,"tag":78,"props":2381,"children":2382},{"class":80,"line":144},[2383],{"type":44,"tag":78,"props":2384,"children":2385},{"emptyLinePlaceholder":138},[2386],{"type":50,"value":141},{"type":44,"tag":78,"props":2388,"children":2389},{"class":80,"line":202},[2390,2394,2398,2402,2406,2411,2415,2420,2424,2428,2433,2437,2441],{"type":44,"tag":78,"props":2391,"children":2392},{"style":85},[2393],{"type":50,"value":2278},{"type":44,"tag":78,"props":2395,"children":2396},{"style":148},[2397],{"type":50,"value":2283},{"type":44,"tag":78,"props":2399,"children":2400},{"style":97},[2401],{"type":50,"value":633},{"type":44,"tag":78,"props":2403,"children":2404},{"style":91},[2405],{"type":50,"value":161},{"type":44,"tag":78,"props":2407,"children":2408},{"style":97},[2409],{"type":50,"value":2410}," p",{"type":44,"tag":78,"props":2412,"children":2413},{"style":91},[2414],{"type":50,"value":412},{"type":44,"tag":78,"props":2416,"children":2417},{"style":169},[2418],{"type":50,"value":2419},"pgTable",{"type":44,"tag":78,"props":2421,"children":2422},{"style":97},[2423],{"type":50,"value":176},{"type":44,"tag":78,"props":2425,"children":2426},{"style":91},[2427],{"type":50,"value":126},{"type":44,"tag":78,"props":2429,"children":2430},{"style":118},[2431],{"type":50,"value":2432},"users",{"type":44,"tag":78,"props":2434,"children":2435},{"style":91},[2436],{"type":50,"value":126},{"type":44,"tag":78,"props":2438,"children":2439},{"style":91},[2440],{"type":50,"value":194},{"type":44,"tag":78,"props":2442,"children":2443},{"style":91},[2444],{"type":50,"value":199},{"type":44,"tag":78,"props":2446,"children":2447},{"class":80,"line":28},[2448,2452,2456,2460,2464,2469,2474,2478,2483,2487,2491,2496,2500],{"type":44,"tag":78,"props":2449,"children":2450},{"style":206},[2451],{"type":50,"value":311},{"type":44,"tag":78,"props":2453,"children":2454},{"style":91},[2455],{"type":50,"value":214},{"type":44,"tag":78,"props":2457,"children":2458},{"style":97},[2459],{"type":50,"value":2410},{"type":44,"tag":78,"props":2461,"children":2462},{"style":91},[2463],{"type":50,"value":412},{"type":44,"tag":78,"props":2465,"children":2466},{"style":169},[2467],{"type":50,"value":2468},"uuid",{"type":44,"tag":78,"props":2470,"children":2471},{"style":97},[2472],{"type":50,"value":2473},"()",{"type":44,"tag":78,"props":2475,"children":2476},{"style":91},[2477],{"type":50,"value":412},{"type":44,"tag":78,"props":2479,"children":2480},{"style":169},[2481],{"type":50,"value":2482},"primaryKey",{"type":44,"tag":78,"props":2484,"children":2485},{"style":97},[2486],{"type":50,"value":2473},{"type":44,"tag":78,"props":2488,"children":2489},{"style":91},[2490],{"type":50,"value":412},{"type":44,"tag":78,"props":2492,"children":2493},{"style":169},[2494],{"type":50,"value":2495},"defaultRandom",{"type":44,"tag":78,"props":2497,"children":2498},{"style":97},[2499],{"type":50,"value":2473},{"type":44,"tag":78,"props":2501,"children":2502},{"style":91},[2503],{"type":50,"value":232},{"type":44,"tag":78,"props":2505,"children":2506},{"class":80,"line":375},[2507,2511,2515,2519,2523,2527,2531,2535,2540,2544,2548,2553,2557],{"type":44,"tag":78,"props":2508,"children":2509},{"style":206},[2510],{"type":50,"value":332},{"type":44,"tag":78,"props":2512,"children":2513},{"style":91},[2514],{"type":50,"value":214},{"type":44,"tag":78,"props":2516,"children":2517},{"style":97},[2518],{"type":50,"value":2410},{"type":44,"tag":78,"props":2520,"children":2521},{"style":91},[2522],{"type":50,"value":412},{"type":44,"tag":78,"props":2524,"children":2525},{"style":169},[2526],{"type":50,"value":50},{"type":44,"tag":78,"props":2528,"children":2529},{"style":97},[2530],{"type":50,"value":2473},{"type":44,"tag":78,"props":2532,"children":2533},{"style":91},[2534],{"type":50,"value":412},{"type":44,"tag":78,"props":2536,"children":2537},{"style":169},[2538],{"type":50,"value":2539},"unique",{"type":44,"tag":78,"props":2541,"children":2542},{"style":97},[2543],{"type":50,"value":2473},{"type":44,"tag":78,"props":2545,"children":2546},{"style":91},[2547],{"type":50,"value":412},{"type":44,"tag":78,"props":2549,"children":2550},{"style":169},[2551],{"type":50,"value":2552},"notNull",{"type":44,"tag":78,"props":2554,"children":2555},{"style":97},[2556],{"type":50,"value":2473},{"type":44,"tag":78,"props":2558,"children":2559},{"style":91},[2560],{"type":50,"value":232},{"type":44,"tag":78,"props":2562,"children":2563},{"class":80,"line":383},[2564,2568,2572,2576,2580,2584,2588,2592,2596,2600],{"type":44,"tag":78,"props":2565,"children":2566},{"style":206},[2567],{"type":50,"value":352},{"type":44,"tag":78,"props":2569,"children":2570},{"style":91},[2571],{"type":50,"value":214},{"type":44,"tag":78,"props":2573,"children":2574},{"style":97},[2575],{"type":50,"value":2410},{"type":44,"tag":78,"props":2577,"children":2578},{"style":91},[2579],{"type":50,"value":412},{"type":44,"tag":78,"props":2581,"children":2582},{"style":169},[2583],{"type":50,"value":50},{"type":44,"tag":78,"props":2585,"children":2586},{"style":97},[2587],{"type":50,"value":2473},{"type":44,"tag":78,"props":2589,"children":2590},{"style":91},[2591],{"type":50,"value":412},{"type":44,"tag":78,"props":2593,"children":2594},{"style":169},[2595],{"type":50,"value":2552},{"type":44,"tag":78,"props":2597,"children":2598},{"style":97},[2599],{"type":50,"value":2473},{"type":44,"tag":78,"props":2601,"children":2602},{"style":91},[2603],{"type":50,"value":232},{"type":44,"tag":78,"props":2605,"children":2606},{"class":80,"line":439},[2607,2612,2616,2620,2624,2629,2633,2637,2642,2646],{"type":44,"tag":78,"props":2608,"children":2609},{"style":206},[2610],{"type":50,"value":2611},"  createdAt",{"type":44,"tag":78,"props":2613,"children":2614},{"style":91},[2615],{"type":50,"value":214},{"type":44,"tag":78,"props":2617,"children":2618},{"style":97},[2619],{"type":50,"value":2410},{"type":44,"tag":78,"props":2621,"children":2622},{"style":91},[2623],{"type":50,"value":412},{"type":44,"tag":78,"props":2625,"children":2626},{"style":169},[2627],{"type":50,"value":2628},"timestamp",{"type":44,"tag":78,"props":2630,"children":2631},{"style":97},[2632],{"type":50,"value":2473},{"type":44,"tag":78,"props":2634,"children":2635},{"style":91},[2636],{"type":50,"value":412},{"type":44,"tag":78,"props":2638,"children":2639},{"style":169},[2640],{"type":50,"value":2641},"defaultNow",{"type":44,"tag":78,"props":2643,"children":2644},{"style":97},[2645],{"type":50,"value":2473},{"type":44,"tag":78,"props":2647,"children":2648},{"style":91},[2649],{"type":50,"value":232},{"type":44,"tag":78,"props":2651,"children":2652},{"class":80,"line":448},[2653,2657,2661],{"type":44,"tag":78,"props":2654,"children":2655},{"style":91},[2656],{"type":50,"value":240},{"type":44,"tag":78,"props":2658,"children":2659},{"style":97},[2660],{"type":50,"value":245},{"type":44,"tag":78,"props":2662,"children":2663},{"style":91},[2664],{"type":50,"value":131},{"type":44,"tag":60,"props":2666,"children":2668},{"id":2667},"drizzle-config",[2669],{"type":50,"value":2670},"Drizzle Config",{"type":44,"tag":67,"props":2672,"children":2674},{"className":69,"code":2673,"language":15,"meta":71,"style":71},"\u002F\u002F drizzle.config.ts\nimport { defineConfig } from \"drizzle-kit\";\n\nexport default defineConfig({\n  out: \"migrations\",\n  schema: \"schema.ts\",\n  dialect: \"postgresql\",\n});\n",[2675],{"type":44,"tag":74,"props":2676,"children":2677},{"__ignoreMap":71},[2678,2686,2727,2734,2758,2786,2815,2844],{"type":44,"tag":78,"props":2679,"children":2680},{"class":80,"line":81},[2681],{"type":44,"tag":78,"props":2682,"children":2683},{"style":693},[2684],{"type":50,"value":2685},"\u002F\u002F drizzle.config.ts\n",{"type":44,"tag":78,"props":2687,"children":2688},{"class":80,"line":134},[2689,2693,2697,2702,2706,2710,2714,2719,2723],{"type":44,"tag":78,"props":2690,"children":2691},{"style":85},[2692],{"type":50,"value":88},{"type":44,"tag":78,"props":2694,"children":2695},{"style":91},[2696],{"type":50,"value":94},{"type":44,"tag":78,"props":2698,"children":2699},{"style":97},[2700],{"type":50,"value":2701}," defineConfig",{"type":44,"tag":78,"props":2703,"children":2704},{"style":91},[2705],{"type":50,"value":105},{"type":44,"tag":78,"props":2707,"children":2708},{"style":85},[2709],{"type":50,"value":110},{"type":44,"tag":78,"props":2711,"children":2712},{"style":91},[2713],{"type":50,"value":115},{"type":44,"tag":78,"props":2715,"children":2716},{"style":118},[2717],{"type":50,"value":2718},"drizzle-kit",{"type":44,"tag":78,"props":2720,"children":2721},{"style":91},[2722],{"type":50,"value":126},{"type":44,"tag":78,"props":2724,"children":2725},{"style":91},[2726],{"type":50,"value":131},{"type":44,"tag":78,"props":2728,"children":2729},{"class":80,"line":144},[2730],{"type":44,"tag":78,"props":2731,"children":2732},{"emptyLinePlaceholder":138},[2733],{"type":50,"value":141},{"type":44,"tag":78,"props":2735,"children":2736},{"class":80,"line":202},[2737,2741,2746,2750,2754],{"type":44,"tag":78,"props":2738,"children":2739},{"style":85},[2740],{"type":50,"value":2278},{"type":44,"tag":78,"props":2742,"children":2743},{"style":85},[2744],{"type":50,"value":2745}," default",{"type":44,"tag":78,"props":2747,"children":2748},{"style":169},[2749],{"type":50,"value":2701},{"type":44,"tag":78,"props":2751,"children":2752},{"style":97},[2753],{"type":50,"value":176},{"type":44,"tag":78,"props":2755,"children":2756},{"style":91},[2757],{"type":50,"value":547},{"type":44,"tag":78,"props":2759,"children":2760},{"class":80,"line":28},[2761,2766,2770,2774,2778,2782],{"type":44,"tag":78,"props":2762,"children":2763},{"style":206},[2764],{"type":50,"value":2765},"  out",{"type":44,"tag":78,"props":2767,"children":2768},{"style":91},[2769],{"type":50,"value":214},{"type":44,"tag":78,"props":2771,"children":2772},{"style":91},[2773],{"type":50,"value":115},{"type":44,"tag":78,"props":2775,"children":2776},{"style":118},[2777],{"type":50,"value":1865},{"type":44,"tag":78,"props":2779,"children":2780},{"style":91},[2781],{"type":50,"value":126},{"type":44,"tag":78,"props":2783,"children":2784},{"style":91},[2785],{"type":50,"value":232},{"type":44,"tag":78,"props":2787,"children":2788},{"class":80,"line":375},[2789,2794,2798,2802,2807,2811],{"type":44,"tag":78,"props":2790,"children":2791},{"style":206},[2792],{"type":50,"value":2793},"  schema",{"type":44,"tag":78,"props":2795,"children":2796},{"style":91},[2797],{"type":50,"value":214},{"type":44,"tag":78,"props":2799,"children":2800},{"style":91},[2801],{"type":50,"value":115},{"type":44,"tag":78,"props":2803,"children":2804},{"style":118},[2805],{"type":50,"value":2806},"schema.ts",{"type":44,"tag":78,"props":2808,"children":2809},{"style":91},[2810],{"type":50,"value":126},{"type":44,"tag":78,"props":2812,"children":2813},{"style":91},[2814],{"type":50,"value":232},{"type":44,"tag":78,"props":2816,"children":2817},{"class":80,"line":383},[2818,2823,2827,2831,2836,2840],{"type":44,"tag":78,"props":2819,"children":2820},{"style":206},[2821],{"type":50,"value":2822},"  dialect",{"type":44,"tag":78,"props":2824,"children":2825},{"style":91},[2826],{"type":50,"value":214},{"type":44,"tag":78,"props":2828,"children":2829},{"style":91},[2830],{"type":50,"value":115},{"type":44,"tag":78,"props":2832,"children":2833},{"style":118},[2834],{"type":50,"value":2835},"postgresql",{"type":44,"tag":78,"props":2837,"children":2838},{"style":91},[2839],{"type":50,"value":126},{"type":44,"tag":78,"props":2841,"children":2842},{"style":91},[2843],{"type":50,"value":232},{"type":44,"tag":78,"props":2845,"children":2846},{"class":80,"line":439},[2847,2851,2855],{"type":44,"tag":78,"props":2848,"children":2849},{"style":91},[2850],{"type":50,"value":240},{"type":44,"tag":78,"props":2852,"children":2853},{"style":97},[2854],{"type":50,"value":245},{"type":44,"tag":78,"props":2856,"children":2857},{"style":91},[2858],{"type":50,"value":131},{"type":44,"tag":257,"props":2860,"children":2861},{},[2862,2864],{"type":50,"value":2863},"Generate migrations: ",{"type":44,"tag":74,"props":2865,"children":2867},{"className":2866},[],[2868],{"type":50,"value":2869},"drizzle-kit generate",{"type":44,"tag":60,"props":2871,"children":2873},{"id":2872},"using-drizzle",[2874],{"type":50,"value":2875},"Using Drizzle",{"type":44,"tag":67,"props":2877,"children":2879},{"className":69,"code":2878,"language":15,"meta":71,"style":71},"import { orm } from \".\u002Fdb\";\nimport { users } from \".\u002Fschema\";\nimport { eq } from \"drizzle-orm\";\n\n\u002F\u002F Select\nconst allUsers = await orm.select().from(users);\nconst user = await orm.select().from(users).where(eq(users.id, id));\n\n\u002F\u002F Insert\nawait orm.insert(users).values({ email, name });\n\n\u002F\u002F Update\nawait orm.update(users).set({ name }).where(eq(users.id, id));\n\n\u002F\u002F Delete\nawait orm.delete(users).where(eq(users.id, id));\n",[2880],{"type":44,"tag":74,"props":2881,"children":2882},{"__ignoreMap":71},[2883,2924,2964,3005,3012,3020,3074,3165,3172,3180,3248,3255,3263,3356,3363,3372],{"type":44,"tag":78,"props":2884,"children":2885},{"class":80,"line":81},[2886,2890,2894,2899,2903,2907,2911,2916,2920],{"type":44,"tag":78,"props":2887,"children":2888},{"style":85},[2889],{"type":50,"value":88},{"type":44,"tag":78,"props":2891,"children":2892},{"style":91},[2893],{"type":50,"value":94},{"type":44,"tag":78,"props":2895,"children":2896},{"style":97},[2897],{"type":50,"value":2898}," orm",{"type":44,"tag":78,"props":2900,"children":2901},{"style":91},[2902],{"type":50,"value":105},{"type":44,"tag":78,"props":2904,"children":2905},{"style":85},[2906],{"type":50,"value":110},{"type":44,"tag":78,"props":2908,"children":2909},{"style":91},[2910],{"type":50,"value":115},{"type":44,"tag":78,"props":2912,"children":2913},{"style":118},[2914],{"type":50,"value":2915},".\u002Fdb",{"type":44,"tag":78,"props":2917,"children":2918},{"style":91},[2919],{"type":50,"value":126},{"type":44,"tag":78,"props":2921,"children":2922},{"style":91},[2923],{"type":50,"value":131},{"type":44,"tag":78,"props":2925,"children":2926},{"class":80,"line":134},[2927,2931,2935,2939,2943,2947,2951,2956,2960],{"type":44,"tag":78,"props":2928,"children":2929},{"style":85},[2930],{"type":50,"value":88},{"type":44,"tag":78,"props":2932,"children":2933},{"style":91},[2934],{"type":50,"value":94},{"type":44,"tag":78,"props":2936,"children":2937},{"style":97},[2938],{"type":50,"value":479},{"type":44,"tag":78,"props":2940,"children":2941},{"style":91},[2942],{"type":50,"value":105},{"type":44,"tag":78,"props":2944,"children":2945},{"style":85},[2946],{"type":50,"value":110},{"type":44,"tag":78,"props":2948,"children":2949},{"style":91},[2950],{"type":50,"value":115},{"type":44,"tag":78,"props":2952,"children":2953},{"style":118},[2954],{"type":50,"value":2955},".\u002Fschema",{"type":44,"tag":78,"props":2957,"children":2958},{"style":91},[2959],{"type":50,"value":126},{"type":44,"tag":78,"props":2961,"children":2962},{"style":91},[2963],{"type":50,"value":131},{"type":44,"tag":78,"props":2965,"children":2966},{"class":80,"line":144},[2967,2971,2975,2980,2984,2988,2992,2997,3001],{"type":44,"tag":78,"props":2968,"children":2969},{"style":85},[2970],{"type":50,"value":88},{"type":44,"tag":78,"props":2972,"children":2973},{"style":91},[2974],{"type":50,"value":94},{"type":44,"tag":78,"props":2976,"children":2977},{"style":97},[2978],{"type":50,"value":2979}," eq",{"type":44,"tag":78,"props":2981,"children":2982},{"style":91},[2983],{"type":50,"value":105},{"type":44,"tag":78,"props":2985,"children":2986},{"style":85},[2987],{"type":50,"value":110},{"type":44,"tag":78,"props":2989,"children":2990},{"style":91},[2991],{"type":50,"value":115},{"type":44,"tag":78,"props":2993,"children":2994},{"style":118},[2995],{"type":50,"value":2996},"drizzle-orm",{"type":44,"tag":78,"props":2998,"children":2999},{"style":91},[3000],{"type":50,"value":126},{"type":44,"tag":78,"props":3002,"children":3003},{"style":91},[3004],{"type":50,"value":131},{"type":44,"tag":78,"props":3006,"children":3007},{"class":80,"line":202},[3008],{"type":44,"tag":78,"props":3009,"children":3010},{"emptyLinePlaceholder":138},[3011],{"type":50,"value":141},{"type":44,"tag":78,"props":3013,"children":3014},{"class":80,"line":28},[3015],{"type":44,"tag":78,"props":3016,"children":3017},{"style":693},[3018],{"type":50,"value":3019},"\u002F\u002F Select\n",{"type":44,"tag":78,"props":3021,"children":3022},{"class":80,"line":375},[3023,3027,3032,3036,3040,3044,3048,3053,3057,3061,3065,3070],{"type":44,"tag":78,"props":3024,"children":3025},{"style":148},[3026],{"type":50,"value":151},{"type":44,"tag":78,"props":3028,"children":3029},{"style":97},[3030],{"type":50,"value":3031}," allUsers ",{"type":44,"tag":78,"props":3033,"children":3034},{"style":91},[3035],{"type":50,"value":161},{"type":44,"tag":78,"props":3037,"children":3038},{"style":85},[3039],{"type":50,"value":402},{"type":44,"tag":78,"props":3041,"children":3042},{"style":97},[3043],{"type":50,"value":2898},{"type":44,"tag":78,"props":3045,"children":3046},{"style":91},[3047],{"type":50,"value":412},{"type":44,"tag":78,"props":3049,"children":3050},{"style":169},[3051],{"type":50,"value":3052},"select",{"type":44,"tag":78,"props":3054,"children":3055},{"style":97},[3056],{"type":50,"value":2473},{"type":44,"tag":78,"props":3058,"children":3059},{"style":91},[3060],{"type":50,"value":412},{"type":44,"tag":78,"props":3062,"children":3063},{"style":169},[3064],{"type":50,"value":2362},{"type":44,"tag":78,"props":3066,"children":3067},{"style":97},[3068],{"type":50,"value":3069},"(users)",{"type":44,"tag":78,"props":3071,"children":3072},{"style":91},[3073],{"type":50,"value":131},{"type":44,"tag":78,"props":3075,"children":3076},{"class":80,"line":383},[3077,3081,3085,3089,3093,3097,3101,3105,3109,3113,3117,3121,3125,3130,3134,3139,3144,3148,3152,3156,3161],{"type":44,"tag":78,"props":3078,"children":3079},{"style":148},[3080],{"type":50,"value":151},{"type":44,"tag":78,"props":3082,"children":3083},{"style":97},[3084],{"type":50,"value":732},{"type":44,"tag":78,"props":3086,"children":3087},{"style":91},[3088],{"type":50,"value":161},{"type":44,"tag":78,"props":3090,"children":3091},{"style":85},[3092],{"type":50,"value":402},{"type":44,"tag":78,"props":3094,"children":3095},{"style":97},[3096],{"type":50,"value":2898},{"type":44,"tag":78,"props":3098,"children":3099},{"style":91},[3100],{"type":50,"value":412},{"type":44,"tag":78,"props":3102,"children":3103},{"style":169},[3104],{"type":50,"value":3052},{"type":44,"tag":78,"props":3106,"children":3107},{"style":97},[3108],{"type":50,"value":2473},{"type":44,"tag":78,"props":3110,"children":3111},{"style":91},[3112],{"type":50,"value":412},{"type":44,"tag":78,"props":3114,"children":3115},{"style":169},[3116],{"type":50,"value":2362},{"type":44,"tag":78,"props":3118,"children":3119},{"style":97},[3120],{"type":50,"value":3069},{"type":44,"tag":78,"props":3122,"children":3123},{"style":91},[3124],{"type":50,"value":412},{"type":44,"tag":78,"props":3126,"children":3127},{"style":169},[3128],{"type":50,"value":3129},"where",{"type":44,"tag":78,"props":3131,"children":3132},{"style":97},[3133],{"type":50,"value":176},{"type":44,"tag":78,"props":3135,"children":3136},{"style":169},[3137],{"type":50,"value":3138},"eq",{"type":44,"tag":78,"props":3140,"children":3141},{"style":97},[3142],{"type":50,"value":3143},"(users",{"type":44,"tag":78,"props":3145,"children":3146},{"style":91},[3147],{"type":50,"value":412},{"type":44,"tag":78,"props":3149,"children":3150},{"style":97},[3151],{"type":50,"value":961},{"type":44,"tag":78,"props":3153,"children":3154},{"style":91},[3155],{"type":50,"value":194},{"type":44,"tag":78,"props":3157,"children":3158},{"style":97},[3159],{"type":50,"value":3160}," id))",{"type":44,"tag":78,"props":3162,"children":3163},{"style":91},[3164],{"type":50,"value":131},{"type":44,"tag":78,"props":3166,"children":3167},{"class":80,"line":439},[3168],{"type":44,"tag":78,"props":3169,"children":3170},{"emptyLinePlaceholder":138},[3171],{"type":50,"value":141},{"type":44,"tag":78,"props":3173,"children":3174},{"class":80,"line":448},[3175],{"type":44,"tag":78,"props":3176,"children":3177},{"style":693},[3178],{"type":50,"value":3179},"\u002F\u002F Insert\n",{"type":44,"tag":78,"props":3181,"children":3182},{"class":80,"line":461},[3183,3187,3191,3195,3200,3204,3208,3213,3217,3222,3227,3231,3236,3240,3244],{"type":44,"tag":78,"props":3184,"children":3185},{"style":85},[3186],{"type":50,"value":920},{"type":44,"tag":78,"props":3188,"children":3189},{"style":97},[3190],{"type":50,"value":2898},{"type":44,"tag":78,"props":3192,"children":3193},{"style":91},[3194],{"type":50,"value":412},{"type":44,"tag":78,"props":3196,"children":3197},{"style":169},[3198],{"type":50,"value":3199},"insert",{"type":44,"tag":78,"props":3201,"children":3202},{"style":97},[3203],{"type":50,"value":3069},{"type":44,"tag":78,"props":3205,"children":3206},{"style":91},[3207],{"type":50,"value":412},{"type":44,"tag":78,"props":3209,"children":3210},{"style":169},[3211],{"type":50,"value":3212},"values",{"type":44,"tag":78,"props":3214,"children":3215},{"style":97},[3216],{"type":50,"value":176},{"type":44,"tag":78,"props":3218,"children":3219},{"style":91},[3220],{"type":50,"value":3221},"{",{"type":44,"tag":78,"props":3223,"children":3224},{"style":97},[3225],{"type":50,"value":3226}," email",{"type":44,"tag":78,"props":3228,"children":3229},{"style":91},[3230],{"type":50,"value":194},{"type":44,"tag":78,"props":3232,"children":3233},{"style":97},[3234],{"type":50,"value":3235}," name ",{"type":44,"tag":78,"props":3237,"children":3238},{"style":91},[3239],{"type":50,"value":240},{"type":44,"tag":78,"props":3241,"children":3242},{"style":97},[3243],{"type":50,"value":245},{"type":44,"tag":78,"props":3245,"children":3246},{"style":91},[3247],{"type":50,"value":131},{"type":44,"tag":78,"props":3249,"children":3250},{"class":80,"line":469},[3251],{"type":44,"tag":78,"props":3252,"children":3253},{"emptyLinePlaceholder":138},[3254],{"type":50,"value":141},{"type":44,"tag":78,"props":3256,"children":3257},{"class":80,"line":508},[3258],{"type":44,"tag":78,"props":3259,"children":3260},{"style":693},[3261],{"type":50,"value":3262},"\u002F\u002F Update\n",{"type":44,"tag":78,"props":3264,"children":3265},{"class":80,"line":550},[3266,3270,3274,3278,3283,3287,3291,3296,3300,3304,3308,3312,3316,3320,3324,3328,3332,3336,3340,3344,3348,3352],{"type":44,"tag":78,"props":3267,"children":3268},{"style":85},[3269],{"type":50,"value":920},{"type":44,"tag":78,"props":3271,"children":3272},{"style":97},[3273],{"type":50,"value":2898},{"type":44,"tag":78,"props":3275,"children":3276},{"style":91},[3277],{"type":50,"value":412},{"type":44,"tag":78,"props":3279,"children":3280},{"style":169},[3281],{"type":50,"value":3282},"update",{"type":44,"tag":78,"props":3284,"children":3285},{"style":97},[3286],{"type":50,"value":3069},{"type":44,"tag":78,"props":3288,"children":3289},{"style":91},[3290],{"type":50,"value":412},{"type":44,"tag":78,"props":3292,"children":3293},{"style":169},[3294],{"type":50,"value":3295},"set",{"type":44,"tag":78,"props":3297,"children":3298},{"style":97},[3299],{"type":50,"value":176},{"type":44,"tag":78,"props":3301,"children":3302},{"style":91},[3303],{"type":50,"value":3221},{"type":44,"tag":78,"props":3305,"children":3306},{"style":97},[3307],{"type":50,"value":3235},{"type":44,"tag":78,"props":3309,"children":3310},{"style":91},[3311],{"type":50,"value":240},{"type":44,"tag":78,"props":3313,"children":3314},{"style":97},[3315],{"type":50,"value":245},{"type":44,"tag":78,"props":3317,"children":3318},{"style":91},[3319],{"type":50,"value":412},{"type":44,"tag":78,"props":3321,"children":3322},{"style":169},[3323],{"type":50,"value":3129},{"type":44,"tag":78,"props":3325,"children":3326},{"style":97},[3327],{"type":50,"value":176},{"type":44,"tag":78,"props":3329,"children":3330},{"style":169},[3331],{"type":50,"value":3138},{"type":44,"tag":78,"props":3333,"children":3334},{"style":97},[3335],{"type":50,"value":3143},{"type":44,"tag":78,"props":3337,"children":3338},{"style":91},[3339],{"type":50,"value":412},{"type":44,"tag":78,"props":3341,"children":3342},{"style":97},[3343],{"type":50,"value":961},{"type":44,"tag":78,"props":3345,"children":3346},{"style":91},[3347],{"type":50,"value":194},{"type":44,"tag":78,"props":3349,"children":3350},{"style":97},[3351],{"type":50,"value":3160},{"type":44,"tag":78,"props":3353,"children":3354},{"style":91},[3355],{"type":50,"value":131},{"type":44,"tag":78,"props":3357,"children":3358},{"class":80,"line":585},[3359],{"type":44,"tag":78,"props":3360,"children":3361},{"emptyLinePlaceholder":138},[3362],{"type":50,"value":141},{"type":44,"tag":78,"props":3364,"children":3366},{"class":80,"line":3365},15,[3367],{"type":44,"tag":78,"props":3368,"children":3369},{"style":693},[3370],{"type":50,"value":3371},"\u002F\u002F Delete\n",{"type":44,"tag":78,"props":3373,"children":3375},{"class":80,"line":3374},16,[3376,3380,3384,3388,3393,3397,3401,3405,3409,3413,3417,3421,3425,3429,3433],{"type":44,"tag":78,"props":3377,"children":3378},{"style":85},[3379],{"type":50,"value":920},{"type":44,"tag":78,"props":3381,"children":3382},{"style":97},[3383],{"type":50,"value":2898},{"type":44,"tag":78,"props":3385,"children":3386},{"style":91},[3387],{"type":50,"value":412},{"type":44,"tag":78,"props":3389,"children":3390},{"style":169},[3391],{"type":50,"value":3392},"delete",{"type":44,"tag":78,"props":3394,"children":3395},{"style":97},[3396],{"type":50,"value":3069},{"type":44,"tag":78,"props":3398,"children":3399},{"style":91},[3400],{"type":50,"value":412},{"type":44,"tag":78,"props":3402,"children":3403},{"style":169},[3404],{"type":50,"value":3129},{"type":44,"tag":78,"props":3406,"children":3407},{"style":97},[3408],{"type":50,"value":176},{"type":44,"tag":78,"props":3410,"children":3411},{"style":169},[3412],{"type":50,"value":3138},{"type":44,"tag":78,"props":3414,"children":3415},{"style":97},[3416],{"type":50,"value":3143},{"type":44,"tag":78,"props":3418,"children":3419},{"style":91},[3420],{"type":50,"value":412},{"type":44,"tag":78,"props":3422,"children":3423},{"style":97},[3424],{"type":50,"value":961},{"type":44,"tag":78,"props":3426,"children":3427},{"style":91},[3428],{"type":50,"value":194},{"type":44,"tag":78,"props":3430,"children":3431},{"style":97},[3432],{"type":50,"value":3160},{"type":44,"tag":78,"props":3434,"children":3435},{"style":91},[3436],{"type":50,"value":131},{"type":44,"tag":53,"props":3438,"children":3440},{"id":3439},"sql-injection-protection",[3441],{"type":50,"value":3442},"SQL Injection Protection",{"type":44,"tag":257,"props":3444,"children":3445},{},[3446],{"type":50,"value":3447},"Encore's template literals automatically escape values:",{"type":44,"tag":67,"props":3449,"children":3451},{"className":69,"code":3450,"language":15,"meta":71,"style":71},"\u002F\u002F SAFE - values are parameterized\nconst email = \"user@example.com\";\nawait db.queryRow`SELECT * FROM users WHERE email = ${email}`;\n\n\u002F\u002F WRONG - SQL injection risk\nawait db.queryRow(`SELECT * FROM users WHERE email = '${email}'`);\n",[3452],{"type":44,"tag":74,"props":3453,"children":3454},{"__ignoreMap":71},[3455,3463,3496,3540,3547,3555],{"type":44,"tag":78,"props":3456,"children":3457},{"class":80,"line":81},[3458],{"type":44,"tag":78,"props":3459,"children":3460},{"style":693},[3461],{"type":50,"value":3462},"\u002F\u002F SAFE - values are parameterized\n",{"type":44,"tag":78,"props":3464,"children":3465},{"class":80,"line":134},[3466,3470,3475,3479,3483,3488,3492],{"type":44,"tag":78,"props":3467,"children":3468},{"style":148},[3469],{"type":50,"value":151},{"type":44,"tag":78,"props":3471,"children":3472},{"style":97},[3473],{"type":50,"value":3474}," email ",{"type":44,"tag":78,"props":3476,"children":3477},{"style":91},[3478],{"type":50,"value":161},{"type":44,"tag":78,"props":3480,"children":3481},{"style":91},[3482],{"type":50,"value":115},{"type":44,"tag":78,"props":3484,"children":3485},{"style":118},[3486],{"type":50,"value":3487},"user@example.com",{"type":44,"tag":78,"props":3489,"children":3490},{"style":91},[3491],{"type":50,"value":126},{"type":44,"tag":78,"props":3493,"children":3494},{"style":91},[3495],{"type":50,"value":131},{"type":44,"tag":78,"props":3497,"children":3498},{"class":80,"line":144},[3499,3503,3507,3511,3515,3519,3524,3528,3532,3536],{"type":44,"tag":78,"props":3500,"children":3501},{"style":85},[3502],{"type":50,"value":920},{"type":44,"tag":78,"props":3504,"children":3505},{"style":97},[3506],{"type":50,"value":407},{"type":44,"tag":78,"props":3508,"children":3509},{"style":91},[3510],{"type":50,"value":412},{"type":44,"tag":78,"props":3512,"children":3513},{"style":169},[3514],{"type":50,"value":706},{"type":44,"tag":78,"props":3516,"children":3517},{"style":91},[3518],{"type":50,"value":454},{"type":44,"tag":78,"props":3520,"children":3521},{"style":118},[3522],{"type":50,"value":3523},"SELECT * FROM users WHERE email = ",{"type":44,"tag":78,"props":3525,"children":3526},{"style":91},[3527],{"type":50,"value":781},{"type":44,"tag":78,"props":3529,"children":3530},{"style":97},[3531],{"type":50,"value":979},{"type":44,"tag":78,"props":3533,"children":3534},{"style":91},[3535],{"type":50,"value":1858},{"type":44,"tag":78,"props":3537,"children":3538},{"style":91},[3539],{"type":50,"value":131},{"type":44,"tag":78,"props":3541,"children":3542},{"class":80,"line":202},[3543],{"type":44,"tag":78,"props":3544,"children":3545},{"emptyLinePlaceholder":138},[3546],{"type":50,"value":141},{"type":44,"tag":78,"props":3548,"children":3549},{"class":80,"line":28},[3550],{"type":44,"tag":78,"props":3551,"children":3552},{"style":693},[3553],{"type":50,"value":3554},"\u002F\u002F WRONG - SQL injection risk\n",{"type":44,"tag":78,"props":3556,"children":3557},{"class":80,"line":375},[3558,3562,3566,3570,3574,3578,3582,3587,3591,3595,3599,3604,3608,3612],{"type":44,"tag":78,"props":3559,"children":3560},{"style":85},[3561],{"type":50,"value":920},{"type":44,"tag":78,"props":3563,"children":3564},{"style":97},[3565],{"type":50,"value":407},{"type":44,"tag":78,"props":3567,"children":3568},{"style":91},[3569],{"type":50,"value":412},{"type":44,"tag":78,"props":3571,"children":3572},{"style":169},[3573],{"type":50,"value":706},{"type":44,"tag":78,"props":3575,"children":3576},{"style":97},[3577],{"type":50,"value":176},{"type":44,"tag":78,"props":3579,"children":3580},{"style":91},[3581],{"type":50,"value":454},{"type":44,"tag":78,"props":3583,"children":3584},{"style":118},[3585],{"type":50,"value":3586},"SELECT * FROM users WHERE email = '",{"type":44,"tag":78,"props":3588,"children":3589},{"style":91},[3590],{"type":50,"value":781},{"type":44,"tag":78,"props":3592,"children":3593},{"style":97},[3594],{"type":50,"value":979},{"type":44,"tag":78,"props":3596,"children":3597},{"style":91},[3598],{"type":50,"value":240},{"type":44,"tag":78,"props":3600,"children":3601},{"style":118},[3602],{"type":50,"value":3603},"'",{"type":44,"tag":78,"props":3605,"children":3606},{"style":91},[3607],{"type":50,"value":454},{"type":44,"tag":78,"props":3609,"children":3610},{"style":97},[3611],{"type":50,"value":245},{"type":44,"tag":78,"props":3613,"children":3614},{"style":91},[3615],{"type":50,"value":131},{"type":44,"tag":53,"props":3617,"children":3619},{"id":3618},"guidelines",[3620],{"type":50,"value":3621},"Guidelines",{"type":44,"tag":1892,"props":3623,"children":3624},{},[3625,3630,3648,3653,3665,3676,3681],{"type":44,"tag":1896,"props":3626,"children":3627},{},[3628],{"type":50,"value":3629},"Always use template literals for queries (automatic escaping)",{"type":44,"tag":1896,"props":3631,"children":3632},{},[3633,3635,3641,3642],{"type":50,"value":3634},"Specify types with generics: ",{"type":44,"tag":74,"props":3636,"children":3638},{"className":3637},[],[3639],{"type":50,"value":3640},"query\u003CUser>",{"type":50,"value":970},{"type":44,"tag":74,"props":3643,"children":3645},{"className":3644},[],[3646],{"type":50,"value":3647},"queryRow\u003CUser>",{"type":44,"tag":1896,"props":3649,"children":3650},{},[3651],{"type":50,"value":3652},"Migrations are applied automatically on startup",{"type":44,"tag":1896,"props":3654,"children":3655},{},[3656,3658,3663],{"type":50,"value":3657},"Use ",{"type":44,"tag":74,"props":3659,"children":3661},{"className":3660},[],[3662],{"type":50,"value":706},{"type":50,"value":3664}," when expecting 0 or 1 result",{"type":44,"tag":1896,"props":3666,"children":3667},{},[3668,3669,3674],{"type":50,"value":3657},{"type":44,"tag":74,"props":3670,"children":3672},{"className":3671},[],[3673],{"type":50,"value":271},{"type":50,"value":3675}," with async iteration for multiple rows",{"type":44,"tag":1896,"props":3677,"children":3678},{},[3679],{"type":50,"value":3680},"Database names should be lowercase, descriptive",{"type":44,"tag":1896,"props":3682,"children":3683},{},[3684],{"type":50,"value":3685},"Each service typically has its own database",{"type":44,"tag":3687,"props":3688,"children":3689},"style",{},[3690],{"type":50,"value":3691},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":3693,"total":3787},[3694,3706,3718,3736,3752,3764,3780],{"slug":3695,"name":3695,"fn":3696,"description":3697,"org":3698,"tags":3699,"stars":24,"repoUrl":25,"updatedAt":3705},"encore-api","build type-safe APIs with Encore","Define typed API endpoints in Encore.ts using `api(...)` from `encore.dev\u002Fapi`. Covers typed request\u002Fresponse interfaces, path\u002Fquery\u002Fheader\u002Fcookie params, request validation, and `APIError`. For raw endpoints (`api.raw()`) and inbound webhooks, use `encore-webhook` instead.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3700,3703,3704],{"name":3701,"slug":3702,"type":16},"API Development","api-development",{"name":9,"slug":8,"type":16},{"name":14,"slug":15,"type":16},"2026-04-06T18:09:46.044101",{"slug":3707,"name":3707,"fn":3708,"description":3709,"org":3710,"tags":3711,"stars":24,"repoUrl":25,"updatedAt":3717},"encore-auth","implement Encore.ts authentication","Protect Encore.ts endpoints with authentication and authorize callers. Covers `authHandler`, `Gateway`, `getAuthData`, and `auth: true`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3712,3715,3716],{"name":3713,"slug":3714,"type":16},"Auth","auth",{"name":9,"slug":8,"type":16},{"name":14,"slug":15,"type":16},"2026-04-06T18:09:47.336322",{"slug":3719,"name":3719,"fn":3720,"description":3721,"org":3722,"tags":3723,"stars":24,"repoUrl":25,"updatedAt":3735},"encore-bucket","store files in Encore.ts buckets","Store unstructured files in Encore.ts using `Bucket` from `encore.dev\u002Fstorage\u002Fobjects` — uploads, images, documents, blobs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3724,3727,3728,3731,3734],{"name":3725,"slug":3726,"type":16},"Backend","backend",{"name":9,"slug":8,"type":16},{"name":3729,"slug":3730,"type":16},"File Storage","file-storage",{"name":3732,"slug":3733,"type":16},"File Uploads","file-uploads",{"name":14,"slug":15,"type":16},"2026-05-16T05:59:52.813772",{"slug":3737,"name":3737,"fn":3738,"description":3739,"org":3740,"tags":3741,"stars":24,"repoUrl":25,"updatedAt":3751},"encore-cache","cache data in Redis with Encore.ts","Cache data in Redis from Encore.ts using `CacheCluster` and typed keyspaces from `encore.dev\u002Fstorage\u002Fcache`. Type-safe key\u002Fvalue access with TTLs, atomic increments, and per-keyspace data shapes.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3742,3743,3746,3747,3750],{"name":3725,"slug":3726,"type":16},{"name":3744,"slug":3745,"type":16},"Caching","caching",{"name":9,"slug":8,"type":16},{"name":3748,"slug":3749,"type":16},"Redis","redis",{"name":14,"slug":15,"type":16},"2026-05-16T05:59:56.808328",{"slug":3753,"name":3753,"fn":3754,"description":3755,"org":3756,"tags":3757,"stars":24,"repoUrl":25,"updatedAt":3763},"encore-code-review","review Encore.ts code","Review existing Encore.ts code for best practices and common anti-patterns.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3758,3761,3762],{"name":3759,"slug":3760,"type":16},"Code Review","code-review",{"name":9,"slug":8,"type":16},{"name":14,"slug":15,"type":16},"2026-04-06T18:10:01.123999",{"slug":3765,"name":3765,"fn":3766,"description":3767,"org":3768,"tags":3769,"stars":24,"repoUrl":25,"updatedAt":3779},"encore-cron","schedule recurring jobs in Encore.ts","Schedule periodic \u002F recurring work in Encore.ts using `CronJob` from `encore.dev\u002Fcron`. Covers `every: \"1h\"` interval syntax and `schedule: \"0 9 * * 1\"` cron expressions.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3770,3773,3774,3775,3778],{"name":3771,"slug":3772,"type":16},"Automation","automation",{"name":3725,"slug":3726,"type":16},{"name":9,"slug":8,"type":16},{"name":3776,"slug":3777,"type":16},"Scheduling","scheduling",{"name":14,"slug":15,"type":16},"2026-05-16T05:59:54.146651",{"slug":4,"name":4,"fn":5,"description":6,"org":3781,"tags":3782,"stars":24,"repoUrl":25,"updatedAt":26},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3783,3784,3785,3786],{"name":19,"slug":20,"type":16},{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},{"name":14,"slug":15,"type":16},28,{"items":3789,"total":3787},[3790,3796,3802,3810,3818,3824,3832,3839,3856,3873,3885,3896],{"slug":3695,"name":3695,"fn":3696,"description":3697,"org":3791,"tags":3792,"stars":24,"repoUrl":25,"updatedAt":3705},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3793,3794,3795],{"name":3701,"slug":3702,"type":16},{"name":9,"slug":8,"type":16},{"name":14,"slug":15,"type":16},{"slug":3707,"name":3707,"fn":3708,"description":3709,"org":3797,"tags":3798,"stars":24,"repoUrl":25,"updatedAt":3717},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3799,3800,3801],{"name":3713,"slug":3714,"type":16},{"name":9,"slug":8,"type":16},{"name":14,"slug":15,"type":16},{"slug":3719,"name":3719,"fn":3720,"description":3721,"org":3803,"tags":3804,"stars":24,"repoUrl":25,"updatedAt":3735},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3805,3806,3807,3808,3809],{"name":3725,"slug":3726,"type":16},{"name":9,"slug":8,"type":16},{"name":3729,"slug":3730,"type":16},{"name":3732,"slug":3733,"type":16},{"name":14,"slug":15,"type":16},{"slug":3737,"name":3737,"fn":3738,"description":3739,"org":3811,"tags":3812,"stars":24,"repoUrl":25,"updatedAt":3751},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3813,3814,3815,3816,3817],{"name":3725,"slug":3726,"type":16},{"name":3744,"slug":3745,"type":16},{"name":9,"slug":8,"type":16},{"name":3748,"slug":3749,"type":16},{"name":14,"slug":15,"type":16},{"slug":3753,"name":3753,"fn":3754,"description":3755,"org":3819,"tags":3820,"stars":24,"repoUrl":25,"updatedAt":3763},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3821,3822,3823],{"name":3759,"slug":3760,"type":16},{"name":9,"slug":8,"type":16},{"name":14,"slug":15,"type":16},{"slug":3765,"name":3765,"fn":3766,"description":3767,"org":3825,"tags":3826,"stars":24,"repoUrl":25,"updatedAt":3779},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3827,3828,3829,3830,3831],{"name":3771,"slug":3772,"type":16},{"name":3725,"slug":3726,"type":16},{"name":9,"slug":8,"type":16},{"name":3776,"slug":3777,"type":16},{"name":14,"slug":15,"type":16},{"slug":4,"name":4,"fn":5,"description":6,"org":3833,"tags":3834,"stars":24,"repoUrl":25,"updatedAt":26},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3835,3836,3837,3838],{"name":19,"slug":20,"type":16},{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},{"name":14,"slug":15,"type":16},{"slug":3840,"name":3840,"fn":3841,"description":3842,"org":3843,"tags":3844,"stars":24,"repoUrl":25,"updatedAt":3855},"encore-frontend","connect frontend to Encore backend","Connect a frontend application (React, Next.js, Vue, Svelte, etc.) to an Encore.ts backend.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3845,3846,3849,3852],{"name":9,"slug":8,"type":16},{"name":3847,"slug":3848,"type":16},"Frontend","frontend",{"name":3850,"slug":3851,"type":16},"Next.js","next-js",{"name":3853,"slug":3854,"type":16},"React","react","2026-04-06T18:09:56.091006",{"slug":3857,"name":3857,"fn":3858,"description":3859,"org":3860,"tags":3861,"stars":24,"repoUrl":25,"updatedAt":3872},"encore-getting-started","build and run applications with Encore.ts","Bootstrap a brand-new Encore.ts project from zero. Only for first-time CLI install and `encore app create` — not for architecture or feature questions.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3862,3863,3864,3865,3868,3869],{"name":3701,"slug":3702,"type":16},{"name":3725,"slug":3726,"type":16},{"name":9,"slug":8,"type":16},{"name":3866,"slug":3867,"type":16},"Local Development","local-development",{"name":14,"slug":15,"type":16},{"name":3870,"slug":3871,"type":16},"Web Development","web-development","2026-04-06T18:10:04.885446",{"slug":3874,"name":3874,"fn":3875,"description":3876,"org":3877,"tags":3878,"stars":24,"repoUrl":25,"updatedAt":3884},"encore-go-api","build APIs with Encore Go","Define typed API endpoints in Encore Go using `\u002F\u002Fencore:api` annotations. Covers typed request\u002Fresponse structs, path\u002Fquery\u002Fheader\u002Fcookie params, and error returns. For raw endpoints (`\u002F\u002Fencore:api raw`) and inbound webhooks, use `encore-go-webhook` instead.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3879,3880,3881],{"name":3701,"slug":3702,"type":16},{"name":9,"slug":8,"type":16},{"name":3882,"slug":3883,"type":16},"Go","go","2026-04-06T18:09:48.578781",{"slug":3886,"name":3886,"fn":3887,"description":3888,"org":3889,"tags":3890,"stars":24,"repoUrl":25,"updatedAt":3895},"encore-go-auth","implement authentication with Encore Go","Protect Encore Go endpoints with authentication and authorize callers. Covers `auth.AuthHandler`, `auth.UserID`, the `Authorization` header, and `\u002F\u002Fencore:api auth`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3891,3892,3893,3894],{"name":3713,"slug":3714,"type":16},{"name":3725,"slug":3726,"type":16},{"name":9,"slug":8,"type":16},{"name":3882,"slug":3883,"type":16},"2026-04-06T18:09:51.065102",{"slug":3897,"name":3897,"fn":3898,"description":3899,"org":3900,"tags":3901,"stars":24,"repoUrl":25,"updatedAt":3909},"encore-go-bucket","store files in Encore Go buckets","Store unstructured files in Encore Go using `objects.NewBucket` from `encore.dev\u002Fstorage\u002Fobjects` — uploads, images, documents, blobs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3902,3903,3904,3905,3906],{"name":3725,"slug":3726,"type":16},{"name":9,"slug":8,"type":16},{"name":3729,"slug":3730,"type":16},{"name":3882,"slug":3883,"type":16},{"name":3907,"slug":3908,"type":16},"Storage","storage","2026-05-16T06:00:03.633918"]