1"use strict";(globalThis.webpackChunkkysely_site=globalThis.webpackChunkkysely_site||[]).push([[5651],{737(e,s,l){l.r(s),l.d(s,{assets:()=>a,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>t,toc:()=>m});const t=JSON.parse('{"id":"examples/select/multiple-columns","title":"Multiple columns","description":"Select multiple columns:","source":"@site/docs/examples/select/0030-multiple-columns.mdx","sourceDirName":"examples/select","slug":"/examples/select/multiple-columns","permalink":"/docs/examples/select/multiple-columns","draft":false,"unlisted":false,"editUrl":"https://github.com/kysely-org/kysely/tree/master/site/docs/examples/select/0030-multiple-columns.mdx","tags":[],"version":"current","sidebarPosition":30,"frontMatter":{"title":"Multiple columns"},"sidebar":"tutorialSidebar","previous":{"title":"Column with a table","permalink":"/docs/examples/select/column-with-a-table"},"next":{"title":"Aliases","permalink":"/docs/examples/select/aliases"}}');var i=l(1058),n=l(4801),c=l(2360);const o={title:"Multiple columns"},r="Multiple columns",a={},m=[];function u(e){const s={a:"a",admonition:"admonition",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,n.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.header,{children:(0,i.jsx)(s.h1,{id:"multiple-columns",children:"Multiple columns"})}),"\n",(0,i.jsx)(s.p,{children:"Select multiple columns:"}),"\n","\n","\n",(0,i.jsx)("div",{style:{marginBottom:"1em"},children:(0,i.jsx)(c.Q,{code:"const persons = await db\n .selectFrom('person')\n .select(['person.id', 'first_name'])\n .execute()"})}),"\n",(0,i.jsxs)(s.admonition,{title:"More examples",type:"info",children:[(0,i.jsxs)(s.p,{children:["The API documentation is packed with examples. The API docs are hosted ",(0,i.jsx)(s.a,{href:"https://kysely-org.github.io/kysely-apidoc/",children:"here"}),",\nbut you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always\njust one hover away!"]}),(0,i.jsx)(s.p,{children:"For example, check out these sections:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#select",children:"select method"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"https://kysely-org.github.io/kysely-apidoc/interfaces/SelectQueryBuilder.html#selectAll",children:"selectAll method"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"https://kysely-org.github.io/kysely-apidoc/classes/Kysely.html#selectFrom",children:"selectFrom method"})}),"\n"]})]})]})}function h(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.