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