[{"data":1,"prerenderedAt":1250},["ShallowReactive",2],{"navigation_docs":3,"-getting-started-installation":74,"-getting-started-installation-surround":1245},[4,20,65],{"title":5,"path":6,"stem":7,"children":8,"page":19},"Getting Started","/getting-started","1.getting-started",[9,14],{"title":10,"path":11,"stem":12,"icon":13},"Introduction","/getting-started/introduction","1.getting-started/1.introduction","i-lucide-house",{"title":15,"path":16,"stem":17,"icon":18},"Installation","/getting-started/installation","1.getting-started/2.installation","i-lucide-download",false,{"title":21,"path":22,"stem":23,"children":24,"page":19},"Models","/models","2.models",[25,30,35,40,45,50,55,60],{"title":26,"path":27,"stem":28,"icon":29},"Defining Models","/models/defining-models","2.models/1.defining-models","i-lucide-database",{"title":31,"path":32,"stem":33,"icon":34},"Retrieving Models","/models/retrieving","2.models/2.retrieving","i-lucide-database-search",{"title":36,"path":37,"stem":38,"icon":39},"Inserting & Updating Models","/models/inserting-and-updating","2.models/3.inserting-and-updating","i-lucide-between-horizontal-start",{"title":41,"path":42,"stem":43,"icon":44},"Deleting Models","/models/deleting","2.models/4.deleting","i-lucide-trash",{"title":46,"path":47,"stem":48,"icon":49},"Relationships","/models/relationships","2.models/5.relationships","i-lucide-share-2",{"title":51,"path":52,"stem":53,"icon":54},"Events","/models/events","2.models/6.events","i-lucide-bell",{"title":56,"path":57,"stem":58,"icon":59},"Migrations & Seeders","/models/migrations-and-seeders","2.models/7.migrations-and-seeders","i-lucide-wrench",{"title":61,"path":62,"stem":63,"icon":64},"Transactions","/models/transactions","2.models/8.transactions","i-lucide-git-commit-horizontal",{"title":66,"path":67,"stem":68,"children":69,"page":19},"Contributing","/contributing","3.contributing",[70],{"title":71,"path":72,"stem":73},"Local Development","/contributing/local-development","3.contributing/1.local-development",{"id":75,"title":15,"body":76,"description":1237,"extension":1238,"links":1239,"meta":1240,"navigation":1241,"path":16,"seo":1242,"stem":17,"__hash__":1244},"docs/1.getting-started/2.installation.md",{"type":77,"value":78,"toc":1233},"minimark",[79,1229],[80,81,82,87,99,117,130,133,142,147,156,905,909,921,1201,1205,1208,1226],"steps",{},[83,84,86],"h3",{"id":85},"install-and-configure-kysely","Install and configure Kysely",[88,89,90,91,98],"p",{},"Follow the instructions on the Kysely ",[92,93,97],"a",{"href":94,"rel":95},"https://kysely.dev/docs/getting-started",[96],"nofollow","Getting Started guide"," to set up Kysely in your project.",[100,101,107],"pre",{"className":102,"code":103,"filename":104,"language":105,"meta":106,"style":106},"language-sh shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm install kysely\n","Terminal","sh","",[108,109,110],"code",{"__ignoreMap":106},[111,112,115],"span",{"class":113,"line":114},"line",1,[111,116,103],{},[88,118,119,120,123,124,129],{},"Kysely also requires a database driver, so be sure to install the appropriate driver for your database as well. For example, if you're using PostgreSQL, you would install ",[108,121,122],{},"pg",". Check the Kysely ",[92,125,128],{"href":126,"rel":127},"https://kysely.dev/docs/getting-started#dialects",[96],"Dialects documentation"," for the appropriate driver for your database.",[88,131,132],{},"For PostgreSQL:",[100,134,136],{"className":102,"code":135,"filename":104,"language":105,"meta":106,"style":106},"npm install pg\n",[108,137,138],{"__ignoreMap":106},[111,139,140],{"class":113,"line":114},[111,141,135],{},[143,144,146],"h4",{"id":145},"configure-kysely-types","Configure Kysely Types",[88,148,149,150,155],{},"Kysely requires you to define your database types. This is a crucial step for ensuring type safety when working with your database. You can follow the instructions in the ",[92,151,154],{"href":152,"rel":153},"https://kysely.dev/docs/getting-started#types",[96],"Kysely documentation to set up your database types",". Here is an example type configuration for a database.",[100,157,162],{"className":158,"code":159,"filename":160,"language":161,"meta":106,"style":106},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { ColumnType, Generated, Insertable, JSONColumnType, Selectable, Updateable } from \"kysely\";\n\nexport interface Database {\n  person: PersonTable;\n  pet: PetTable;\n}\n\n// This interface describes the `person` table to Kysely. Table\n// interfaces should only be used in the `Database` type above\n// and never as a result type of a query!. See the `Person`,\n// `NewPerson` and `PersonUpdate` types below.\nexport interface PersonTable {\n  // Columns that are generated by the database should be marked\n  // using the `Generated` type. This way they are automatically\n  // made optional in inserts and updates.\n  id: Generated\u003Cnumber>;\n\n  first_name: string;\n  gender: \"man\" | \"woman\" | \"other\";\n\n  // If the column is nullable in the database, make its type nullable.\n  // Don't use optional properties. Optionality is always determined\n  // automatically by Kysely.\n  last_name: string | null;\n\n  // You can specify a different type for each operation (select, insert and\n  // update) using the `ColumnType\u003CSelectType, InsertType, UpdateType>`\n  // wrapper. Here we define a column `created_at` that is selected as\n  // a `Date`, can optionally be provided as a `string` in inserts and\n  // can never be updated:\n  created_at: ColumnType\u003CDate, string | undefined, never>;\n\n  // You can specify JSON columns using the `JSONColumnType` wrapper.\n  // It is a shorthand for `ColumnType\u003CT, string, string>`, where T\n  // is the type of the JSON object/array retrieved from the database,\n  // and the insert and update types are always `string` since you're\n  // always stringifying insert/update values.\n  metadata: JSONColumnType\u003C{\n    login_at: string;\n    ip: string | null;\n    agent: string | null;\n    plan: \"free\" | \"premium\";\n  }>;\n}\n\n// You should not use the table schema interfaces directly. Instead, you should\n// use the `Selectable`, `Insertable` and `Updateable` wrappers. These wrappers\n// make sure that the correct types are used in each operation.\n//\n// Most of the time you should trust the type inference and not use explicit\n// types at all. These types can be useful when typing function arguments.\nexport type Person = Selectable\u003CPersonTable>;\nexport type NewPerson = Insertable\u003CPersonTable>;\nexport type PersonUpdate = Updateable\u003CPersonTable>;\n\nexport interface PetTable {\n  id: Generated\u003Cnumber>;\n  name: string;\n  owner_id: number;\n  species: \"dog\" | \"cat\";\n}\n\nexport type Pet = Selectable\u003CPetTable>;\nexport type NewPet = Insertable\u003CPetTable>;\nexport type PetUpdate = Updateable\u003CPetTable>;\n","types/database.ts","ts",[108,163,164,223,230,247,262,275,281,286,293,299,305,311,322,328,334,340,359,364,377,413,418,424,430,436,453,458,464,470,476,482,488,519,524,530,536,542,548,554,567,579,595,611,637,643,648,653,659,665,671,677,683,689,712,732,752,757,768,783,795,808,834,839,844,865,885],{"__ignoreMap":106},[111,165,166,170,174,178,181,184,186,189,191,194,196,199,201,204,207,210,213,217,220],{"class":113,"line":114},[111,167,169],{"class":168},"s7zQu","import",[111,171,173],{"class":172},"sMK4o"," {",[111,175,177],{"class":176},"sTEyZ"," ColumnType",[111,179,180],{"class":172},",",[111,182,183],{"class":176}," Generated",[111,185,180],{"class":172},[111,187,188],{"class":176}," Insertable",[111,190,180],{"class":172},[111,192,193],{"class":176}," JSONColumnType",[111,195,180],{"class":172},[111,197,198],{"class":176}," Selectable",[111,200,180],{"class":172},[111,202,203],{"class":176}," Updateable",[111,205,206],{"class":172}," }",[111,208,209],{"class":168}," from",[111,211,212],{"class":172}," \"",[111,214,216],{"class":215},"sfazB","kysely",[111,218,219],{"class":172},"\"",[111,221,222],{"class":172},";\n",[111,224,226],{"class":113,"line":225},2,[111,227,229],{"emptyLinePlaceholder":228},true,"\n",[111,231,233,236,240,244],{"class":113,"line":232},3,[111,234,235],{"class":168},"export",[111,237,239],{"class":238},"spNyl"," interface",[111,241,243],{"class":242},"sBMFI"," Database",[111,245,246],{"class":172}," {\n",[111,248,250,254,257,260],{"class":113,"line":249},4,[111,251,253],{"class":252},"swJcz","  person",[111,255,256],{"class":172},":",[111,258,259],{"class":242}," PersonTable",[111,261,222],{"class":172},[111,263,265,268,270,273],{"class":113,"line":264},5,[111,266,267],{"class":252},"  pet",[111,269,256],{"class":172},[111,271,272],{"class":242}," PetTable",[111,274,222],{"class":172},[111,276,278],{"class":113,"line":277},6,[111,279,280],{"class":172},"}\n",[111,282,284],{"class":113,"line":283},7,[111,285,229],{"emptyLinePlaceholder":228},[111,287,289],{"class":113,"line":288},8,[111,290,292],{"class":291},"sHwdD","// This interface describes the `person` table to Kysely. Table\n",[111,294,296],{"class":113,"line":295},9,[111,297,298],{"class":291},"// interfaces should only be used in the `Database` type above\n",[111,300,302],{"class":113,"line":301},10,[111,303,304],{"class":291},"// and never as a result type of a query!. See the `Person`,\n",[111,306,308],{"class":113,"line":307},11,[111,309,310],{"class":291},"// `NewPerson` and `PersonUpdate` types below.\n",[111,312,314,316,318,320],{"class":113,"line":313},12,[111,315,235],{"class":168},[111,317,239],{"class":238},[111,319,259],{"class":242},[111,321,246],{"class":172},[111,323,325],{"class":113,"line":324},13,[111,326,327],{"class":291},"  // Columns that are generated by the database should be marked\n",[111,329,331],{"class":113,"line":330},14,[111,332,333],{"class":291},"  // using the `Generated` type. This way they are automatically\n",[111,335,337],{"class":113,"line":336},15,[111,338,339],{"class":291},"  // made optional in inserts and updates.\n",[111,341,343,346,348,350,353,356],{"class":113,"line":342},16,[111,344,345],{"class":252},"  id",[111,347,256],{"class":172},[111,349,183],{"class":242},[111,351,352],{"class":172},"\u003C",[111,354,355],{"class":242},"number",[111,357,358],{"class":172},">;\n",[111,360,362],{"class":113,"line":361},17,[111,363,229],{"emptyLinePlaceholder":228},[111,365,367,370,372,375],{"class":113,"line":366},18,[111,368,369],{"class":252},"  first_name",[111,371,256],{"class":172},[111,373,374],{"class":242}," string",[111,376,222],{"class":172},[111,378,380,383,385,387,390,392,395,397,400,402,404,406,409,411],{"class":113,"line":379},19,[111,381,382],{"class":252},"  gender",[111,384,256],{"class":172},[111,386,212],{"class":172},[111,388,389],{"class":215},"man",[111,391,219],{"class":172},[111,393,394],{"class":172}," |",[111,396,212],{"class":172},[111,398,399],{"class":215},"woman",[111,401,219],{"class":172},[111,403,394],{"class":172},[111,405,212],{"class":172},[111,407,408],{"class":215},"other",[111,410,219],{"class":172},[111,412,222],{"class":172},[111,414,416],{"class":113,"line":415},20,[111,417,229],{"emptyLinePlaceholder":228},[111,419,421],{"class":113,"line":420},21,[111,422,423],{"class":291},"  // If the column is nullable in the database, make its type nullable.\n",[111,425,427],{"class":113,"line":426},22,[111,428,429],{"class":291},"  // Don't use optional properties. Optionality is always determined\n",[111,431,433],{"class":113,"line":432},23,[111,434,435],{"class":291},"  // automatically by Kysely.\n",[111,437,439,442,444,446,448,451],{"class":113,"line":438},24,[111,440,441],{"class":252},"  last_name",[111,443,256],{"class":172},[111,445,374],{"class":242},[111,447,394],{"class":172},[111,449,450],{"class":242}," null",[111,452,222],{"class":172},[111,454,456],{"class":113,"line":455},25,[111,457,229],{"emptyLinePlaceholder":228},[111,459,461],{"class":113,"line":460},26,[111,462,463],{"class":291},"  // You can specify a different type for each operation (select, insert and\n",[111,465,467],{"class":113,"line":466},27,[111,468,469],{"class":291},"  // update) using the `ColumnType\u003CSelectType, InsertType, UpdateType>`\n",[111,471,473],{"class":113,"line":472},28,[111,474,475],{"class":291},"  // wrapper. Here we define a column `created_at` that is selected as\n",[111,477,479],{"class":113,"line":478},29,[111,480,481],{"class":291},"  // a `Date`, can optionally be provided as a `string` in inserts and\n",[111,483,485],{"class":113,"line":484},30,[111,486,487],{"class":291},"  // can never be updated:\n",[111,489,491,494,496,498,500,503,505,507,509,512,514,517],{"class":113,"line":490},31,[111,492,493],{"class":252},"  created_at",[111,495,256],{"class":172},[111,497,177],{"class":242},[111,499,352],{"class":172},[111,501,502],{"class":242},"Date",[111,504,180],{"class":172},[111,506,374],{"class":242},[111,508,394],{"class":172},[111,510,511],{"class":242}," undefined",[111,513,180],{"class":172},[111,515,516],{"class":242}," never",[111,518,358],{"class":172},[111,520,522],{"class":113,"line":521},32,[111,523,229],{"emptyLinePlaceholder":228},[111,525,527],{"class":113,"line":526},33,[111,528,529],{"class":291},"  // You can specify JSON columns using the `JSONColumnType` wrapper.\n",[111,531,533],{"class":113,"line":532},34,[111,534,535],{"class":291},"  // It is a shorthand for `ColumnType\u003CT, string, string>`, where T\n",[111,537,539],{"class":113,"line":538},35,[111,540,541],{"class":291},"  // is the type of the JSON object/array retrieved from the database,\n",[111,543,545],{"class":113,"line":544},36,[111,546,547],{"class":291},"  // and the insert and update types are always `string` since you're\n",[111,549,551],{"class":113,"line":550},37,[111,552,553],{"class":291},"  // always stringifying insert/update values.\n",[111,555,557,560,562,564],{"class":113,"line":556},38,[111,558,559],{"class":252},"  metadata",[111,561,256],{"class":172},[111,563,193],{"class":242},[111,565,566],{"class":172},"\u003C{\n",[111,568,570,573,575,577],{"class":113,"line":569},39,[111,571,572],{"class":252},"    login_at",[111,574,256],{"class":172},[111,576,374],{"class":242},[111,578,222],{"class":172},[111,580,582,585,587,589,591,593],{"class":113,"line":581},40,[111,583,584],{"class":252},"    ip",[111,586,256],{"class":172},[111,588,374],{"class":242},[111,590,394],{"class":172},[111,592,450],{"class":242},[111,594,222],{"class":172},[111,596,598,601,603,605,607,609],{"class":113,"line":597},41,[111,599,600],{"class":252},"    agent",[111,602,256],{"class":172},[111,604,374],{"class":242},[111,606,394],{"class":172},[111,608,450],{"class":242},[111,610,222],{"class":172},[111,612,614,617,619,621,624,626,628,630,633,635],{"class":113,"line":613},42,[111,615,616],{"class":252},"    plan",[111,618,256],{"class":172},[111,620,212],{"class":172},[111,622,623],{"class":215},"free",[111,625,219],{"class":172},[111,627,394],{"class":172},[111,629,212],{"class":172},[111,631,632],{"class":215},"premium",[111,634,219],{"class":172},[111,636,222],{"class":172},[111,638,640],{"class":113,"line":639},43,[111,641,642],{"class":172},"  }>;\n",[111,644,646],{"class":113,"line":645},44,[111,647,280],{"class":172},[111,649,651],{"class":113,"line":650},45,[111,652,229],{"emptyLinePlaceholder":228},[111,654,656],{"class":113,"line":655},46,[111,657,658],{"class":291},"// You should not use the table schema interfaces directly. Instead, you should\n",[111,660,662],{"class":113,"line":661},47,[111,663,664],{"class":291},"// use the `Selectable`, `Insertable` and `Updateable` wrappers. These wrappers\n",[111,666,668],{"class":113,"line":667},48,[111,669,670],{"class":291},"// make sure that the correct types are used in each operation.\n",[111,672,674],{"class":113,"line":673},49,[111,675,676],{"class":291},"//\n",[111,678,680],{"class":113,"line":679},50,[111,681,682],{"class":291},"// Most of the time you should trust the type inference and not use explicit\n",[111,684,686],{"class":113,"line":685},51,[111,687,688],{"class":291},"// types at all. These types can be useful when typing function arguments.\n",[111,690,692,694,697,700,703,705,707,710],{"class":113,"line":691},52,[111,693,235],{"class":168},[111,695,696],{"class":238}," type",[111,698,699],{"class":242}," Person",[111,701,702],{"class":172}," =",[111,704,198],{"class":242},[111,706,352],{"class":172},[111,708,709],{"class":242},"PersonTable",[111,711,358],{"class":172},[111,713,715,717,719,722,724,726,728,730],{"class":113,"line":714},53,[111,716,235],{"class":168},[111,718,696],{"class":238},[111,720,721],{"class":242}," NewPerson",[111,723,702],{"class":172},[111,725,188],{"class":242},[111,727,352],{"class":172},[111,729,709],{"class":242},[111,731,358],{"class":172},[111,733,735,737,739,742,744,746,748,750],{"class":113,"line":734},54,[111,736,235],{"class":168},[111,738,696],{"class":238},[111,740,741],{"class":242}," PersonUpdate",[111,743,702],{"class":172},[111,745,203],{"class":242},[111,747,352],{"class":172},[111,749,709],{"class":242},[111,751,358],{"class":172},[111,753,755],{"class":113,"line":754},55,[111,756,229],{"emptyLinePlaceholder":228},[111,758,760,762,764,766],{"class":113,"line":759},56,[111,761,235],{"class":168},[111,763,239],{"class":238},[111,765,272],{"class":242},[111,767,246],{"class":172},[111,769,771,773,775,777,779,781],{"class":113,"line":770},57,[111,772,345],{"class":252},[111,774,256],{"class":172},[111,776,183],{"class":242},[111,778,352],{"class":172},[111,780,355],{"class":242},[111,782,358],{"class":172},[111,784,786,789,791,793],{"class":113,"line":785},58,[111,787,788],{"class":252},"  name",[111,790,256],{"class":172},[111,792,374],{"class":242},[111,794,222],{"class":172},[111,796,798,801,803,806],{"class":113,"line":797},59,[111,799,800],{"class":252},"  owner_id",[111,802,256],{"class":172},[111,804,805],{"class":242}," number",[111,807,222],{"class":172},[111,809,811,814,816,818,821,823,825,827,830,832],{"class":113,"line":810},60,[111,812,813],{"class":252},"  species",[111,815,256],{"class":172},[111,817,212],{"class":172},[111,819,820],{"class":215},"dog",[111,822,219],{"class":172},[111,824,394],{"class":172},[111,826,212],{"class":172},[111,828,829],{"class":215},"cat",[111,831,219],{"class":172},[111,833,222],{"class":172},[111,835,837],{"class":113,"line":836},61,[111,838,280],{"class":172},[111,840,842],{"class":113,"line":841},62,[111,843,229],{"emptyLinePlaceholder":228},[111,845,847,849,851,854,856,858,860,863],{"class":113,"line":846},63,[111,848,235],{"class":168},[111,850,696],{"class":238},[111,852,853],{"class":242}," Pet",[111,855,702],{"class":172},[111,857,198],{"class":242},[111,859,352],{"class":172},[111,861,862],{"class":242},"PetTable",[111,864,358],{"class":172},[111,866,868,870,872,875,877,879,881,883],{"class":113,"line":867},64,[111,869,235],{"class":168},[111,871,696],{"class":238},[111,873,874],{"class":242}," NewPet",[111,876,702],{"class":172},[111,878,188],{"class":242},[111,880,352],{"class":172},[111,882,862],{"class":242},[111,884,358],{"class":172},[111,886,888,890,892,895,897,899,901,903],{"class":113,"line":887},65,[111,889,235],{"class":168},[111,891,696],{"class":238},[111,893,894],{"class":242}," PetUpdate",[111,896,702],{"class":172},[111,898,203],{"class":242},[111,900,352],{"class":172},[111,902,862],{"class":242},[111,904,358],{"class":172},[143,906,908],{"id":907},"configure-kysely-database-instance","Configure Kysely database instance",[88,910,911,912,915,916,256],{},"You'll need to create a Kysely database instance and export it for use in your Vasta models. Here's an example of how you might set up a Kysely database instance for Postgres in a file called ",[108,913,914],{},"database.ts"," following the Kysely ",[92,917,920],{"href":918,"rel":919},"https://kysely.dev/docs/getting-started#instantiation",[96],"documentation on instantiation",[100,922,925],{"className":158,"code":923,"filename":924,"language":161,"meta":106,"style":106},"import { Database } from \"./types.ts\"; // this is the Database interface we defined earlier\nimport { Pool } from \"pg\";\nimport { Kysely, PostgresDialect } from \"kysely\";\n\nconst dialect = new PostgresDialect({\n  pool: new Pool({\n    database: \"test\",\n    host: \"localhost\",\n    user: \"admin\",\n    port: 5434,\n    max: 10,\n  }),\n});\n\n// Database interface is passed to Kysely's constructor, and from now on, Kysely\n// knows your database structure.\n// Dialect is passed to Kysely's constructor, and from now on, Kysely knows how\n// to communicate with your database.\nexport const db = new Kysely\u003CDatabase>({\n  dialect,\n});\n","database/db.ts",[108,926,927,952,973,999,1003,1026,1041,1058,1074,1090,1103,1115,1125,1134,1138,1143,1148,1153,1158,1186,1193],{"__ignoreMap":106},[111,928,929,931,933,935,937,939,941,944,946,949],{"class":113,"line":114},[111,930,169],{"class":168},[111,932,173],{"class":172},[111,934,243],{"class":176},[111,936,206],{"class":172},[111,938,209],{"class":168},[111,940,212],{"class":172},[111,942,943],{"class":215},"./types.ts",[111,945,219],{"class":172},[111,947,948],{"class":172},";",[111,950,951],{"class":291}," // this is the Database interface we defined earlier\n",[111,953,954,956,958,961,963,965,967,969,971],{"class":113,"line":225},[111,955,169],{"class":168},[111,957,173],{"class":172},[111,959,960],{"class":176}," Pool",[111,962,206],{"class":172},[111,964,209],{"class":168},[111,966,212],{"class":172},[111,968,122],{"class":215},[111,970,219],{"class":172},[111,972,222],{"class":172},[111,974,975,977,979,982,984,987,989,991,993,995,997],{"class":113,"line":232},[111,976,169],{"class":168},[111,978,173],{"class":172},[111,980,981],{"class":176}," Kysely",[111,983,180],{"class":172},[111,985,986],{"class":176}," PostgresDialect",[111,988,206],{"class":172},[111,990,209],{"class":168},[111,992,212],{"class":172},[111,994,216],{"class":215},[111,996,219],{"class":172},[111,998,222],{"class":172},[111,1000,1001],{"class":113,"line":249},[111,1002,229],{"emptyLinePlaceholder":228},[111,1004,1005,1008,1011,1014,1017,1020,1023],{"class":113,"line":264},[111,1006,1007],{"class":238},"const",[111,1009,1010],{"class":176}," dialect ",[111,1012,1013],{"class":172},"=",[111,1015,1016],{"class":172}," new",[111,1018,986],{"class":1019},"s2Zo4",[111,1021,1022],{"class":176},"(",[111,1024,1025],{"class":172},"{\n",[111,1027,1028,1031,1033,1035,1037,1039],{"class":113,"line":277},[111,1029,1030],{"class":252},"  pool",[111,1032,256],{"class":172},[111,1034,1016],{"class":172},[111,1036,960],{"class":1019},[111,1038,1022],{"class":176},[111,1040,1025],{"class":172},[111,1042,1043,1046,1048,1050,1053,1055],{"class":113,"line":283},[111,1044,1045],{"class":252},"    database",[111,1047,256],{"class":172},[111,1049,212],{"class":172},[111,1051,1052],{"class":215},"test",[111,1054,219],{"class":172},[111,1056,1057],{"class":172},",\n",[111,1059,1060,1063,1065,1067,1070,1072],{"class":113,"line":288},[111,1061,1062],{"class":252},"    host",[111,1064,256],{"class":172},[111,1066,212],{"class":172},[111,1068,1069],{"class":215},"localhost",[111,1071,219],{"class":172},[111,1073,1057],{"class":172},[111,1075,1076,1079,1081,1083,1086,1088],{"class":113,"line":295},[111,1077,1078],{"class":252},"    user",[111,1080,256],{"class":172},[111,1082,212],{"class":172},[111,1084,1085],{"class":215},"admin",[111,1087,219],{"class":172},[111,1089,1057],{"class":172},[111,1091,1092,1095,1097,1101],{"class":113,"line":301},[111,1093,1094],{"class":252},"    port",[111,1096,256],{"class":172},[111,1098,1100],{"class":1099},"sbssI"," 5434",[111,1102,1057],{"class":172},[111,1104,1105,1108,1110,1113],{"class":113,"line":307},[111,1106,1107],{"class":252},"    max",[111,1109,256],{"class":172},[111,1111,1112],{"class":1099}," 10",[111,1114,1057],{"class":172},[111,1116,1117,1120,1123],{"class":113,"line":313},[111,1118,1119],{"class":172},"  }",[111,1121,1122],{"class":176},")",[111,1124,1057],{"class":172},[111,1126,1127,1130,1132],{"class":113,"line":324},[111,1128,1129],{"class":172},"}",[111,1131,1122],{"class":176},[111,1133,222],{"class":172},[111,1135,1136],{"class":113,"line":330},[111,1137,229],{"emptyLinePlaceholder":228},[111,1139,1140],{"class":113,"line":336},[111,1141,1142],{"class":291},"// Database interface is passed to Kysely's constructor, and from now on, Kysely\n",[111,1144,1145],{"class":113,"line":342},[111,1146,1147],{"class":291},"// knows your database structure.\n",[111,1149,1150],{"class":113,"line":361},[111,1151,1152],{"class":291},"// Dialect is passed to Kysely's constructor, and from now on, Kysely knows how\n",[111,1154,1155],{"class":113,"line":366},[111,1156,1157],{"class":291},"// to communicate with your database.\n",[111,1159,1160,1162,1165,1168,1170,1172,1174,1176,1179,1182,1184],{"class":113,"line":379},[111,1161,235],{"class":168},[111,1163,1164],{"class":238}," const",[111,1166,1167],{"class":176}," db ",[111,1169,1013],{"class":172},[111,1171,1016],{"class":172},[111,1173,981],{"class":1019},[111,1175,352],{"class":172},[111,1177,1178],{"class":242},"Database",[111,1180,1181],{"class":172},">",[111,1183,1022],{"class":176},[111,1185,1025],{"class":172},[111,1187,1188,1191],{"class":113,"line":415},[111,1189,1190],{"class":176},"  dialect",[111,1192,1057],{"class":172},[111,1194,1195,1197,1199],{"class":113,"line":420},[111,1196,1129],{"class":172},[111,1198,1122],{"class":176},[111,1200,222],{"class":172},[83,1202,1204],{"id":1203},"install-vasta","Install Vasta",[88,1206,1207],{},"You can install vasta using your preferred package manager.",[100,1209,1213],{"className":1210,"code":1211,"language":1212,"meta":106,"style":106},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm install vasta-orm\n","bash",[108,1214,1215],{"__ignoreMap":106},[111,1216,1217,1220,1223],{"class":113,"line":114},[111,1218,1219],{"class":242},"pnpm",[111,1221,1222],{"class":215}," install",[111,1224,1225],{"class":215}," vasta-orm\n",[88,1227,1228],{},"Now you're ready to start defining your models!",[1230,1231,1232],"style",{},"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);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":106,"searchDepth":225,"depth":225,"links":1234},[1235,1236],{"id":85,"depth":232,"text":86},{"id":1203,"depth":232,"text":1204},"Get started with Vasta.","md",null,{},{"icon":18},{"description":1243,"title":15},"Get started with Vasta ORM for Node.js.","cQZVWHOgxaHI-mNoWjM13oMt0a9t_yvylEXzdU9Qf_8",[1246,1248],{"title":10,"path":11,"stem":12,"description":1247,"icon":13,"children":-1},"Learn about Vasta",{"title":26,"path":27,"stem":28,"description":1249,"icon":29,"children":-1},"Building models with Vasta.",1784320847710]