PageSourceSearch

https://kysely.dev/assets/js/5a28d260.8a034b02.js

js kysely.dev collected 2026-10-02 02:58:40 UTC 2,503 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkkysely_site=globalThis.webpackChunkkysely_site||[]).push([[7563],{6531(e,s,t){t.r(s),t.d(s,{assets:()=>d,contentTitle:()=>a,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>c});const l=JSON.parse('{"id":"examples/delete/single-row","title":"Single row","description":"Delete a single row:","source":"@site/docs/examples/delete/0010-single-row.mdx","sourceDirName":"examples/delete","slug":"/examples/delete/single-row","permalink":"/docs/examples/delete/single-row","draft":false,"unlisted":false,"editUrl":"https://github.com/kysely-org/kysely/tree/master/site/docs/examples/delete/0010-single-row.mdx","tags":[],"version":"current","sidebarPosition":10,"frontMatter":{"title":"Single row"},"sidebar":"tutorialSidebar","previous":{"title":"DELETE","permalink":"/docs/category/delete"},"next":{"title":"MERGE","permalink":"/docs/category/merge"}}');var n=t(1058),r=t(4801),i=t(2360);const o={title:"Single row"},a="Single row",d={},c=[];function h(e){const s={a:"a",admonition:"admonition",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"single-row",children:"Single row"})}),"\n",(0,n.jsx)(s.p,{children:"Delete a single row:"}),"\n","\n","\n",(0,n.jsx)("div",{style:{marginBottom:"1em"},children:(0,n.jsx)(i.Q,{code:"const result = await db\n  .deleteFrom('person')\n  .where('person.id', '=', 1)\n  .executeTakeFirst()\n\nconsole.log(result.numDeletedRows)"})}),"\n",(0,n.jsxs)(s.admonition,{title:"More examples",type:"info",children:[(0,n.jsxs)(s.p,{children:["The API documentation is packed with examples. The API docs are hosted ",(0,n.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,n.jsx)(s.p,{children:"For example, check out these sections:"}),(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.a,{href:"https://kysely-org.github.io/kysely-apidoc/classes/Kysely.html#deleteFrom",children:"deleteFrom method"})}),"\n",(0,n.jsx)(s.li,{children:(0,n.jsx)(s.a,{href:"https://kysely-org.github.io/kysely-apidoc/classes/DeleteQueryBuilder.html#returning",children:"returning method"})}),"\n"]})]})]})}function m(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(h,{...e})}):h(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.