CINXE.COM
Transactions | ObjectBox Swift
<!DOCTYPE html><html lang="en" class="scroll-pt-[76px] plain-background"><head><meta charSet="utf-8"/><link rel="preconnect" href="https://api.gitbook.com"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="image" imageSrcSet="https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia&width=32&dpr=1&quality=100&sign=6fa18374&sv=1 32w, https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia&width=32&dpr=2&quality=100&sign=6fa18374&sv=1 64w, https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia&width=32&dpr=3&quality=100&sign=6fa18374&sv=1 96w, https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia&width=32&dpr=4&quality=100&sign=6fa18374&sv=1 128w" imageSizes="32px" fetchPriority="high"/><link rel="stylesheet" href="/_next/static/css/2d00a2f28ca4dc5d.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/99f50cfb598d2941.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/d42d805b938873da.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/8adaabd9e3445f84.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/c311d6484335995a.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/5a687dea857dc6f5.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/7235fa9d119901d4.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/86d6274f3e6d760c.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/a91fbeec63857000.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/2d0986519abf0323.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/0f891de5863d7182.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl" href="/_next/static/chunks/webpack-21fb00c223e55731.js"/><script src="/_next/static/chunks/1dd3208c-b11c3db6cd7d86b2.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/9978-293e379e3e1468f4.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/main-app-6756d7a08d4ddca2.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/app/global-error-19768e91f18f21d9.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/b5d5b83b-3d9186fb60556c53.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/7609-ae1015bd89577747.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/1281-411df876b32e19c2.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/9505-a8f112b566ef7f41.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/1538-28b9996ceedaa74d.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/1285-2b0f91300e0c0b9a.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/3902-19c217a299034164.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/app/(site)/(content)/layout-b3c513d48aa14062.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/4012-d5519c7c19347ff0.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/app/(site)/layout-512d7fc9258aa558.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/app/(site)/error-aabf7054fe6497a1.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/6150-57a79db9099e4be8.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/8510-2f41b25832a6d317.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/2286-91dc9ed7c6acaf3a.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/9028-bdf215f649fe02e9.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><script src="/_next/static/chunks/app/(site)/(content)/%5B%5B...pathname%5D%5D/page-c1425cfd4f268718.js" async="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script><link rel="privacy-policy" href="https://objectbox.io/wordpress/wp-content/uploads/2022/08/Object-Box-Privacy-Notice.pdf"/><meta name="color-scheme" content="light"/><title>Transactions | ObjectBox Swift</title><meta name="description" content="ObjectBox for Swift is a fully transactional NoSQL database and ACID compliant. Learn here how database transactions work. Also, how does multiversion concurrency work?"/><meta name="generator" content="GitBook (eab7931)"/><meta name="robots" content="index, follow"/><link rel="canonical" href="https://swift.objectbox.io/transactions"/><meta property="og:title" content="Transactions | ObjectBox Swift"/><meta property="og:description" content="ObjectBox for Swift is a fully transactional NoSQL database and ACID compliant. Learn here how database transactions work. Also, how does multiversion concurrency work?"/><meta property="og:image" content="https://swift.objectbox.io/~gitbook/ogimage/-LRIJnzhhl3cynIFNMlD"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="Transactions | ObjectBox Swift"/><meta name="twitter:description" content="ObjectBox for Swift is a fully transactional NoSQL database and ACID compliant. Learn here how database transactions work. Also, how does multiversion concurrency work?"/><meta name="twitter:image" content="https://swift.objectbox.io/~gitbook/ogimage/-LRIJnzhhl3cynIFNMlD"/><link rel="icon" href="https://2249461369-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/spaces%2F-LR7sVOoZyL01-NkNVQJ%2Favatar.png?generation=1542042291053653&alt=media" type="image/png" media="(prefers-color-scheme: light)"/><link rel="icon" href="https://2249461369-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/spaces%2F-LR7sVOoZyL01-NkNVQJ%2Favatar.png?generation=1542042291053653&alt=media" type="image/png" media="(prefers-color-scheme: dark)"/><meta name="next-size-adjust"/><style> :root { --primary-color-50: 232 246 246; --primary-color-100: 209 237 237; --primary-color-200: 162 219 219; --primary-color-300: 116 202 202; --primary-color-400: 69 184 184; --primary-color-500: 23 166 166; --primary-color-600: 18 133 133; --primary-color-700: 14 100 100; --primary-color-800: 9 66 66; --primary-color-900: 5 33 33; --contrast-primary-50: 0 0 0; --contrast-primary-100: 0 0 0; --contrast-primary-200: 0 0 0; --contrast-primary-300: 0 0 0; --contrast-primary-400: 0 0 0; --contrast-primary-500: 0 0 0; --contrast-primary-600: 0 0 0; --contrast-primary-700: 255 255 255; --contrast-primary-800: 255 255 255; --contrast-primary-900: 255 255 255; --primary-base-50: 232 246 246; --primary-base-100: 209 237 237; --primary-base-200: 162 219 219; --primary-base-300: 116 202 202; --primary-base-400: 69 184 184; --primary-base-500: 23 166 166; --primary-base-600: 18 133 133; --primary-base-700: 14 100 100; --primary-base-800: 9 66 66; --primary-base-900: 5 33 33; --header-background-50: 255 255 255; --header-background-100: 255 255 255; --header-background-200: 255 255 255; --header-background-300: 255 255 255; --header-background-400: 255 255 255; --header-background-500: 255 255 255; --header-background-600: 204 204 204; --header-background-700: 153 153 153; --header-background-800: 102 102 102; --header-background-900: 51 51 51; --header-link-50: 232 246 246; --header-link-100: 209 237 237; --header-link-200: 162 219 219; --header-link-300: 116 202 202; --header-link-400: 69 184 184; --header-link-500: 23 166 166; --header-link-600: 18 133 133; --header-link-700: 14 100 100; --header-link-800: 9 66 66; --header-link-900: 5 33 33; --header-button-text-50: 230 230 230; --header-button-text-100: 204 204 204; --header-button-text-200: 153 153 153; --header-button-text-300: 102 102 102; --header-button-text-400: 51 51 51; --header-button-text-500: 0 0 0; --header-button-text-600: 0 0 0; --header-button-text-700: 0 0 0; --header-button-text-800: 0 0 0; --header-button-text-900: 0 0 0; } .dark { --primary-color-50: 232 246 246; --primary-color-100: 209 237 237; --primary-color-200: 162 219 219; --primary-color-300: 116 202 202; --primary-color-400: 69 184 184; --primary-color-500: 23 166 166; --primary-color-600: 18 133 133; --primary-color-700: 14 100 100; --primary-color-800: 9 66 66; --primary-color-900: 5 33 33; --primary-base-50: 232 246 246; --primary-base-100: 209 237 237; --primary-base-200: 162 219 219; --primary-base-300: 116 202 202; --primary-base-400: 69 184 184; --primary-base-500: 23 166 166; --primary-base-600: 18 133 133; --primary-base-700: 14 100 100; --primary-base-800: 9 66 66; --primary-base-900: 5 33 33; --contrast-primary-50: 0 0 0; --contrast-primary-100: 0 0 0; --contrast-primary-200: 0 0 0; --contrast-primary-300: 0 0 0; --contrast-primary-400: 0 0 0; --contrast-primary-500: 0 0 0; --contrast-primary-600: 0 0 0; --contrast-primary-700: 255 255 255; --contrast-primary-800: 255 255 255; --contrast-primary-900: 255 255 255; --header-background-50: 230 230 230; --header-background-100: 204 204 204; --header-background-200: 153 153 153; --header-background-300: 102 102 102; --header-background-400: 51 51 51; --header-background-500: 0 0 0; --header-background-600: 0 0 0; --header-background-700: 0 0 0; --header-background-800: 0 0 0; --header-background-900: 0 0 0; --header-link-50: 232 246 246; --header-link-100: 209 237 237; --header-link-200: 162 219 219; --header-link-300: 116 202 202; --header-link-400: 69 184 184; --header-link-500: 23 166 166; --header-link-600: 18 133 133; --header-link-700: 14 100 100; --header-link-800: 9 66 66; --header-link-900: 5 33 33; --header-button-text-50: 230 230 230; --header-button-text-100: 204 204 204; --header-button-text-200: 153 153 153; --header-button-text-300: 102 102 102; --header-button-text-400: 51 51 51; --header-button-text-500: 0 0 0; --header-button-text-600: 0 0 0; --header-button-text-700: 0 0 0; --header-button-text-800: 0 0 0; --header-button-text-900: 0 0 0; } </style><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule="" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl"></script></head><body class="__variable_274faa __variable_a7f53a __variable_e782a9 __className_053b0a __variable_0e9704 bg-light dark:bg-dark"><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">!function(){var d=document.documentElement,c=d.classList;c.remove('light','dark');d.style.colorScheme = 'light';c.add('light')}()</script><header class="flex flex-col h-[64px] sticky top-0 z-10 w-full flex-none shadow-thinbottom lg:z-10 dark:shadow-light/1 bg-light dark:bg-dark"><div class="scroll-nojump"><div class="gap-4 grid grid-flow-col auto-cols-[auto_auto_1fr_auto] h-16 items-center align-center justify-between w-full px-4 sm:px-6 md:px-8 max-w-screen-2xl mx-auto page-full-width:max-w-full"><div class="flex flex-row gap-2"><button class="flex flex-row items-center hover:bg-dark/3 py-1 px-2 dark:hover:bg-light/2 rounded straight-corners:rounded-sm page-no-toc:hidden lg:hidden text-dark dark:text-light" aria-label="Open table of contents"><svg style="mask-image:url(https://ka-p.fontawesome.com/releases/v6.6.0/svgs/regular/bars.svg?v=2&token=a463935e93);mask-repeat:no-repeat;mask-position:center" class="gb-icon size-4 text-inherit"></svg></button><a class="group/headerlogo flex-1 flex flex-row items-center shrink-0" href="/"><img alt="" style="aspect-ratio:1" fetchPriority="high" class="block dark:hidden object-contain size-8" src="https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia&width=32&dpr=4&quality=100&sign=6fa18374&sv=1" srcSet="https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia&width=32&dpr=1&quality=100&sign=6fa18374&sv=1 32w, https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia&width=32&dpr=2&quality=100&sign=6fa18374&sv=1 64w, https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia&width=32&dpr=3&quality=100&sign=6fa18374&sv=1 96w, https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia&width=32&dpr=4&quality=100&sign=6fa18374&sv=1 128w" sizes="32px" width="256" height="256"/><img alt="" style="aspect-ratio:1" loading="lazy" fetchPriority="high" class="hidden dark:block object-contain size-8" src="https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia&width=32&dpr=4&quality=100&sign=6fa18374&sv=1" srcSet="https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia&width=32&dpr=1&quality=100&sign=6fa18374&sv=1 32w, https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia&width=32&dpr=2&quality=100&sign=6fa18374&sv=1 64w, https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia&width=32&dpr=3&quality=100&sign=6fa18374&sv=1 96w, https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia&width=32&dpr=4&quality=100&sign=6fa18374&sv=1 128w" sizes="32px" width="256" height="256"/><div class="text-pretty line-clamp-3 leading-[1.1] tracking-tight max-w-[18ch] lg:max-w-[24ch] lg:text-lg/tight font-semibold ms-3 text-dark dark:text-light">ObjectBox Swift</div></a></div><div class="z-20"></div><div class="headerLinks_containerHeaderlinks__GUgiv flex justify-end items-center gap-x-2.5 mr-2.5 lg:gap-x-5 lg:mr-2.5 *:max-w-56 z-20"><a class="overflow-hidden text-sm lg:text-base flex flex-row items-center whitespace-nowrap hover:text-header-link-400 dark:hover:text-light text-dark/8 dark:text-light/8" href="https://objectbox.io/"><span class="truncate">objectbox.io</span></a><a class="overflow-hidden text-sm lg:text-base flex flex-row items-center whitespace-nowrap hover:text-header-link-400 dark:hover:text-light text-dark/8 dark:text-light/8" href="https://objectbox.io/blog/"><span class="truncate">Blog</span></a><a class="overflow-hidden text-sm lg:text-base flex flex-row items-center whitespace-nowrap hover:text-header-link-400 dark:hover:text-light text-dark/8 dark:text-light/8" href="https://twitter.com/ObjectBox_io"><span class="truncate">Twitter</span></a><a class="overflow-hidden text-sm lg:text-base flex flex-row items-center whitespace-nowrap hover:text-header-link-400 dark:hover:text-light text-dark/8 dark:text-light/8" href="https://github.com/objectbox/objectbox-swift"><span class="truncate">GitHub</span></a><div class="headerLinks_linkEllipsis__Z01IN items-center z-20"><div class="group/dropdown relative flex"><button class="px-1 text-dark/8 dark:text-light/8 dark:hover:text-light hover:text-header-link-400"><span class="sr-only">More</span><svg style="mask-image:url(https://ka-p.fontawesome.com/releases/v6.6.0/svgs/regular/ellipsis.svg?v=2&token=a463935e93);mask-repeat:no-repeat;mask-position:center" class="gb-icon opacity-6 size-3 ms-1"></svg></button><div tabindex="-1" role="menu" aria-orientation="vertical" aria-labelledby=":S1:" class="w-52 max-h-56 flex absolute top-full left-0 z-20 origin-top-left invisible transition-opacity duration-1000 group-hover/dropdown:visible group-focus-within/dropdown:visible -translate-x-48 md:translate-x-0"><div class="mt-2 w-full bg-light rounded-lg straight-corners:rounded-sm p-2 shadow-1xs overflow-auto ring-1 ring-dark/1 ring-opacity-8 focus:outline-none dark:bg-dark dark:ring-light/2"><div class="flex flex-col gap-1"><a class="flex flex-row items-center text-sm px-3 py-1 rounded straight-corners:rounded-sm hover:bg-dark/2 dark:hover:bg-light/2" href="https://objectbox.io/">objectbox.io</a><a class="flex flex-row items-center text-sm px-3 py-1 rounded straight-corners:rounded-sm hover:bg-dark/2 dark:hover:bg-light/2" href="https://objectbox.io/blog/">Blog</a><a class="flex flex-row items-center text-sm px-3 py-1 rounded straight-corners:rounded-sm hover:bg-dark/2 dark:hover:bg-light/2" href="https://twitter.com/ObjectBox_io">Twitter</a><a class="flex flex-row items-center text-sm px-3 py-1 rounded straight-corners:rounded-sm hover:bg-dark/2 dark:hover:bg-light/2" href="https://github.com/objectbox/objectbox-swift">GitHub</a></div></div></div></div></div></div><div class="flex md:w-56 grow-0 shrink-0 justify-self-end"><!--$--><button aria-label="Search" class="flex flex-1 flex-row justify-center items-center px-2 gap-3 text-dark/7 min-h-[2.5rem] w-[2.5rem] rounded-lg straight-corners:rounded-none bg-dark/2 transition-opacity ease-out hover:opacity-8 ring-1 ring-inset ring-dark/1 contrast-more:ring-dark contrast-more:bg-light contrast-more:text-dark dark:bg-light/1 dark:ring-light/1 dark:text-light/7 contrast-more:dark:ring-light contrast-more:dark:bg-dark contrast-more:dark:text-light [&>p]:hidden [&>span]:hidden md:justify-start md:[&>p]:flex md:[&>span]:flex md:w-full md:px-3.5 text-base"><div class="text-dark/7 pt-1.5 pb-2 dark:text-light/7"><svg style="mask-image:url(https://ka-p.fontawesome.com/releases/v6.6.0/svgs/regular/magnifying-glass.svg?v=2&token=a463935e93);mask-repeat:no-repeat;mask-position:center" class="gb-icon shrink-0 size-4"></svg></div><span class="flex-1">Search</span><span class="hidden md:inline justify-end text-xs text-dark/5 contrast-more:text-dark dark:text-light/5 contrast-more:dark:text-light [font-feature-settings:"calt",_"case"]">Ctrl +<!-- --> K</span></button><!--/$--></div></div></div></header><div class="scroll-nojump"><div class="flex flex-col lg:flex-row px-4 sm:px-6 md:px-8 max-w-screen-2xl mx-auto page-full-width:max-w-full min-h-[calc(100vh-64px)]"><aside class="relative group flex flex-col basis-full bg-light grow-0 shrink-0 shadow-thinbottom navigation-open:shadow-dark/2 z-[1] top-0 h-[100vh] lg:basis-72 lg:navigation-open:border-b-0 lg:sticky dark:bg-dark dark:navigation-open:shadow-light/2 page-no-toc:hidden lg:top-16 lg:h-[calc(100vh_-_4rem)]"><div class="pt-4 hidden lg:flex flex-grow flex-col overflow-y-auto lg:gutter-stable lg:pr-2 group-hover:[&::-webkit-scrollbar]:bg-dark/1 group-hover:[&::-webkit-scrollbar-thumb]:bg-dark/3 [&::-webkit-scrollbar]:bg-transparent [&::-webkit-scrollbar-thumb]:bg-transparent dark:[&::-webkit-scrollbar]:bg-transparent dark:[&::-webkit-scrollbar-thumb]:bg-transparent dark:group-hover:[&::-webkit-scrollbar]:bg-light/1 dark:group-hover:[&::-webkit-scrollbar-thumb]:bg-light/3 navigation-open:flex lg:-ml-5 lg:pb-20"><ul class="flex flex-1 flex-col gap-y-0.5"><li class="flex flex-col"><div><a class="group/toclink flex flex-row justify-between pl-5 pr-1.5 py-1.5 text-sm transition-colors relative text-balance before:border-l before:absolute before:left-[-1px] before:top-0 before:h-full rounded-md straight-corners:rounded-none [&+div_a]:rounded-l-none before:border-transparent font-normal text-dark/8 hover:bg-dark/1 hover:text-dark/9 hover:before:border-dark/3 dark:text-light/8 dark:hover:bg-light/2 dark:hover:before:border-light/3 dark:hover:text-light/9" href="/">ObjectBox Swift Database Docs</a></div></li><li class="flex flex-col"><div><a class="group/toclink flex flex-row justify-between pl-5 pr-1.5 py-1.5 text-sm transition-colors relative text-balance before:border-l before:absolute before:left-[-1px] before:top-0 before:h-full rounded-md straight-corners:rounded-none [&+div_a]:rounded-l-none before:border-transparent font-normal text-dark/8 hover:bg-dark/1 hover:text-dark/9 hover:before:border-dark/3 dark:text-light/8 dark:hover:bg-light/2 dark:hover:before:border-light/3 dark:hover:text-light/9" href="/install">Install ObjectBox Swift</a></div></li><li class="flex flex-col"><div><a class="group/toclink flex flex-row justify-between pl-5 pr-1.5 py-1.5 text-sm transition-colors relative text-balance before:border-l before:absolute before:left-[-1px] before:top-0 before:h-full rounded-md straight-corners:rounded-none [&+div_a]:rounded-l-none before:border-transparent font-normal text-dark/8 hover:bg-dark/1 hover:text-dark/9 hover:before:border-dark/3 dark:text-light/8 dark:hover:bg-light/2 dark:hover:before:border-light/3 dark:hover:text-light/9" href="/getting-started">Get Started with ObjectBox Swift</a></div></li><li class="flex flex-col"><div><a class="group/toclink flex flex-row justify-between pl-5 pr-1.5 py-1.5 text-sm transition-colors relative text-balance before:border-l before:absolute before:left-[-1px] before:top-0 before:h-full rounded-md straight-corners:rounded-none [&+div_a]:rounded-l-none before:border-transparent font-normal text-dark/8 hover:bg-dark/1 hover:text-dark/9 hover:before:border-dark/3 dark:text-light/8 dark:hover:bg-light/2 dark:hover:before:border-light/3 dark:hover:text-light/9" href="/entity-annotations">Entity Annotations in ObjectBox</a></div></li><li class="flex flex-col"><div><a class="group/toclink flex flex-row justify-between pl-5 pr-1.5 py-1.5 text-sm transition-colors relative text-balance before:border-l before:absolute before:left-[-1px] before:top-0 before:h-full rounded-md straight-corners:rounded-none [&+div_a]:rounded-l-none before:border-transparent font-normal text-dark/8 hover:bg-dark/1 hover:text-dark/9 hover:before:border-dark/3 dark:text-light/8 dark:hover:bg-light/2 dark:hover:before:border-light/3 dark:hover:text-light/9" href="/queries">Queries</a></div></li><li class="flex flex-col"><div><a class="group/toclink flex flex-row justify-between pl-5 pr-1.5 py-1.5 text-sm transition-colors relative text-balance before:border-l before:absolute before:left-[-1px] before:top-0 before:h-full rounded-md straight-corners:rounded-none [&+div_a]:rounded-l-none before:border-transparent font-normal text-dark/8 hover:bg-dark/1 hover:text-dark/9 hover:before:border-dark/3 dark:text-light/8 dark:hover:bg-light/2 dark:hover:before:border-light/3 dark:hover:text-light/9" href="/relations">Relations</a></div></li><li class="flex flex-col"><div><a aria-current="page" class="group/toclink flex flex-row justify-between pl-5 pr-1.5 py-1.5 text-sm transition-colors relative text-balance before:border-l before:absolute before:left-[-1px] before:top-0 before:h-full rounded-md straight-corners:rounded-none [&+div_a]:rounded-l-none before:border-primary-500 font-semibold text-primary hover:bg-primary/3 dark:before:border-primary-400 dark:text-primary-400 hover:before:border-primary dark:hover:bg-primary-500/3 dark:hover:before:border-primary" href="/transactions">Transactions</a></div></li><li class="flex flex-col"><div><a class="group/toclink flex flex-row justify-between pl-5 pr-1.5 py-1.5 text-sm transition-colors relative text-balance before:border-l before:absolute before:left-[-1px] before:top-0 before:h-full rounded-md straight-corners:rounded-none [&+div_a]:rounded-l-none before:border-transparent font-normal text-dark/8 hover:bg-dark/1 hover:text-dark/9 hover:before:border-dark/3 dark:text-light/8 dark:hover:bg-light/2 dark:hover:before:border-light/3 dark:hover:text-light/9" href="/faq">ObjectBox Swift FAQ</a></div></li><li class="flex flex-col"><a class="flex justify-start items-center gap-3 pl-5 pr-1.5 py-1.5 text-sm transition-colors duration-100 text-dark/8 rounded-md straight-corners:rounded-none dark:text-light/7 font-normal hover:bg-dark/1 dark:hover:bg-light/2" href="https://objectbox.io/docfiles/swift/current/">Swift API Docs<svg style="mask-image:url(https://ka-p.fontawesome.com/releases/v6.6.0/svgs/regular/arrow-up-right-from-square.svg?v=2&token=a463935e93);mask-repeat:no-repeat;mask-position:center" class="gb-icon size-3 mr-1 mt-1 place-self-start shrink-0 text-current transition-colors [&>path]:transition-[opacity] [&>path]:[opacity:0.40] group-hover:[&>path]:[opacity:1]"></svg></a></li><li class="flex flex-col"><div class="flex items-center gap-3 px-5 pt-6 pb-1.5 text-xs tracking-wide font-semibold uppercase z-[1] sticky -top-4 bg-gradient-to-b from-light to-transparent from-65% dark:from-dark dark:tracking-wider dark:to-transparent">Advanced</div><ul class="flex flex-1 flex-col gap-y-0.5"><li class="flex flex-col"><div><a class="group/toclink flex flex-row justify-between pl-5 pr-1.5 py-1.5 text-sm transition-colors relative text-balance before:border-l before:absolute before:left-[-1px] before:top-0 before:h-full rounded-md straight-corners:rounded-none [&+div_a]:rounded-l-none before:border-transparent font-normal text-dark/8 hover:bg-dark/1 hover:text-dark/9 hover:before:border-dark/3 dark:text-light/8 dark:hover:bg-light/2 dark:hover:before:border-light/3 dark:hover:text-light/9" href="/advanced/macos">The Sandbox on macOS</a></div></li><li class="flex flex-col"><div><a class="group/toclink flex flex-row justify-between pl-5 pr-1.5 py-1.5 text-sm transition-colors relative text-balance before:border-l before:absolute before:left-[-1px] before:top-0 before:h-full rounded-md straight-corners:rounded-none [&+div_a]:rounded-l-none before:border-transparent font-normal text-dark/8 hover:bg-dark/1 hover:text-dark/9 hover:before:border-dark/3 dark:text-light/8 dark:hover:bg-light/2 dark:hover:before:border-light/3 dark:hover:text-light/9" href="/advanced/custom-types">Enums and Custom Types</a></div></li><li class="flex flex-col"><div><a class="group/toclink flex flex-row justify-between pl-5 pr-1.5 py-1.5 text-sm transition-colors relative text-balance before:border-l before:absolute before:left-[-1px] before:top-0 before:h-full rounded-md straight-corners:rounded-none [&+div_a]:rounded-l-none before:border-transparent font-normal text-dark/8 hover:bg-dark/1 hover:text-dark/9 hover:before:border-dark/3 dark:text-light/8 dark:hover:bg-light/2 dark:hover:before:border-light/3 dark:hover:text-light/9" href="/advanced/data-model-updates">Data Model Updates</a></div></li><li class="flex flex-col"><div><a class="group/toclink flex flex-row justify-between pl-5 pr-1.5 py-1.5 text-sm transition-colors relative text-balance before:border-l before:absolute before:left-[-1px] before:top-0 before:h-full rounded-md straight-corners:rounded-none [&+div_a]:rounded-l-none before:border-transparent font-normal text-dark/8 hover:bg-dark/1 hover:text-dark/9 hover:before:border-dark/3 dark:text-light/8 dark:hover:bg-light/2 dark:hover:before:border-light/3 dark:hover:text-light/9" href="/advanced/meta-model-ids-and-uids">Meta Model, IDs and UIDs</a></div></li><li class="flex flex-col"><div><a class="group/toclink flex flex-row justify-between pl-5 pr-1.5 py-1.5 text-sm transition-colors relative text-balance before:border-l before:absolute before:left-[-1px] before:top-0 before:h-full rounded-md straight-corners:rounded-none [&+div_a]:rounded-l-none before:border-transparent font-normal text-dark/8 hover:bg-dark/1 hover:text-dark/9 hover:before:border-dark/3 dark:text-light/8 dark:hover:bg-light/2 dark:hover:before:border-light/3 dark:hover:text-light/9" href="/advanced/manual-installation">Manual Installation</a></div></li><li class="flex flex-col"><div><a class="group/toclink flex flex-row justify-between pl-5 pr-1.5 py-1.5 text-sm transition-colors relative text-balance before:border-l before:absolute before:left-[-1px] before:top-0 before:h-full rounded-md straight-corners:rounded-none [&+div_a]:rounded-l-none before:border-transparent font-normal text-dark/8 hover:bg-dark/1 hover:text-dark/9 hover:before:border-dark/3 dark:text-light/8 dark:hover:bg-light/2 dark:hover:before:border-light/3 dark:hover:text-light/9" href="/advanced/setup-script">The setup.rb Script</a></div></li><li class="flex flex-col"><div><a class="group/toclink flex flex-row justify-between pl-5 pr-1.5 py-1.5 text-sm transition-colors relative text-balance before:border-l before:absolute before:left-[-1px] before:top-0 before:h-full rounded-md straight-corners:rounded-none [&+div_a]:rounded-l-none before:border-transparent font-normal text-dark/8 hover:bg-dark/1 hover:text-dark/9 hover:before:border-dark/3 dark:text-light/8 dark:hover:bg-light/2 dark:hover:before:border-light/3 dark:hover:text-light/9" href="/advanced/sourcery">Customizing Code Generation</a></div></li></ul></li><li class="flex flex-col"><a class="flex justify-start items-center gap-3 pl-5 pr-1.5 py-1.5 text-sm transition-colors duration-100 text-dark/8 rounded-md straight-corners:rounded-none dark:text-light/7 font-normal hover:bg-dark/1 dark:hover:bg-light/2" href="https://objectbox.io/sync/">Data Sync<svg style="mask-image:url(https://ka-p.fontawesome.com/releases/v6.6.0/svgs/regular/arrow-up-right-from-square.svg?v=2&token=a463935e93);mask-repeat:no-repeat;mask-position:center" class="gb-icon size-3 mr-1 mt-1 place-self-start shrink-0 text-current transition-colors [&>path]:transition-[opacity] [&>path]:[opacity:0.40] group-hover:[&>path]:[opacity:1]"></svg></a></li><li class="flex flex-col"><a class="flex justify-start items-center gap-3 pl-5 pr-1.5 py-1.5 text-sm transition-colors duration-100 text-dark/8 rounded-md straight-corners:rounded-none dark:text-light/7 font-normal hover:bg-dark/1 dark:hover:bg-light/2" href="https://docs.objectbox.io/">Android Database<svg style="mask-image:url(https://ka-p.fontawesome.com/releases/v6.6.0/svgs/regular/arrow-up-right-from-square.svg?v=2&token=a463935e93);mask-repeat:no-repeat;mask-position:center" class="gb-icon size-3 mr-1 mt-1 place-self-start shrink-0 text-current transition-colors [&>path]:transition-[opacity] [&>path]:[opacity:0.40] group-hover:[&>path]:[opacity:1]"></svg></a></li><li class="flex flex-col"><a class="flex justify-start items-center gap-3 pl-5 pr-1.5 py-1.5 text-sm transition-colors duration-100 text-dark/8 rounded-md straight-corners:rounded-none dark:text-light/7 font-normal hover:bg-dark/1 dark:hover:bg-light/2" href="https://pub.dev/packages/objectbox">Flutter Database<svg style="mask-image:url(https://ka-p.fontawesome.com/releases/v6.6.0/svgs/regular/arrow-up-right-from-square.svg?v=2&token=a463935e93);mask-repeat:no-repeat;mask-position:center" class="gb-icon size-3 mr-1 mt-1 place-self-start shrink-0 text-current transition-colors [&>path]:transition-[opacity] [&>path]:[opacity:0.40] group-hover:[&>path]:[opacity:1]"></svg></a></li></ul><div class="relative z-[2] lg:absolute bottom-0 right-0 left-0 flex flex-col pointer-events-none lg:-left-5"><div class="text-sm text-dark/8 pr-0 pt-2 pb-2 mt-4 mb-4 bg-[size:250%_125%] bg-[position:50%_35%] bg-[radial-gradient(farthest-side_at_50%_-70%,_var(--tw-gradient-stops))] from-transparent from-60% to-light to-80% lg:pr-2 lg:mt-0 lg:mb-0 lg:mr-2 lg:pt-16 dark:text-light/6 dark:dark:to-dark"><a target="_blank" href="https://www.gitbook.com/?utm_source=content&utm_medium=trademark&utm_campaign=-LR7sVOoZyL01-NkNVQJ" class="font-semibold ring-1 ring-inset ring-dark/2 pointer-events-auto transition-colors flex flex-row items-center hover:bg-dark/1 bg-light dark:bg-dark px-4 py-4 rounded-lg straight-corners:rounded-none hover:backdrop-blur-sm lg:ring-0 tracking-[-0.016em] dark:hover:bg-light/1 dark:ring-light/1 border border-dark/2 dark:border-light/2"><svg style="mask-image:url(/~gitbook/static/icons/svgs/custom-icons/gitbook.svg?v=2);mask-repeat:no-repeat;mask-position:center" class="gb-icon size-5 mr-3"></svg>Powered by GitBook</a></div></div></div></aside><div class="flex-1 flex flex-col"><!--$--><div class="flex flex-row-reverse justify-end"><aside class="group/aside hidden xl:flex flex-col basis-56 grow-0 shrink-0 sticky py-8 break-anywhere lg:h-full h-[100vh] page-api-block:xl:max-2xl:z-[1] page-api-block:xl:max-2xl:backdrop-blur-md page-api-block:xl:max-2xl:fixed page-api-block:xl:max-2xl:right-8 page-api-block:xl:max-2xl:w-56 page-api-block:xl:max-2xl:bg-light-2/9 page-api-block:xl:max-2xl:rounded page-api-block:xl:max-2xl:h-auto page-api-block:xl:max-2xl:py-0 page-api-block:xl:max-2xl:mt-3 dark:page-api-block:xl:max-2xl:bg-dark-2/8 lg:max-h-[calc(100vh_-_4rem)] top-16 page-api-block:xl:max-2xl:top-16"><div class="hidden page-api-block:xl:max-2xl:flex flex-row items-center gap-3 text-sm font-semibold px-2 py-2"><svg style="mask-image:url(https://ka-p.fontawesome.com/releases/v6.6.0/svgs/regular/bars.svg?v=2&token=a463935e93);mask-repeat:no-repeat;mask-position:center" class="gb-icon size-3"></svg>On this page</div><div class="overflow-auto flex-1 flex flex-col gap-4 [&::-webkit-scrollbar]:bg-transparent [&::-webkit-scrollbar-thumb]:bg-transparent page-api-block:xl:max-2xl:hidden page-api-block:xl:max-2xl:group-hover/aside:flex"><!--$--><ul class="border-l border-dark/2 dark:border-light/1 space-y-1"><li class="flex flex-row"><a href="#what-are-objectbox-transactions" class="flex flex-row items-baseline left-[-1px] relative text-sm py-1 ps-3 hover:text-primary transition-all border-l border-transparent">What are ObjectBox Transactions?</a></li><li class="flex flex-row"><a href="#explicit-transactions" class="flex flex-row items-baseline left-[-1px] relative text-sm py-1 ps-3 hover:text-primary transition-all border-l border-transparent">Explicit transactions</a></li><li class="flex flex-row"><a href="#transaction-costs" class="flex flex-row items-baseline left-[-1px] relative text-sm py-1 ps-3 hover:text-primary transition-all border-l border-transparent">Transaction Costs</a></li><li class="flex flex-row"><a href="#read-transactions" class="flex flex-row items-baseline left-[-1px] relative text-sm py-1 ps-3 hover:text-primary transition-all border-l border-transparent">Read Transactions</a></li><li class="flex flex-row"><a href="#multiversion-concurrency" class="flex flex-row items-baseline left-[-1px] relative text-sm py-1 ps-3 hover:text-primary transition-all border-l border-transparent">Multiversion concurrency</a></li><li class="flex flex-row"><a href="#locking-inside-a-write-transaction" class="flex flex-row items-baseline left-[-1px] relative text-sm py-1 hover:text-primary transition-all border-l border-transparent ps-6 opacity-8">Locking inside a Write Transaction</a></li></ul><!--/$--><div class="flex flex-col gap-3 page-api-block:xl:max-2xl:px-3"><!--$--><div class="flex flex-col items-start gap-2 mt-2"><p class="text-sm text-dark/6 dark:text-light/5">Was this helpful?</p><div class="inline-flex items-center justify-center flex-row rounded-full straight-corners:rounded-sm ring-1 ring-inset ring-dark/2 h-8 dark:ring-light/1"><div class="inline-flex [&>*:last-child]:rounded-r-full [&>*:first-child]:rounded-l-full straight-corners:[&>*:last-child]:rounded-none straight-corners:[&>*:first-child]:rounded-none"><button class="flex flex-col items-center justify-center h-8 w-8 rounded-sm text-dark/6 hover:bg-primary/4 hover:text-primary-600 dark:text-light/5 dark:hover:text-primary-300 dark:hover:bg-primary-300/2" aria-label="No" title="No"><svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="9" cy="9" r="9" fill="currentColor" fill-opacity="0.24"></circle><path fill-rule="evenodd" clip-rule="evenodd" d="M5 8.25C4.58579 8.25 4.25 7.91421 4.25 7.5V6C4.25 5.58579 4.58579 5.25 5 5.25C5.41421 5.25 5.75 5.58579 5.75 6V7.5C5.75 7.91421 5.41421 8.25 5 8.25ZM4.66782 13.3737C4.87421 13.5572 5.19025 13.5386 5.3737 13.3322C7.30371 11.1609 10.6963 11.1609 12.6263 13.3322C12.8098 13.5386 13.1258 13.5572 13.3322 13.3737C13.5386 13.1902 13.5572 12.8742 13.3737 12.6678C11.0459 10.049 6.9541 10.049 4.6263 12.6678C4.44284 12.8742 4.46143 13.1902 4.66782 13.3737ZM12.25 7.5C12.25 7.91421 12.5858 8.25 13 8.25C13.4142 8.25 13.75 7.91421 13.75 7.5V6C13.75 5.58579 13.4142 5.25 13 5.25C12.5858 5.25 12.25 5.58579 12.25 6V7.5Z" fill="currentColor"></path></svg></button><button class="flex flex-col items-center justify-center h-8 w-8 rounded-sm text-dark/6 hover:bg-primary/4 hover:text-primary-600 dark:text-light/5 dark:hover:text-primary-300 dark:hover:bg-primary-300/2" aria-label="Not sure" title="Not sure"><svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="9" cy="9" r="9" fill="currentColor" fill-opacity="0.24"></circle><path fill-rule="evenodd" clip-rule="evenodd" d="M5 8.25C4.58579 8.25 4.25 7.91421 4.25 7.5V6C4.25 5.58579 4.58579 5.25 5 5.25C5.41421 5.25 5.75 5.58579 5.75 6V7.5C5.75 7.91421 5.41421 8.25 5 8.25ZM4.5 12C4.5 11.7239 4.72386 11.5 5 11.5H13C13.2761 11.5 13.5 11.7239 13.5 12C13.5 12.2761 13.2761 12.5 13 12.5H5C4.72386 12.5 4.5 12.2761 4.5 12ZM12.25 7.5C12.25 7.91421 12.5858 8.25 13 8.25C13.4142 8.25 13.75 7.91421 13.75 7.5V6C13.75 5.58579 13.4142 5.25 13 5.25C12.5858 5.25 12.25 5.58579 12.25 6V7.5Z" fill="currentColor"></path></svg></button><button class="flex flex-col items-center justify-center h-8 w-8 rounded-sm text-dark/6 hover:bg-primary/4 hover:text-primary-600 dark:text-light/5 dark:hover:text-primary-300 dark:hover:bg-primary-300/2" aria-label="Yes, it was!" title="Yes, it was!"><svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="9" cy="9" r="9" fill="currentColor" fill-opacity="0.24"></circle><path fill-rule="evenodd" clip-rule="evenodd" d="M5 8.25C4.58579 8.25 4.25 7.91421 4.25 7.5V6C4.25 5.58579 4.58579 5.25 5 5.25C5.41421 5.25 5.75 5.58579 5.75 6V7.5C5.75 7.91421 5.41421 8.25 5 8.25ZM4.66782 11.6263C4.87421 11.4428 5.19025 11.4614 5.3737 11.6678C7.30371 13.8391 10.6963 13.8391 12.6263 11.6678C12.8098 11.4614 13.1258 11.4428 13.3322 11.6263C13.5386 11.8098 13.5572 12.1258 13.3737 12.3322C11.0459 14.951 6.9541 14.951 4.6263 12.3322C4.44284 12.1258 4.46143 11.8098 4.66782 11.6263ZM12.25 7.5C12.25 7.91421 12.5858 8.25 13 8.25C13.4142 8.25 13.75 7.91421 13.75 7.5V6C13.75 5.58579 13.4142 5.25 13 5.25C12.5858 5.25 12.25 5.58579 12.25 6V7.5Z" fill="currentColor"></path></svg></button></div></div></div><!--/$--><div><a href="/~gitbook/pdf?page=-LRIJnzhhl3cynIFNMlD&only=yes" class="flex flex-row items-center text-sm text-dark/6 hover:text-primary py-2 dark:text-light/5"><svg style="mask-image:url(https://ka-p.fontawesome.com/releases/v6.6.0/svgs/regular/file-pdf.svg?v=2&token=a463935e93);mask-repeat:no-repeat;mask-position:center" class="gb-icon size-4 mr-1.5"></svg>Export as PDF</a></div></div></div><div class="mt-4" data-visual-test="removed"></div></aside><main class="flex-1 relative py-8 lg:px-12 break-anywhere page-api-block:xl:max-2xl:pr-0 page-api-block:max-w-[1654px] page-api-block:mx-auto"><header class="max-w-3xl mx-auto mb-6 space-y-3 page-api-block:ml-0"><h1 class="text-4xl font-bold flex items-center gap-4">Transactions</h1><p class="text-lg text-dark-4 dark:text-light-4">ObjectBox for Swift is a fully transactional NoSQL database and ACID compliant. Learn here how database transactions work. Also, how does multiversion concurrency work?</p></header><!--$--><div class="[&>*+*]:mt-5 grid whitespace-pre-wrap"><h2 id="what-are-objectbox-transactions" class="text-3xl font-semibold group relative grid w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0"><div class="grid grid-area-1-1 relative -ml-6 w-7 border-0 opacity-0 group-hover:opacity-[0] group-focus:opacity-[0] md:group-hover:md:opacity-[1] md:group-focus:md:opacity-[1] mt-[1em]"><a href="#what-are-objectbox-transactions" aria-label="Direct link to heading" class="inline-flex h-full items-start dark:text-light/3 dark:shadow-none dark:ring-0 leading-tight"><svg style="mask-image:url(https://ka-p.fontawesome.com/releases/v6.6.0/svgs/regular/hashtag.svg?v=2&token=a463935e93);mask-repeat:no-repeat;mask-position:center" class="gb-icon w-3.5 h-[1lh] transition-colors text-transparent group-hover:text-dark/6 dark:group-hover:text-light/5 lg:w-4"></svg></a></div><div class="grid-area-1-1 z-[1] mt-[1em]">What are ObjectBox Transactions?</div></h2><p class="w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0">A database transaction groups several operations into a single unit of work that either executes completely or not at all. If you are looking for a more detailed introduction to transactions in general, check out this Wikipedia article on <a class="underline underline-offset-2 text-primary hover:text-primary-700 transition-colors " href="https://en.wikipedia.org/wiki/Database_transaction">database transactions</a>.</p><p class="w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0">You may not notice it, but almost all interactions with ObjectBox involve transactions. For example, if you call <code class="py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]">put</code> a write transaction is used. Also if you <code class="py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]">get</code> an object or query for objects, a read transaction is used. All of this is done under the hood and transparent to you. It may be fine to completely ignore transactions in your app without running into any problems. With more complex apps however, it’s usually worth learning transaction basics to make your app more consistent and efficient.</p><h2 id="explicit-transactions" class="text-3xl font-semibold group relative grid w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0"><div class="grid grid-area-1-1 relative -ml-6 w-7 border-0 opacity-0 group-hover:opacity-[0] group-focus:opacity-[0] md:group-hover:md:opacity-[1] md:group-focus:md:opacity-[1] mt-[1em]"><a href="#explicit-transactions" aria-label="Direct link to heading" class="inline-flex h-full items-start dark:text-light/3 dark:shadow-none dark:ring-0 leading-tight"><svg style="mask-image:url(https://ka-p.fontawesome.com/releases/v6.6.0/svgs/regular/hashtag.svg?v=2&token=a463935e93);mask-repeat:no-repeat;mask-position:center" class="gb-icon w-3.5 h-[1lh] transition-colors text-transparent group-hover:text-dark/6 dark:group-hover:text-light/5 lg:w-4"></svg></a></div><div class="grid-area-1-1 z-[1] mt-[1em]">Explicit transactions</div></h2><p class="w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0">All ObjectBox operations run in implicit transactions – unless an explicit transaction is in progress. In the latter case, multiple operations share the (explicit) transaction. In other words, with explicit transactions you control the transaction boundary. Doing so can greatly improve efficiency and consistency in your app.</p><p class="w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0">The class <a class="underline underline-offset-2 text-primary hover:text-primary-700 transition-colors " href="https://objectbox.io/docfiles/swift/current/Classes/Store.html">Store</a> offers the following methods to perform explicit transactions:</p><ul class="space-y-2 w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0"><li class="leading-normal flex items-start"><div class="text-base leading-normal flex items-center justify-center mr-1 min-h-[1lh] min-w-6 text-dark/6 dark:text-light/5"><div class="before:font-var before:content-[--pseudoBefore--content]" style="--pseudoBefore--content:'•';--font-family:Arial;font-size:min(1.5em, 24px);line-height:1"></div></div><div class="space-y-2 flex flex-col flex-1"><p class="w-full mx-auto decoration-primary/6 max-w-3xl min-h-[1lh] flip-heading-hash [&:is(h2)>div]:mt-0 [&:is(h3)>div]:mt-0 [&:is(h4)>div]:mt-0"><code class="py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]">runInTransaction</code><strong class="font-bold">:</strong> Runs the given closure inside a transaction (comes in result-forwarding and/or throwing variants).</p></div></li><li class="leading-normal flex items-start"><div class="text-base leading-normal flex items-center justify-center mr-1 min-h-[1lh] min-w-6 text-dark/6 dark:text-light/5"><div class="before:font-var before:content-[--pseudoBefore--content]" style="--pseudoBefore--content:'•';--font-family:Arial;font-size:min(1.5em, 24px);line-height:1"></div></div><div class="space-y-2 flex flex-col flex-1"><p class="w-full mx-auto decoration-primary/6 max-w-3xl min-h-[1lh] flip-heading-hash [&:is(h2)>div]:mt-0 [&:is(h3)>div]:mt-0 [&:is(h4)>div]:mt-0"><code class="py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]">runInReadOnlyTransaction</code><strong class="font-bold">:</strong> Runs the given closure inside a read(-only) transaction. Unlike write transactions, multiple read transactions can run at the same time.</p></div></li></ul><p class="w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0">The advantage of explicit transactions over the bulk put operations is that you can perform any number of operations and use objects of multiple boxes. In addition, you get a consistent (transactional) view on your data while the transaction is in progress.</p><p class="w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0">Example for a write transaction:</p><div class="group/codeblock grid grid-flow-col w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0"><div class="flex items-center justify-start [grid-area:1/1] text-sm gap-2"></div><button class="group-hover/codeblock:opacity-[1] transition-opacity duration-75 opacity-0 text-xs [grid-area:2/1] z-[2] justify-self-end backdrop-blur-md leading-none self-start ring-1 ring-dark/2 text-dark/7 bg-transparent rounded-md mr-2 mt-2 p-1 hover:ring-dark/3 dark:ring-light/2 dark:text-light/7 dark:hover:ring-light/3 print:hidden">Copy</button><pre class="[grid-area:2/1] relative overflow-auto bg-light-2 dark:bg-dark-2 hide-scroll rounded-md straight-corners:rounded-sm"><code id="7276abad27114ae89ea6b3a75d1276c9" class="min-w-full inline-grid [grid-template-columns:auto_1fr] py-2 px-2 [counter-reset:line]"><span class="grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [&.highlighted:first-child]:rounded-t-md [&.highlighted:first-child>*]:mt-1 [&.highlighted:last-child]:rounded-b-md [&.highlighted:last-child>*]:mb-1 [&:only-child]:hover:ring-transparent [&.highlighted]:rounded-none [&:not(.highlighted)_+_.highlighted]:rounded-t-md [&:not(.highlighted)_+_.highlighted>*]:mt-1 [&.highlighted:has(+:not(.highlighted))]:rounded-b-md [&.highlighted:has(+:not(.highlighted))>*]:mb-1 [&:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md"><span class="ml-3 block text-sm"><span style="color:var(--shiki-token-keyword)">try</span><span style="color:var(--shiki-foreground)"> store.</span><span style="color:var(--shiki-token-function)">runInTransaction</span><span style="color:var(--shiki-foreground)"> {</span> </span></span><span class="grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [&.highlighted:first-child]:rounded-t-md [&.highlighted:first-child>*]:mt-1 [&.highlighted:last-child]:rounded-b-md [&.highlighted:last-child>*]:mb-1 [&:only-child]:hover:ring-transparent [&.highlighted]:rounded-none [&:not(.highlighted)_+_.highlighted]:rounded-t-md [&:not(.highlighted)_+_.highlighted>*]:mt-1 [&.highlighted:has(+:not(.highlighted))]:rounded-b-md [&.highlighted:has(+:not(.highlighted))>*]:mb-1 [&:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md"><span class="ml-3 block text-sm"><span style="color:var(--shiki-foreground)"> </span><span style="color:var(--shiki-token-keyword)">try</span><span style="color:var(--shiki-foreground)"> allUsers.</span><span style="color:var(--shiki-token-function)">forEach</span><span style="color:var(--shiki-foreground)"> { user </span><span style="color:var(--shiki-token-keyword)">in</span> </span></span><span class="grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [&.highlighted:first-child]:rounded-t-md [&.highlighted:first-child>*]:mt-1 [&.highlighted:last-child]:rounded-b-md [&.highlighted:last-child>*]:mb-1 [&:only-child]:hover:ring-transparent [&.highlighted]:rounded-none [&:not(.highlighted)_+_.highlighted]:rounded-t-md [&:not(.highlighted)_+_.highlighted>*]:mt-1 [&.highlighted:has(+:not(.highlighted))]:rounded-b-md [&.highlighted:has(+:not(.highlighted))>*]:mb-1 [&:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md"><span class="ml-3 block text-sm"><span style="color:var(--shiki-foreground)"> </span><span style="color:var(--shiki-token-keyword)">if</span><span style="color:var(--shiki-token-function)"> </span><span style="color:var(--shiki-token-punctuation)">(</span><span style="color:var(--shiki-token-function)">modify</span><span style="color:var(--shiki-token-punctuation)">(</span><span style="color:var(--shiki-token-function)">user</span><span style="color:var(--shiki-token-punctuation)">))</span><span style="color:var(--shiki-foreground)"> {</span> </span></span><span class="grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [&.highlighted:first-child]:rounded-t-md [&.highlighted:first-child>*]:mt-1 [&.highlighted:last-child]:rounded-b-md [&.highlighted:last-child>*]:mb-1 [&:only-child]:hover:ring-transparent [&.highlighted]:rounded-none [&:not(.highlighted)_+_.highlighted]:rounded-t-md [&:not(.highlighted)_+_.highlighted>*]:mt-1 [&.highlighted:has(+:not(.highlighted))]:rounded-b-md [&.highlighted:has(+:not(.highlighted))>*]:mb-1 [&:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md"><span class="ml-3 block text-sm"><span style="color:var(--shiki-foreground)"> </span><span style="color:var(--shiki-token-keyword)">try</span><span style="color:var(--shiki-foreground)"> box.</span><span style="color:var(--shiki-token-function)">put</span><span style="color:var(--shiki-token-punctuation)">(</span><span style="color:var(--shiki-token-function)">user</span><span style="color:var(--shiki-token-punctuation)">)</span> </span></span><span class="grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [&.highlighted:first-child]:rounded-t-md [&.highlighted:first-child>*]:mt-1 [&.highlighted:last-child]:rounded-b-md [&.highlighted:last-child>*]:mb-1 [&:only-child]:hover:ring-transparent [&.highlighted]:rounded-none [&:not(.highlighted)_+_.highlighted]:rounded-t-md [&:not(.highlighted)_+_.highlighted>*]:mt-1 [&.highlighted:has(+:not(.highlighted))]:rounded-b-md [&.highlighted:has(+:not(.highlighted))>*]:mb-1 [&:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md"><span class="ml-3 block text-sm"><span style="color:var(--shiki-foreground)"> } </span><span style="color:var(--shiki-token-keyword)">else</span><span style="color:var(--shiki-foreground)"> {</span> </span></span><span class="grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [&.highlighted:first-child]:rounded-t-md [&.highlighted:first-child>*]:mt-1 [&.highlighted:last-child]:rounded-b-md [&.highlighted:last-child>*]:mb-1 [&:only-child]:hover:ring-transparent [&.highlighted]:rounded-none [&:not(.highlighted)_+_.highlighted]:rounded-t-md [&:not(.highlighted)_+_.highlighted>*]:mt-1 [&.highlighted:has(+:not(.highlighted))]:rounded-b-md [&.highlighted:has(+:not(.highlighted))>*]:mb-1 [&:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md"><span class="ml-3 block text-sm"><span style="color:var(--shiki-foreground)"> </span><span style="color:var(--shiki-token-keyword)">try</span><span style="color:var(--shiki-foreground)"> box.</span><span style="color:var(--shiki-token-function)">remove</span><span style="color:var(--shiki-token-punctuation)">(</span><span style="color:var(--shiki-token-function)">user</span><span style="color:var(--shiki-token-punctuation)">)</span> </span></span><span class="grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [&.highlighted:first-child]:rounded-t-md [&.highlighted:first-child>*]:mt-1 [&.highlighted:last-child]:rounded-b-md [&.highlighted:last-child>*]:mb-1 [&:only-child]:hover:ring-transparent [&.highlighted]:rounded-none [&:not(.highlighted)_+_.highlighted]:rounded-t-md [&:not(.highlighted)_+_.highlighted>*]:mt-1 [&.highlighted:has(+:not(.highlighted))]:rounded-b-md [&.highlighted:has(+:not(.highlighted))>*]:mb-1 [&:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md"><span class="ml-3 block text-sm"><span style="color:var(--shiki-foreground)"> }</span> </span></span><span class="grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [&.highlighted:first-child]:rounded-t-md [&.highlighted:first-child>*]:mt-1 [&.highlighted:last-child]:rounded-b-md [&.highlighted:last-child>*]:mb-1 [&:only-child]:hover:ring-transparent [&.highlighted]:rounded-none [&:not(.highlighted)_+_.highlighted]:rounded-t-md [&:not(.highlighted)_+_.highlighted>*]:mt-1 [&.highlighted:has(+:not(.highlighted))]:rounded-b-md [&.highlighted:has(+:not(.highlighted))>*]:mb-1 [&:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md"><span class="ml-3 block text-sm"><span style="color:var(--shiki-foreground)"> }</span> </span></span><span class="grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [&.highlighted:first-child]:rounded-t-md [&.highlighted:first-child>*]:mt-1 [&.highlighted:last-child]:rounded-b-md [&.highlighted:last-child>*]:mb-1 [&:only-child]:hover:ring-transparent [&.highlighted]:rounded-none [&:not(.highlighted)_+_.highlighted]:rounded-t-md [&:not(.highlighted)_+_.highlighted>*]:mt-1 [&.highlighted:has(+:not(.highlighted))]:rounded-b-md [&.highlighted:has(+:not(.highlighted))>*]:mb-1 [&:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md"><span class="ml-3 block text-sm"><span style="color:var(--shiki-foreground)">}</span></span></span></code></pre></div><!--$--><h2 id="transaction-costs" class="text-3xl font-semibold group relative grid w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0"><div class="grid grid-area-1-1 relative -ml-6 w-7 border-0 opacity-0 group-hover:opacity-[0] group-focus:opacity-[0] md:group-hover:md:opacity-[1] md:group-focus:md:opacity-[1] mt-[1em]"><a href="#transaction-costs" aria-label="Direct link to heading" class="inline-flex h-full items-start dark:text-light/3 dark:shadow-none dark:ring-0 leading-tight"><svg style="mask-image:url(https://ka-p.fontawesome.com/releases/v6.6.0/svgs/regular/hashtag.svg?v=2&token=a463935e93);mask-repeat:no-repeat;mask-position:center" class="gb-icon w-3.5 h-[1lh] transition-colors text-transparent group-hover:text-dark/6 dark:group-hover:text-light/5 lg:w-4"></svg></a></div><div class="grid-area-1-1 z-[1] mt-[1em]">Transaction Costs</div></h2><!--/$--><!--$--><p class="w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0">Understanding transactions is essential to master database performance. If you just remember one sentence on this topic, it should be this one: a write transaction has its price.</p><!--/$--><!--$--><p class="w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0">Committing a transaction involves syncing data to the physical storage, which is a relatively expensive operation for databases. Only when the file system confirms that all data has been stored in a durable manner (not just memory cached), the transaction can be considered successful. This file sync required by a transaction may take a couple of milliseconds. Keep this in mind and try to group several operations (e.g.<code class="py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]">put</code>calls) in one transaction.</p><!--/$--><!--$--><p class="w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0">Consider this example:</p><!--/$--><!--$--><div class="group/codeblock grid grid-flow-col w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0"><div class="flex items-center justify-start [grid-area:1/1] text-sm gap-2"></div><button class="group-hover/codeblock:opacity-[1] transition-opacity duration-75 opacity-0 text-xs [grid-area:2/1] z-[2] justify-self-end backdrop-blur-md leading-none self-start ring-1 ring-dark/2 text-dark/7 bg-transparent rounded-md mr-2 mt-2 p-1 hover:ring-dark/3 dark:ring-light/2 dark:text-light/7 dark:hover:ring-light/3 print:hidden">Copy</button><pre class="[grid-area:2/1] relative overflow-auto bg-light-2 dark:bg-dark-2 hide-scroll rounded-md straight-corners:rounded-sm"><code id="238ea954e3cf493fbba3db48e92635b9" class="min-w-full inline-grid [grid-template-columns:auto_1fr] py-2 px-2 [counter-reset:line]"><span class="grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [&.highlighted:first-child]:rounded-t-md [&.highlighted:first-child>*]:mt-1 [&.highlighted:last-child]:rounded-b-md [&.highlighted:last-child>*]:mb-1 [&:only-child]:hover:ring-transparent [&.highlighted]:rounded-none [&:not(.highlighted)_+_.highlighted]:rounded-t-md [&:not(.highlighted)_+_.highlighted>*]:mt-1 [&.highlighted:has(+:not(.highlighted))]:rounded-b-md [&.highlighted:has(+:not(.highlighted))>*]:mb-1 [&:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md"><span class="ml-3 block text-sm"><span style="color:var(--shiki-token-keyword)">try</span><span style="color:var(--shiki-foreground)"> allUsers.</span><span style="color:var(--shiki-token-function)">forEach</span><span style="color:var(--shiki-foreground)"> { user </span><span style="color:var(--shiki-token-keyword)">in</span> </span></span><span class="grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [&.highlighted:first-child]:rounded-t-md [&.highlighted:first-child>*]:mt-1 [&.highlighted:last-child]:rounded-b-md [&.highlighted:last-child>*]:mb-1 [&:only-child]:hover:ring-transparent [&.highlighted]:rounded-none [&:not(.highlighted)_+_.highlighted]:rounded-t-md [&:not(.highlighted)_+_.highlighted>*]:mt-1 [&.highlighted:has(+:not(.highlighted))]:rounded-b-md [&.highlighted:has(+:not(.highlighted))>*]:mb-1 [&:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md"><span class="ml-3 block text-sm"><span style="color:var(--shiki-foreground)"> </span><span style="color:var(--shiki-token-function)">modify</span><span style="color:var(--shiki-token-punctuation)">(</span><span style="color:var(--shiki-token-function)">user</span><span style="color:var(--shiki-token-punctuation)">)</span><span style="color:var(--shiki-foreground)"> </span><span style="color:var(--shiki-token-comment)">// modifies properties of given user</span> </span></span><span class="grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [&.highlighted:first-child]:rounded-t-md [&.highlighted:first-child>*]:mt-1 [&.highlighted:last-child]:rounded-b-md [&.highlighted:last-child>*]:mb-1 [&:only-child]:hover:ring-transparent [&.highlighted]:rounded-none [&:not(.highlighted)_+_.highlighted]:rounded-t-md [&:not(.highlighted)_+_.highlighted>*]:mt-1 [&.highlighted:has(+:not(.highlighted))]:rounded-b-md [&.highlighted:has(+:not(.highlighted))>*]:mb-1 [&:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md"><span class="ml-3 block text-sm"><span style="color:var(--shiki-foreground)"> </span><span style="color:var(--shiki-token-keyword)">try</span><span style="color:var(--shiki-foreground)"> box.</span><span style="color:var(--shiki-token-function)">put</span><span style="color:var(--shiki-token-punctuation)">(</span><span style="color:var(--shiki-token-function)">user</span><span style="color:var(--shiki-token-punctuation)">)</span> </span></span><span class="grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [&.highlighted:first-child]:rounded-t-md [&.highlighted:first-child>*]:mt-1 [&.highlighted:last-child]:rounded-b-md [&.highlighted:last-child>*]:mb-1 [&:only-child]:hover:ring-transparent [&.highlighted]:rounded-none [&:not(.highlighted)_+_.highlighted]:rounded-t-md [&:not(.highlighted)_+_.highlighted>*]:mt-1 [&.highlighted:has(+:not(.highlighted))]:rounded-b-md [&.highlighted:has(+:not(.highlighted))>*]:mb-1 [&:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md"><span class="ml-3 block text-sm"><span style="color:var(--shiki-foreground)">}</span></span></span></code></pre></div><!--/$--><!--$--><p class="w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0">Do you see what’s wrong with that code? There is an implicit transaction for each user which is very inefficient especially for a high number of objects. It is much more efficient to use of of the put overloads to store all users at once:</p><!--/$--><!--$--><div class="group/codeblock grid grid-flow-col w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0"><div class="flex items-center justify-start [grid-area:1/1] text-sm gap-2"></div><button class="group-hover/codeblock:opacity-[1] transition-opacity duration-75 opacity-0 text-xs [grid-area:2/1] z-[2] justify-self-end backdrop-blur-md leading-none self-start ring-1 ring-dark/2 text-dark/7 bg-transparent rounded-md mr-2 mt-2 p-1 hover:ring-dark/3 dark:ring-light/2 dark:text-light/7 dark:hover:ring-light/3 print:hidden">Copy</button><pre class="[grid-area:2/1] relative overflow-auto bg-light-2 dark:bg-dark-2 hide-scroll rounded-md straight-corners:rounded-sm"><code id="5cb53639380448ddb08b50c0f0eb3848" class="min-w-full inline-grid [grid-template-columns:auto_1fr] py-2 px-2 [counter-reset:line]"><span class="grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [&.highlighted:first-child]:rounded-t-md [&.highlighted:first-child>*]:mt-1 [&.highlighted:last-child]:rounded-b-md [&.highlighted:last-child>*]:mb-1 [&:only-child]:hover:ring-transparent [&.highlighted]:rounded-none [&:not(.highlighted)_+_.highlighted]:rounded-t-md [&:not(.highlighted)_+_.highlighted>*]:mt-1 [&.highlighted:has(+:not(.highlighted))]:rounded-b-md [&.highlighted:has(+:not(.highlighted))>*]:mb-1 [&:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md"><span class="ml-3 block text-sm"><span style="color:var(--shiki-token-keyword)">try</span><span style="color:var(--shiki-foreground)"> allUsers.</span><span style="color:var(--shiki-token-function)">forEach</span><span style="color:var(--shiki-foreground)"> { user </span><span style="color:var(--shiki-token-keyword)">in</span> </span></span><span class="grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [&.highlighted:first-child]:rounded-t-md [&.highlighted:first-child>*]:mt-1 [&.highlighted:last-child]:rounded-b-md [&.highlighted:last-child>*]:mb-1 [&:only-child]:hover:ring-transparent [&.highlighted]:rounded-none [&:not(.highlighted)_+_.highlighted]:rounded-t-md [&:not(.highlighted)_+_.highlighted>*]:mt-1 [&.highlighted:has(+:not(.highlighted))]:rounded-b-md [&.highlighted:has(+:not(.highlighted))>*]:mb-1 [&:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md"><span class="ml-3 block text-sm"><span style="color:var(--shiki-foreground)"> </span><span style="color:var(--shiki-token-function)">modify</span><span style="color:var(--shiki-token-punctuation)">(</span><span style="color:var(--shiki-token-function)">user</span><span style="color:var(--shiki-token-punctuation)">)</span><span style="color:var(--shiki-foreground)"> </span><span style="color:var(--shiki-token-comment)">// modifies properties of given user</span> </span></span><span class="grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [&.highlighted:first-child]:rounded-t-md [&.highlighted:first-child>*]:mt-1 [&.highlighted:last-child]:rounded-b-md [&.highlighted:last-child>*]:mb-1 [&:only-child]:hover:ring-transparent [&.highlighted]:rounded-none [&:not(.highlighted)_+_.highlighted]:rounded-t-md [&:not(.highlighted)_+_.highlighted>*]:mt-1 [&.highlighted:has(+:not(.highlighted))]:rounded-b-md [&.highlighted:has(+:not(.highlighted))>*]:mb-1 [&:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md"><span class="ml-3 block text-sm"><span style="color:var(--shiki-foreground)">}</span> </span></span><span class="grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [&.highlighted:first-child]:rounded-t-md [&.highlighted:first-child>*]:mt-1 [&.highlighted:last-child]:rounded-b-md [&.highlighted:last-child>*]:mb-1 [&:only-child]:hover:ring-transparent [&.highlighted]:rounded-none [&:not(.highlighted)_+_.highlighted]:rounded-t-md [&:not(.highlighted)_+_.highlighted>*]:mt-1 [&.highlighted:has(+:not(.highlighted))]:rounded-b-md [&.highlighted:has(+:not(.highlighted))>*]:mb-1 [&:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md"><span class="ml-3 block text-sm"><span style="color:var(--shiki-token-keyword)">try</span><span style="color:var(--shiki-foreground)"> box.</span><span style="color:var(--shiki-token-function)">put</span><span style="color:var(--shiki-token-punctuation)">(</span><span style="color:var(--shiki-token-function)">allUsers</span><span style="color:var(--shiki-token-punctuation)">)</span></span></span></code></pre></div><!--/$--><!--$--><p class="w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0">Much better! If you have 1,000 users, the latter example uses a single transaction to store all users. The first code example uses 1,000 (!) implicit transactions causing a massive slow down.</p><!--/$--><!--$--><h2 id="read-transactions" class="text-3xl font-semibold group relative grid w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0"><div class="grid grid-area-1-1 relative -ml-6 w-7 border-0 opacity-0 group-hover:opacity-[0] group-focus:opacity-[0] md:group-hover:md:opacity-[1] md:group-focus:md:opacity-[1] mt-[1em]"><a href="#read-transactions" aria-label="Direct link to heading" class="inline-flex h-full items-start dark:text-light/3 dark:shadow-none dark:ring-0 leading-tight"><svg style="mask-image:url(https://ka-p.fontawesome.com/releases/v6.6.0/svgs/regular/hashtag.svg?v=2&token=a463935e93);mask-repeat:no-repeat;mask-position:center" class="gb-icon w-3.5 h-[1lh] transition-colors text-transparent group-hover:text-dark/6 dark:group-hover:text-light/5 lg:w-4"></svg></a></div><div class="grid-area-1-1 z-[1] mt-[1em]">Read Transactions</div></h2><!--/$--><!--$--><p class="w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0">In ObjectBox, read transactions are cheap. In contrast to write transactions, there is no commit and thus no expensive sync to the file system. Operations like <code class="py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]">get</code> , <code class="py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]">count</code> , and queries run inside an implicit read transaction if they are not called when already inside an explicit transaction (read or write). Note that it is illegal to <code class="py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]">put</code> when inside a read transaction: an exception will be thrown.</p><!--/$--><!--$--><p class="w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0">While read transactions are much cheaper than write transactions, there is still some overhead to starting a read transaction. Thus, for a high number of reads (e.g. hundreds, in a loop), you can improve performance by grouping those reads in a single read transaction (see explicit transactions below).</p><!--/$--><!--$--><h2 id="multiversion-concurrency" class="text-3xl font-semibold group relative grid w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0"><div class="grid grid-area-1-1 relative -ml-6 w-7 border-0 opacity-0 group-hover:opacity-[0] group-focus:opacity-[0] md:group-hover:md:opacity-[1] md:group-focus:md:opacity-[1] mt-[1em]"><a href="#multiversion-concurrency" aria-label="Direct link to heading" class="inline-flex h-full items-start dark:text-light/3 dark:shadow-none dark:ring-0 leading-tight"><svg style="mask-image:url(https://ka-p.fontawesome.com/releases/v6.6.0/svgs/regular/hashtag.svg?v=2&token=a463935e93);mask-repeat:no-repeat;mask-position:center" class="gb-icon w-3.5 h-[1lh] transition-colors text-transparent group-hover:text-dark/6 dark:group-hover:text-light/5 lg:w-4"></svg></a></div><div class="grid-area-1-1 z-[1] mt-[1em]">Multiversion concurrency</div></h2><!--/$--><!--$--><p class="w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0">ObjectBox gives developers <a class="underline underline-offset-2 text-primary hover:text-primary-700 transition-colors " href="https://en.wikipedia.org/wiki/Multiversion_concurrency_control">Multiversion concurrency control (MVCC)</a> semantics. This allows multiple concurrent readers (read transactions) which can execute immediately without blocking or waiting. This is guaranteed by storing multiple versions of (committed) data. Even if a write transaction is in progress, a read transaction can read the last consistent state immediately. Write transactions are executed sequentially to ensure a consistent state. Thus, it is advised to keep write transactions short to avoid blocking other pending write transactions. For example, it is usually a bad idea to do networking or complex calculations while inside a write transaction. Instead, do any expensive operation and prepare objects before entering a write transaction.</p><!--/$--><!--$--><p class="w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0">Note that you do not have to worry about making write transactions sequential yourself. If multiple threads want to write at the same time (e.g. via <code class="py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]">put</code> or <code class="py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]">runInTransaction</code>), one of the threads will be selected to go first, while the other threads have to wait. It works just like a lock.</p><!--/$--><!--$--><h3 id="locking-inside-a-write-transaction" class="text-2xl font-semibold group relative grid w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0"><div class="grid grid-area-1-1 relative -ml-6 w-7 border-0 opacity-0 group-hover:opacity-[0] group-focus:opacity-[0] md:group-hover:md:opacity-[1] md:group-focus:md:opacity-[1] mt-[0.75em]"><a href="#locking-inside-a-write-transaction" aria-label="Direct link to heading" class="inline-flex h-full items-start dark:text-light/3 dark:shadow-none dark:ring-0 leading-snug"><svg style="mask-image:url(https://ka-p.fontawesome.com/releases/v6.6.0/svgs/regular/hashtag.svg?v=2&token=a463935e93);mask-repeat:no-repeat;mask-position:center" class="gb-icon w-3.5 h-[1lh] transition-colors text-transparent group-hover:text-dark/6 dark:group-hover:text-light/5 lg:w-4"></svg></a></div><div class="grid-area-1-1 z-[1] mt-[0.75em]">Locking inside a Write Transaction</div></h3><!--/$--><!--$--><p class="w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0">Avoid locking (even implicitly by e.g. calling <code class="py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]">DispatchQueue.sync</code>or explicitly using <code class="py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]">NSLock</code> or <code class="py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]">objc_sync_enter</code>) when inside a write transaction when possible. Because write transactions run exclusively, they effectively acquire a write lock internally. As with all locks, you need to pay close attention when multiple locks are involved. Always obtain locks in the same order to avoid deadlocks. If you acquire a lock “X” inside a transaction, you must ensure that your code does not start another write transaction while having the lock “X”.</p><!--/$--></div><!--/$--><div class="flex flex-col md:flex-row mt-6 gap-2 max-w-3xl mx-auto page-api-block:ml-0"><a class="group text-sm p-2.5 flex gap-4 flex-1 flex-row-reverse items-center pl-4 border border-dark/3 rounded straight-corners:rounded-none hover:border-primary/6 dark:border-light/2 text-pretty dark:hover:border-primary-300/4 md:p-4 md:text-base" href="/relations"><span class="flex flex-col flex-1 text-right"><span class="text-xs">Previous</span><span class="text-dark dark:text-light/6 group-hover:text-primary line-clamp-2">Relations</span></span><svg style="mask-image:url(https://ka-p.fontawesome.com/releases/v6.6.0/svgs/regular/chevron-left.svg?v=2&token=a463935e93);mask-repeat:no-repeat;mask-position:center" class="gb-icon hidden size-4 text-dark/5 group-hover:text-primary dark:text-light/4 md:block"></svg></a><a class="group text-sm p-2.5 flex gap-4 flex-1 flex-row items-center pr-4 border border-dark/3 rounded straight-corners:rounded-none hover:border-primary/6 dark:border-light/2 text-pretty dark:hover:border-primary-300/4 md:p-4 md:text-base" href="/faq"><span class="flex flex-col flex-1"><span class="text-xs">Next</span><span class="text-dark dark:text-light/6 group-hover:text-primary line-clamp-2">ObjectBox Swift FAQ</span></span><svg style="mask-image:url(https://ka-p.fontawesome.com/releases/v6.6.0/svgs/regular/chevron-right.svg?v=2&token=a463935e93);mask-repeat:no-repeat;mask-position:center" class="gb-icon hidden size-4 text-dark/5 group-hover:text-primary dark:text-light/4 md:block"></svg></a></div><div class="flex flex-row items-center mt-6 max-w-3xl mx-auto page-api-block:ml-0"><p class="flex-1 text-sm text-dark/6 dark:text-light/5">Last updated <time data-visual-test="transparent" dateTime="2024-07-29T10:44:15.181Z" title="7/29/2024, 10:44:15 AM">3 months ago</time></p></div></main></div><!--$--><!--/$--><!--/$--></div></div></div><!--$--><!--/$--><!--$--><!--/$--><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl" data-cfasync="false"> document.addEventListener("DOMContentLoaded", () => { if (Array.from(document.scripts).find(script => script.src.includes('rocket-loader.min.js'))) { const alert = document.createElement('div'); alert.className = 'p-4 mb-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400 mt-8 mx-8'; alert.innerHTML = ` <strong>Error in site configuration:</strong> It looks like ${window.location.hostname} has been incorrectly configured in Cloudflare. This may lead to unexpected behavior or issues with the page loading. If you are the owner of this site, please refer to <a href="https://docs.gitbook.com/published-documentation/custom-domain/configure-dns#are-you-using-cloudflare" class="underline">GitBook's documentation</a> for steps to fix the problem. `; document.body.prepend(alert); } });</script><script src="/_next/static/chunks/webpack-21fb00c223e55731.js" nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl" async=""></script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"1:HC[\"/\",\"\"]\n2:HL[\"/_next/static/css/2d00a2f28ca4dc5d.css\",\"style\"]\n3:HL[\"/_next/static/css/99f50cfb598d2941.css\",\"style\"]\n4:HL[\"/_next/static/css/d42d805b938873da.css\",\"style\"]\n5:HL[\"/_next/static/css/8adaabd9e3445f84.css\",\"style\"]\n6:HL[\"/_next/static/css/c311d6484335995a.css\",\"style\"]\n7:HL[\"/_next/static/css/5a687dea857dc6f5.css\",\"style\"]\n8:HL[\"/_next/static/css/7235fa9d119901d4.css\",\"style\"]\n9:HL[\"/_next/static/css/86d6274f3e6d760c.css\",\"style\"]\na:HL[\"/_next/static/css/a91fbeec63857000.css\",\"style\"]\nb:HL[\"/_next/static/css/2d0986519abf0323.css\",\"style\"]\nc:HL[\"/_next/static/css/0f891de5863d7182.css\",\"style\"]\nd:I[11815,[],\"default\"]\n10:I[55092,[],\"default\"]\n12:I[82023,[],\"default\"]\n17:I[44622,[\"6470\",\"static/chunks/app/global-error-19768e91f18f21d9.js\"],\"default\"]\n11:[\"pathname\",\"transactions\",\"oc\"]\n18:[]\n0:[\"$\",\"$Ld\",null,{\"buildId\":\"VRZ9tGovLP9KrGt4j2xcU\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"transactions\"],\"initialTree\":[\"\",{\"children\":[\"(site)\",{\"children\":[\"(content)\",{\"children\":[[\"pathname\",\"transactions\",\"oc\"],{\"children\":[\"__PAGE__?{\\\"pathname\\\":[\\\"transactions\\\"]}\",{}]}]}]},\"$undefined\",\"$undefined\",true]}],\"initialSeedData\":[\"\",{\"children\":[\"(site)\",{\"children\":[\"(content)\",{\"children\":[[\"pathname\",\"transactions\",\"oc\"],{\"children\":[\"__PAGE__\",{},[[\"$Le\",\"$Lf\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/7235fa9d119901d4.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/86d6274f3e6d760c.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"2\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/a91fbeec63857000.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"3\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2d0986519abf0323.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"4\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/0f891de5863d7182.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]]],null],null]},[null,[\"$\",\"$L10\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(site)\",\"children\",\"(content)\",\"children\",\"$11\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L12\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$L13\",\"notFoundStyles\":[]}]],[[\"$\",\"div\",null,{\"className\":\"flex flex-row flex-1 relative py-8 lg:px-16 xl:mr-56 items-center lg:items-start\",\"children\":[\"$\",\"div\",null,{\"className\":\"flex-1 max-w-3xl mx-auto page-full-width:mx-0\",\"children\":[[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"mb-8\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[47px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"skeleton-paragraph\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md [height:calc(15rem-1px)] [max-width:calc(48rem-1px)] mb-4\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_48px_48px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[ro"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"tateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}]]}]}],[],[]]]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/5a687dea857dc6f5.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],\"$L14\"],null],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2d00a2f28ca4dc5d.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/99f50cfb598d2941.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"2\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/d42d805b938873da.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"3\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/8adaabd9e3445f84.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"4\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/c311d6484335995a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],\"$L15\"],null],null]},[null,[\"$\",\"$L10\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L12\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$L16\"],\"globalErrorComponent\":\"$17\",\"missingSlots\":\"$W18\"}]\n1a:I[17760,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"9505\",\"static/chunks/9505-a8f112b566ef7f41.js\",\"1538\",\"static/chunks/1538-28b9996ceedaa74d.js\",\"1285\",\"static/chunks/1285-2b0f91300e0c0b9a.js\",\"3902\",\"static/chunks/3902-19c217a299034164.js\",\"8280\",\"static/chunks/app/(site)/(content)/layout-b3c513d48aa14062.js\"],\"ClientContexts\"]\n1b:I[72020,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"9505\",\"static/chunks/9505-a8f112b566ef7f41.js\",\"1538\",\"static/chunks/1538-28b9996ceedaa74d.js\",\"1285\",\"static/chunks/1285-2b0f91300e0c0b9a.js\",\"3902\",\"static/chunks/3902-19c217a299034164.js\",\"8280\",\"static/chunks/app/(site)/(content)/layout-b3c513d48aa14062.js\"],\"HeaderMobileMenu\"]\n1c:I[22833,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"4012\",\"static/chunks/4012-d5519c7c19347ff0.js\",\"7457\",\"static/chunks/app/(site)/layout-512d7fc9258aa558.js\"],\"Link\"]\n20:\"$Sreact.suspense\"\n21:I[86604,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"9505\",\"static/chunks/9505-a8f112b566ef7f41.js\",\"1538\",\"static/chunks/1538-28b9996ceedaa74d.js\",\"1285\",\"static/chunks/1285-2b0f91300e0c0b9a.js\",\"3902\",\"static/chunks/3902-19c217a299034164.js\",\"8280"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"\",\"static/chunks/app/(site)/(content)/layout-b3c513d48aa14062.js\"],\"SearchButton\"]\n22:I[19656,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"9505\",\"static/chunks/9505-a8f112b566ef7f41.js\",\"1538\",\"static/chunks/1538-28b9996ceedaa74d.js\",\"1285\",\"static/chunks/1285-2b0f91300e0c0b9a.js\",\"3902\",\"static/chunks/3902-19c217a299034164.js\",\"8280\",\"static/chunks/app/(site)/(content)/layout-b3c513d48aa14062.js\"],\"TOCScrollContainer\"]\n23:I[66185,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"9505\",\"static/chunks/9505-a8f112b566ef7f41.js\",\"1538\",\"static/chunks/1538-28b9996ceedaa74d.js\",\"1285\",\"static/chunks/1285-2b0f91300e0c0b9a.js\",\"3902\",\"static/chunks/3902-19c217a299034164.js\",\"8280\",\"static/chunks/app/(site)/(content)/layout-b3c513d48aa14062.js\"],\"ToggleableLinkItem\"]\n28:I[22563,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"4012\",\"static/chunks/4012-d5519c7c19347ff0.js\",\"7457\",\"static/chunks/app/(site)/layout-512d7fc9258aa558.js\"],\"Icon\"]\n29:I[59814,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"9505\",\"static/chunks/9505-a8f112b566ef7f41.js\",\"1538\",\"static/chunks/1538-28b9996ceedaa74d.js\",\"1285\",\"static/chunks/1285-2b0f91300e0c0b9a.js\",\"3902\",\"static/chunks/3902-19c217a299034164.js\",\"8280\",\"static/chunks/app/(site)/(content)/layout-b3c513d48aa14062.js\"],\"SearchModal\"]\n2a:I[35489,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"9505\",\"static/chunks/9505-a8f112b566ef7f41.js\",\"1538\",\"static/chunks/1538-28b9996ceedaa74d.js\",\"1285\",\"static/chunks/1285-2b0f91300e0c0b9a.js\",\"3902\",\"static/chunks/3902-19c217a299034164.js\",\"8280\",\"static/chunks/app/(site)/(content)/layout-b3c513d48aa14062.js\"],\"CookiesToast\"]\n19:HC\"https://api.gitbook.com\"\n13:[\"$\",\"div\",null,{\"className\":\"flex-1 flex flex-row items-center justify-center py-9\",\"children\":[\"$\",\"div\",null,{\"className\":\"max-w-80\",\"children\":[[\"$\",\"h2\",null,{\"className\":\"text-2xl font-semibold mb-2\",\"children\":\"Page not found\"}],[\"$\",\"p\",null,{\"className\":\"text-base mb-4\",\"children\":\"The page you are looking for doesn't exist.\"}]]}]}]\n14:[\"$\",\"$L1a\",null,{\"nonce\":\"NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl\",\"forcedTheme\":\"light\",\"children\":[[[\"$\",\"header\",null,{\"className\":\"flex flex-col h-[64px] sticky top-0 z-10 w-full flex-none shadow-thinbottom lg:z-10 dark:shadow-light/1 bg-light dark:bg-dark\",\"children\":[[\"$\",\"div\",null,{\"className\":\"scroll-nojump\",\"children\":[\"$\",\"div\",null,{\"className\":\"gap-4 grid grid-flow-col auto-cols-[auto_auto_1fr_auto] h-16 items-center align-center justify-between w-full px-4 sm:px-6 md:px-8 max-w-screen-2xl mx-auto page-full-width:max-w-full\",\"children\":[[\"$\",\"div\",null,{\"className\":\"flex flex-row gap-2\",\"children\":[[\"$\",\"$L1b\",null,{\"className\":\"lg:hidden text-dark dark:text-light\"}],[\"$\",\"$L1c\",null,{\"href\":\"/\",\"className\":\"group/headerlogo flex-1 flex flex-row items-center shrink-0\",\"children\":[[\"$L1d\",\"$L1e\"],[\"$\",\"div\",null,{\"className\":\"text-pretty line-clamp-3 leading-[1.1] tracking-tight max-w-[18ch] lg:max-w-[24ch] lg:text-lg/tight font-semibold ms-3 text-dark dark:text-light\",\"children\":\"ObjectBox Swift\"}]]}]]}],[\"$\",\"div\",null,{\"className\":\"z-20\",\"children\":null}],\"$L1f\",[\"$\",\"div\",null,{\"className\":\"flex md:w-56 grow-0 shrink-0 justify-self-end\",\"children\":[\"$\",\"$20\",null,{\"fallback\":null,\"children\":[\"$\",\"$L21\",null,{\"style\":null,\"children\":[\"$\",\"span\",null,{\"className\":\"flex-1\",\"children\":\"Search\"}]}]}]}]]}]}],null]}],[\"$\",\"div\",null,{\"className\":\"scroll-nojump\",\"children\":[\"$\",\"div\",null,{\"className\":\"flex flex-col lg:flex-row px-4 sm:px-6 md:px-8 max-w-screen-2xl mx-auto page-full-width:max-w-full min-h-[calc(100vh-64px)]\",\"children\":[[\""])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"$\",\"aside\",null,{\"className\":\"relative group flex flex-col basis-full bg-light grow-0 shrink-0 shadow-thinbottom navigation-open:shadow-dark/2 z-[1] top-0 h-[100vh] lg:basis-72 lg:navigation-open:border-b-0 lg:sticky dark:bg-dark dark:navigation-open:shadow-light/2 page-no-toc:hidden lg:top-16 lg:h-[calc(100vh_-_4rem)]\",\"children\":[null,[\"$\",\"$L22\",null,{\"className\":\"pt-4 hidden lg:flex flex-grow flex-col overflow-y-auto lg:gutter-stable lg:pr-2 group-hover:[\u0026::-webkit-scrollbar]:bg-dark/1 group-hover:[\u0026::-webkit-scrollbar-thumb]:bg-dark/3 [\u0026::-webkit-scrollbar]:bg-transparent [\u0026::-webkit-scrollbar-thumb]:bg-transparent dark:[\u0026::-webkit-scrollbar]:bg-transparent dark:[\u0026::-webkit-scrollbar-thumb]:bg-transparent dark:group-hover:[\u0026::-webkit-scrollbar]:bg-light/1 dark:group-hover:[\u0026::-webkit-scrollbar-thumb]:bg-light/3 navigation-open:flex lg:-ml-5 lg:pb-20\",\"children\":[null,[\"$\",\"ul\",null,{\"className\":\"flex flex-1 flex-col gap-y-0.5\",\"children\":[[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L23\",null,{\"href\":\"/\",\"pathname\":\"\",\"descendants\":null,\"children\":\"ObjectBox Swift Database Docs\"}]}],[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L23\",null,{\"href\":\"/install\",\"pathname\":\"install\",\"descendants\":null,\"children\":\"Install ObjectBox Swift\"}]}],[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L23\",null,{\"href\":\"/getting-started\",\"pathname\":\"getting-started\",\"descendants\":null,\"children\":\"Get Started with ObjectBox Swift\"}]}],[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L23\",null,{\"href\":\"/entity-annotations\",\"pathname\":\"entity-annotations\",\"descendants\":null,\"children\":\"Entity Annotations in ObjectBox\"}]}],[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L23\",null,{\"href\":\"/queries\",\"pathname\":\"queries\",\"descendants\":null,\"children\":\"Queries\"}]}],[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L23\",null,{\"href\":\"/relations\",\"pathname\":\"relations\",\"descendants\":null,\"children\":\"Relations\"}]}],[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L23\",null,{\"href\":\"/transactions\",\"pathname\":\"transactions\",\"descendants\":null,\"children\":\"Transactions\"}]}],[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L23\",null,{\"href\":\"/faq\",\"pathname\":\"faq\",\"descendants\":null,\"children\":\"ObjectBox Swift FAQ\"}]}],\"$L24\",[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[[\"$\",\"div\",null,{\"className\":\"flex items-center gap-3 px-5 pt-6 pb-1.5 text-xs tracking-wide font-semibold uppercase z-[1] sticky -top-4 bg-gradient-to-b from-light to-transparent from-65% dark:from-dark dark:tracking-wider dark:to-transparent\",\"children\":[\"$undefined\",\"Advanced\"]}],[\"$\",\"ul\",null,{\"className\":\"flex flex-1 flex-col gap-y-0.5\",\"children\":[[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L23\",null,{\"href\":\"/advanced/macos\",\"pathname\":\"advanced/macos\",\"descendants\":null,\"children\":\"The Sandbox on macOS\"}]}],[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L23\",null,{\"href\":\"/advanced/custom-types\",\"pathname\":\"advanced/custom-types\",\"descendants\":null,\"children\":\"Enums and Custom Types\"}]}],[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L23\",null,{\"href\":\"/advanced/data-model-updates\",\"pathname\":\"advanced/data-model-updates\",\"descendants\":null,\"children\":\"Data Model Updates\"}]}],[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L23\",null,{\"href\":\"/advanced/meta-model-ids-and-uids\",\"pathname\":\"advanced/meta-model-ids-and-uids\",\"descendants\":null,\"children\":\"Meta Model, IDs and UIDs\"}]}],[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L23\",null,{\"href\":\"/advanced/manual-installation\",\"pathname\":\"advanced/manual-installation\",\"descendants\":null,\"children\":\"Manual Installation\"}]}],[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L23\",null,{\"href\":\"/advanced/setup-script\",\"pathname\":\"advanced/setup-script\",\"descendants\":null,\"children\":\"The setup.rb Script\"}]}],[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L23\",null,{\"href\":\"/advanced/sourcery\",\"pathname\":\"adv"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"anced/sourcery\",\"descendants\":null,\"children\":\"Customizing Code Generation\"}]}]]}]]}],\"$L25\",\"$L26\",\"$L27\"]}],[\"$\",\"div\",null,{\"className\":\"relative z-[2] lg:absolute bottom-0 right-0 left-0 flex flex-col pointer-events-none lg:-left-5\",\"children\":[\"$\",\"div\",null,{\"className\":\"text-sm text-dark/8 pr-0 pt-2 pb-2 mt-4 mb-4 bg-[size:250%_125%] bg-[position:50%_35%] bg-[radial-gradient(farthest-side_at_50%_-70%,_var(--tw-gradient-stops))] from-transparent from-60% to-light to-80% lg:pr-2 lg:mt-0 lg:mb-0 lg:mr-2 lg:pt-16 dark:text-light/6 dark:dark:to-dark\",\"children\":[\"$\",\"a\",null,{\"target\":\"_blank\",\"href\":\"https://www.gitbook.com/?utm_source=content\u0026utm_medium=trademark\u0026utm_campaign=-LR7sVOoZyL01-NkNVQJ\",\"className\":\"font-semibold ring-1 ring-inset ring-dark/2 pointer-events-auto transition-colors flex flex-row items-center hover:bg-dark/1 bg-light dark:bg-dark px-4 py-4 rounded-lg straight-corners:rounded-none hover:backdrop-blur-sm lg:ring-0 tracking-[-0.016em] dark:hover:bg-light/1 dark:ring-light/1 border border-dark/2 dark:border-light/2\",\"children\":[[\"$\",\"$L28\",null,{\"icon\":\"gitbook\",\"className\":\"size-5 mr-3\"}],\"Powered by GitBook\"]}]}]}]]}]]}],[\"$\",\"div\",null,{\"className\":\"flex-1 flex flex-col\",\"children\":[\"$\",\"$L10\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(site)\",\"children\",\"(content)\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L12\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]}]]}]}],null,[\"$\",\"$20\",null,{\"fallback\":null,\"children\":[\"$\",\"$L29\",null,{\"spaceId\":\"-LR7sVOoZyL01-NkNVQJ\",\"revisionId\":\"cIWtIjXpw1DPgf6pOEtP\",\"spaceTitle\":\"ObjectBox Swift\",\"withAsk\":false,\"isMultiVariants\":false,\"pointer\":{\"siteId\":\"site_oiFw9\",\"spaceId\":\"-LR7sVOoZyL01-NkNVQJ\",\"siteSectionId\":\"$undefined\",\"siteSpaceId\":\"sitesp_VTGcb\",\"siteShareKey\":\"$undefined\",\"organizationId\":\"-LETrjVL2EKnHuIjYh8P\",\"revisionId\":\"$undefined\",\"changeRequestId\":\"$undefined\"}}]}]],null,[\"$\",\"$20\",null,{\"fallback\":null,\"children\":[\"$\",\"$L2a\",null,{\"privacyPolicy\":\"https://objectbox.io/wordpress/wp-content/uploads/2022/08/Object-Box-Privacy-Notice.pdf\"}]}],[\"$\",\"script\",null,{\"nonce\":\"NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl\",\"suppressHydrationWarning\":true,\"data-cfasync\":\"false\",\"dangerouslySetInnerHTML\":{\"__html\":\"\\n document.addEventListener(\\\"DOMContentLoaded\\\", () =\u003e {\\n if (Array.from(document.scripts).find(script =\u003e script.src.includes('rocket-loader.min.js'))) {\\n const alert = document.createElement('div');\\n alert.className = 'p-4 mb-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400 mt-8 mx-8';\\n alert.innerHTML = `\\n \u003cstrong\u003eError in site configuration:\u003c/strong\u003e\\n It looks like ${window.location.hostname} has been incorrectly configured in Cloudflare. This may lead to unexpected behavior or issues with the page loading. If you are the owner of this site, please refer to \u003ca href=\\\"https://docs.gitbook.com/published-documentation/custom-domain/configure-dns#are-you-using-cloudflare\\\" class=\\\"underline\\\"\u003eGitBook's documentation\u003c/a\u003e for steps to fix the problem.\\n `;\\n\\n document.body.prepend(alert);\\n }\\n });\"}}],null]}]\n2c:I[5145,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"4012\",\"static/chunks/4012-d5519c7c19347ff0.js\",\"7457\",\"static/chunks/app/(site)/layout-512d7fc9258aa558.js\"],\"IconsProvider\"]\n2d:I[75489,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"4012\",\"static/chunks/4012-d5519c7c19347ff0.js\",\"7457\",\"static/chunks/app/(site)/layout-512d7fc9258aa558.js\"],\"ClientContexts\"]\n2e:I[51169,[\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"3638\",\"static/chunks/app/(site)/error-aabf7054fe6497a1.js\"],\"default\"]\n2b:T112c,\n "])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1," :root {\n --primary-color-50: 232 246 246;\n--primary-color-100: 209 237 237;\n--primary-color-200: 162 219 219;\n--primary-color-300: 116 202 202;\n--primary-color-400: 69 184 184;\n--primary-color-500: 23 166 166;\n--primary-color-600: 18 133 133;\n--primary-color-700: 14 100 100;\n--primary-color-800: 9 66 66;\n--primary-color-900: 5 33 33;\n --contrast-primary-50: 0 0 0;\n--contrast-primary-100: 0 0 0;\n--contrast-primary-200: 0 0 0;\n--contrast-primary-300: 0 0 0;\n--contrast-primary-400: 0 0 0;\n--contrast-primary-500: 0 0 0;\n--contrast-primary-600: 0 0 0;\n--contrast-primary-700: 255 255 255;\n--contrast-primary-800: 255 255 255;\n--contrast-primary-900: 255 255 255;\n\n --primary-base-50: 232 246 246;\n--primary-base-100: 209 237 237;\n--primary-base-200: 162 219 219;\n--primary-base-300: 116 202 202;\n--primary-base-400: 69 184 184;\n--primary-base-500: 23 166 166;\n--primary-base-600: 18 133 133;\n--primary-base-700: 14 100 100;\n--primary-base-800: 9 66 66;\n--primary-base-900: 5 33 33;\n --header-background-50: 255 255 255;\n--header-background-100: 255 255 255;\n--header-background-200: 255 255 255;\n--header-background-300: 255 255 255;\n--header-background-400: 255 255 255;\n--header-background-500: 255 255 255;\n--header-background-600: 204 204 204;\n--header-background-700: 153 153 153;\n--header-background-800: 102 102 102;\n--header-background-900: 51 51 51;\n --header-link-50: 232 246 246;\n--header-link-100: 209 237 237;\n--header-link-200: 162 219 219;\n--header-link-300: 116 202 202;\n--header-link-400: 69 184 184;\n--header-link-500: 23 166 166;\n--header-link-600: 18 133 133;\n--header-link-700: 14 100 100;\n--header-link-800: 9 66 66;\n--header-link-900: 5 33 33;\n --header-button-text-50: 230 230 230;\n--header-button-text-100: 204 204 204;\n--header-button-text-200: 153 153 153;\n--header-button-text-300: 102 102 102;\n--header-button-text-400: 51 51 51;\n--header-button-text-500: 0 0 0;\n--header-button-text-600: 0 0 0;\n--header-button-text-700: 0 0 0;\n--header-button-text-800: 0 0 0;\n--header-button-text-900: 0 0 0;\n }\n .dark {\n --primary-color-50: 232 246 246;\n--primary-color-100: 209 237 237;\n--primary-color-200: 162 219 219;\n--primary-color-300: 116 202 202;\n--primary-color-400: 69 184 184;\n--primary-color-500: 23 166 166;\n--primary-color-600: 18 133 133;\n--primary-color-700: 14 100 100;\n--primary-color-800: 9 66 66;\n--primary-color-900: 5 33 33;\n --primary-base-50: 232 246 246;\n--primary-base-100: 209 237 237;\n--primary-base-200: 162 219 219;\n--primary-base-300: 116 202 202;\n--primary-base-400: 69 184 184;\n--primary-base-500: 23 166 166;\n--primary-base-600: 18 133 133;\n--primary-base-700: 14 100 100;\n--primary-base-800: 9 66 66;\n--primary-base-900: 5 33 33;\n --contrast-primary-50: 0 0 0;\n--contrast-primary-100: 0 0 0;\n--contrast-primary-200: 0 0 0;\n--contrast-primary-300: 0 0 0;\n--contrast-primary-400: 0 0 0;\n--contrast-primary-500: 0 0 0;\n--contrast-primary-600: 0 0 0;\n--contrast-primary-700: 255 255 255;\n--contrast-primary-800: 255 255 255;\n--contrast-primary-900: 255 255 255;\n --header-background-50: 230 230 230;\n--header-background-100: 204 204 204;\n--header-background-200: 153 153 153;\n--header-background-300: 102 102 102;\n--header-background-400: 51 51 51;\n--header-background-500: 0 0 0;\n--header-background-600: 0 0 0;\n--header-background-700: 0 0 0;\n--header-background-800: 0 0 0;\n--header-background-900: 0 0 0;\n --header-link-50: 232 246 246;\n--header-link-100: 209 237 237;\n--header-link-200: 162 219 219;\n--header-link-300: 116 202 202;\n--header-link-400: 69 184 184;\n--header-link-500: 23 166 166;\n--header-link-600: 18 133 133;\n--header-link-700: 14 100 100;\n--header-link-800: 9 66 66;\n--header-link-900: 5 33 33;\n --header-button-text-50: 230 230 230;\n--header-button-text-100: 204 204 204;\n--header-button-text-200: 153 153"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1," 153;\n--header-button-text-300: 102 102 102;\n--header-button-text-400: 51 51 51;\n--header-button-text-500: 0 0 0;\n--header-button-text-600: 0 0 0;\n--header-button-text-700: 0 0 0;\n--header-button-text-800: 0 0 0;\n--header-button-text-900: 0 0 0;\n }\n 2f:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n30:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n31:{\"display\":\"inline-block\"}\n32:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\n15:[\"$\",\"html\",null,{\"suppressHydrationWarning\":true,\"lang\":\"en\",\"className\":\"scroll-pt-[76px] plain-background\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"link\",null,{\"rel\":\"privacy-policy\",\"href\":\"https://objectbox.io/wordpress/wp-content/uploads/2022/08/Object-Box-Privacy-Notice.pdf\"}],[\"$\",\"style\",null,{\"nonce\":\"$undefined\",\"children\":\"$2b\"}]]}],[\"$\",\"body\",null,{\"className\":\"__variable_274faa __variable_a7f53a __variable_e782a9 __className_053b0a __variable_0e9704 bg-light dark:bg-dark\",\"children\":[\"$\",\"$L2c\",null,{\"assetsURL\":\"https://ka-p.fontawesome.com/releases/v6.6.0/\",\"assetsURLToken\":\"a463935e93\",\"assetsByStyles\":{\"custom-icons\":{\"assetsURL\":\"/~gitbook/static/icons\"}},\"iconStyle\":\"regular\",\"children\":[\"$\",\"$L2d\",null,{\"language\":{\"locale\":\"en\",\"powered_by_gitbook\":\"Powered by GitBook\",\"sponsored_via_gitbook\":\"Sponsored via GitBook\",\"switch_to_dark_theme\":\"Switch to dark theme\",\"switch_to_light_theme\":\"Switch to light theme\",\"switch_to_system_theme\":\"Switch to system theme\",\"search\":\"Search\",\"search_or_ask\":\"Ask or Search\",\"search_input_placeholder\":\"Search content\",\"search_ask_input_placeholder\":\"Search content or ask a question\",\"search_no_results\":\"No results for \\\"${1}\\\".\",\"search_scope_space\":\"$${1}\",\"search_scope_all\":\"All content\",\"search_ask\":\"Ask \\\"${1}\\\"\",\"search_ask_sources\":\"Sources\",\"search_ask_sources_no_answer\":\"Related pages\",\"search_ask_no_answer\":\"An answer could not be found for your question. You could try rephrasing it, or be more specific.\",\"search_ask_error\":\"Something went wrong. Please try again later.\",\"on_this_page\":\"On this page\",\"next_page\":\"Next\",\"previous_page\":\"Previous\",\"page_last_modified\":\"Last updated ${1}\",\"was_this_helpful\":\"Was this helpful?\",\"was_this_helpful_positive\":\"Yes, it was!\",\"was_this_helpful_neutral\":\"Not sure\",\"was_this_helpful_negative\":\"No\",\"was_this_helpful_thank_you\":\"Thank you!\",\"annotation_button_label\":\"Open annotation\",\"code_copied\":\"Copied!\",\"code_copy\":\"Copy\",\"table_of_contents_button_label\":\"Open table of contents\",\"cookies_title\":\"Cookies\",\"cookies_prompt\":\"This site uses cookies to deliver its service and to analyse traffic. By browsing this site, you accept the ${1}.\",\"cookies_prompt_privacy\":\"privacy policy\",\"cookies_accept\":\"Accept\",\"cookies_reject\":\"Reject\",\"cookies_close\":\"Close\",\"edit_on_git\":\"Edit on ${1}\",\"notfound_title\":\"Page not found\",\"notfound\":\"The page you are looking for doesn't exist.\",\"unexpected_error_title\":\"An error occurred\",\"unexpected_error\":\"Sorry, an unexpected error has occurred. Please try again later.\",\"unexpected_error_retry\":\"Retry\",\"pdf_download\":\"Export as PDF\",\"pdf_goback\":\"Go back to content\",\"pdf_print\":\"Print or Save as PDF\",\"pdf_page_of\":\"$${1} of ${2}\",\"pdf_mode_only_page\":\"Only this page\",\"pdf_mode_all\":\"All pages\",\"pdf_limit_reached\":\"Couldn't generate the PDF for ${1} pages, generation stopped at ${2}.\",\"pdf_limit_reached_continue\":\"Extend with ${1} more pages.\",\"more\":\"More\"},\"children\":[\"$\",\"$L10\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(site)\",\"children\"],\"error\":\"$2e\",\"errorStyles\":[],\"errorScripts\":[],\"template\":[\"$\",\"$L12\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$2f\",\"children\""])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$30\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$31\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$32\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]}]]}]\n1f:[\"$\",\"div\",null,{\"className\":\"headerLinks_containerHeaderlinks__GUgiv flex justify-end items-center gap-x-2.5 mr-2.5 lg:gap-x-5 lg:mr-2.5 *:max-w-56 z-20\",\"children\":[[\"$L33\",\"$L34\",\"$L35\",\"$L36\"],[\"$\",\"div\",null,{\"className\":\"headerLinks_linkEllipsis__Z01IN items-center z-20\",\"children\":[\"$\",\"div\",null,{\"className\":\"group/dropdown relative flex\",\"children\":[[\"$\",\"button\",null,{\"className\":\"px-1 text-dark/8 dark:text-light/8 dark:hover:text-light hover:text-header-link-400\",\"children\":[[\"$\",\"span\",null,{\"className\":\"sr-only\",\"children\":\"More\"}],[\"$\",\"$L28\",null,{\"icon\":\"ellipsis\",\"className\":\"opacity-6 size-3 ms-1\"}]]}],[\"$\",\"div\",null,{\"tabIndex\":-1,\"role\":\"menu\",\"aria-orientation\":\"vertical\",\"aria-labelledby\":\":S1:\",\"className\":\"w-52 max-h-56 flex absolute top-full left-0 z-20 origin-top-left invisible transition-opacity duration-1000 group-hover/dropdown:visible group-focus-within/dropdown:visible -translate-x-48 md:translate-x-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"mt-2 w-full bg-light rounded-lg straight-corners:rounded-sm p-2 shadow-1xs overflow-auto ring-1 ring-dark/1 ring-opacity-8 focus:outline-none dark:bg-dark dark:ring-light/2\",\"children\":[\"$\",\"div\",null,{\"className\":\"flex flex-col gap-1\",\"children\":[\"$L37\",\"$L38\",\"$L39\",\"$L3a\"]}]}]}]]}]}]]}]\n24:[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L1c\",null,{\"href\":\"https://objectbox.io/docfiles/swift/current/\",\"className\":\"flex justify-start items-center gap-3 pl-5 pr-1.5 py-1.5 text-sm transition-colors duration-100 text-dark/8 rounded-md straight-corners:rounded-none dark:text-light/7 font-normal hover:bg-dark/1 dark:hover:bg-light/2\",\"children\":[\"$undefined\",\"Swift API Docs\",[\"$\",\"$L28\",null,{\"icon\":\"arrow-up-right-from-square\",\"className\":\"size-3 mr-1 mt-1 place-self-start shrink-0 text-current transition-colors [\u0026\u003epath]:transition-[opacity] [\u0026\u003epath]:[opacity:0.40] group-hover:[\u0026\u003epath]:[opacity:1]\"}]]}]}]\n25:[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L1c\",null,{\"href\":\"https://objectbox.io/sync/\",\"className\":\"flex justify-start items-center gap-3 pl-5 pr-1.5 py-1.5 text-sm transition-colors duration-100 text-dark/8 rounded-md straight-corners:rounded-none dark:text-light/7 font-normal hover:bg-dark/1 dark:hover:bg-light/2\",\"children\":[\"$undefined\",\"Data Sync\",[\"$\",\"$L28\",null,{\"icon\":\"arrow-up-right-from-square\",\"className\":\"size-3 mr-1 mt-1 place-self-start shrink-0 text-current transition-colors [\u0026\u003epath]:transition-[opacity] [\u0026\u003epath]:[opacity:0.40] group-hover:[\u0026\u003epath]:[opacity:1]\"}]]}]}]\n26:[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L1c\",null,{\"href\":\"https://docs.objectbox.io/\",\"className\":\"flex justify-start items-center gap-3 pl-5 pr-1.5 py-1.5 text-sm transition-colors duration-100 text-dark/8 rounded-md straight-corners:rounded-none dark:text-light/7 font-normal hover:bg-dark/1 dark:hover:bg-light/2\",\"children\":[\"$undefined\",\"Android Database\",[\"$\",\"$L28\",null,{\"icon\":\"arrow-up-right-from-square\",\"className\":\"size-3 mr-1 mt-1 place-self-start shrink-0 text-current transition-colors [\u0026\u003epath]:transition-[opacity] [\u0026\u003epath]:[opacity:0.40] group-hover:[\u0026\u003epath]:[opacity:1]\"}]]}]}]\n27:[\"$\",\"li\",null,{\"className\":\"flex flex-col\",\"children\":[\"$\",\"$L1c\",null,{\"href\":\"https://pub.dev/packages/objectbox\",\"className\":\"flex justify-start items-center gap-3 pl-5 pr-1.5 py-1.5 text-sm transition-colors duration-100 text-dark/8 rounded-md straight-corners:rounded-none dark:text-light/7 font-normal hover:bg-dark/1 dark:hover:bg-light/2\",\"children\":[\"$undefined\",\"Flutter Datab"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"ase\",[\"$\",\"$L28\",null,{\"icon\":\"arrow-up-right-from-square\",\"className\":\"size-3 mr-1 mt-1 place-self-start shrink-0 text-current transition-colors [\u0026\u003epath]:transition-[opacity] [\u0026\u003epath]:[opacity:0.40] group-hover:[\u0026\u003epath]:[opacity:1]\"}]]}]}]\n33:[\"$\",\"$L1c\",null,{\"href\":\"https://objectbox.io/\",\"className\":\"overflow-hidden text-sm lg:text-base flex flex-row items-center whitespace-nowrap hover:text-header-link-400 dark:hover:text-light text-dark/8 dark:text-light/8\",\"children\":[[\"$\",\"span\",null,{\"className\":\"truncate\",\"children\":\"objectbox.io\"}],null]}]\n34:[\"$\",\"$L1c\",null,{\"href\":\"https://objectbox.io/blog/\",\"className\":\"overflow-hidden text-sm lg:text-base flex flex-row items-center whitespace-nowrap hover:text-header-link-400 dark:hover:text-light text-dark/8 dark:text-light/8\",\"children\":[[\"$\",\"span\",null,{\"className\":\"truncate\",\"children\":\"Blog\"}],null]}]\n35:[\"$\",\"$L1c\",null,{\"href\":\"https://twitter.com/ObjectBox_io\",\"className\":\"overflow-hidden text-sm lg:text-base flex flex-row items-center whitespace-nowrap hover:text-header-link-400 dark:hover:text-light text-dark/8 dark:text-light/8\",\"children\":[[\"$\",\"span\",null,{\"className\":\"truncate\",\"children\":\"Twitter\"}],null]}]\n36:[\"$\",\"$L1c\",null,{\"href\":\"https://github.com/objectbox/objectbox-swift\",\"className\":\"overflow-hidden text-sm lg:text-base flex flex-row items-center whitespace-nowrap hover:text-header-link-400 dark:hover:text-light text-dark/8 dark:text-light/8\",\"children\":[[\"$\",\"span\",null,{\"className\":\"truncate\",\"children\":\"GitHub\"}],null]}]\n37:[\"$\",\"$L1c\",null,{\"href\":\"https://objectbox.io/\",\"prefetch\":false,\"className\":\"flex flex-row items-center text-sm px-3 py-1 rounded straight-corners:rounded-sm hover:bg-dark/2 dark:hover:bg-light/2\",\"children\":\"objectbox.io\"}]\n38:[\"$\",\"$L1c\",null,{\"href\":\"https://objectbox.io/blog/\",\"prefetch\":false,\"className\":\"flex flex-row items-center text-sm px-3 py-1 rounded straight-corners:rounded-sm hover:bg-dark/2 dark:hover:bg-light/2\",\"children\":\"Blog\"}]\n39:[\"$\",\"$L1c\",null,{\"href\":\"https://twitter.com/ObjectBox_io\",\"prefetch\":false,\"className\":\"flex flex-row items-center text-sm px-3 py-1 rounded straight-corners:rounded-sm hover:bg-dark/2 dark:hover:bg-light/2\",\"children\":\"Twitter\"}]\n3a:[\"$\",\"$L1c\",null,{\"href\":\"https://github.com/objectbox/objectbox-swift\",\"prefetch\":false,\"className\":\"flex flex-row items-center text-sm px-3 py-1 rounded straight-corners:rounded-sm hover:bg-dark/2 dark:hover:bg-light/2\",\"children\":\"GitHub\"}]\n3b:T46f,https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia\u0026width=32\u0026dpr=1\u0026quality=100\u0026sign=6fa18374\u0026sv=1 32w, https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia\u0026width=32\u0026dpr=2\u0026quality=100\u0026sign=6fa18374\u0026sv=1 64w, https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia\u0026width=32\u0026dpr=3\u0026quality=100\u0026sign=6fa18374\u0026sv=1 96w, https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia\u0026width=32\u0026dpr=4\u0026quality=100\u0026sign=6fa18374\u0026sv=1 128w1d:[\"$\",\"img\",null,{\"alt\":\"\",\"style\":{\"aspectRatio\":\"1\"},\"loading\":\"$undefined\",\"fetchPriority\":\"high\",\"className\":\"block dark:hidden object-contain size-8\",\"src\":\"https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia\u0026width=32\u0026dpr=4\u0026quality=100\u0026sign=6fa18374\u0026sv=1\",\"srcSet\":\"$3b\",\"sizes\":\"32px\",\"width\":256,\"h"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"eight\":256}]\n3c:T46f,https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia\u0026width=32\u0026dpr=1\u0026quality=100\u0026sign=6fa18374\u0026sv=1 32w, https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia\u0026width=32\u0026dpr=2\u0026quality=100\u0026sign=6fa18374\u0026sv=1 64w, https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia\u0026width=32\u0026dpr=3\u0026quality=100\u0026sign=6fa18374\u0026sv=1 96w, https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia\u0026width=32\u0026dpr=4\u0026quality=100\u0026sign=6fa18374\u0026sv=1 128w1e:[\"$\",\"img\",null,{\"alt\":\"\",\"style\":{\"aspectRatio\":\"1\"},\"loading\":\"lazy\",\"fetchPriority\":\"high\",\"className\":\"hidden dark:block object-contain size-8\",\"src\":\"https://swift.objectbox.io/~gitbook/image?url=https%3A%2F%2F2249461369-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fspaces%252F-LR7sVOoZyL01-NkNVQJ%252Favatar.png%3Fgeneration%3D1542042291053653%26alt%3Dmedia\u0026width=32\u0026dpr=4\u0026quality=100\u0026sign=6fa18374\u0026sv=1\",\"srcSet\":\"$3c\",\"sizes\":\"32px\",\"width\":256,\"height\":256}]\n3e:I[92083,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"9505\",\"static/chunks/9505-a8f112b566ef7f41.js\",\"6150\",\"static/chunks/6150-57a79db9099e4be8.js\",\"8510\",\"static/chunks/8510-2f41b25832a6d317.js\",\"2286\",\"static/chunks/2286-91dc9ed7c6acaf3a.js\",\"1285\",\"static/chunks/1285-2b0f91300e0c0b9a.js\",\"9028\",\"static/chunks/9028-bdf215f649fe02e9.js\",\"4848\",\"static/chunks/app/(site)/(content)/%5B%5B...pathname%5D%5D/page-c1425cfd4f268718.js\"],\"PageFeedbackForm\"]\n3f:I[2554,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"9505\",\"static/chunks/9505-a8f112b566ef7f41.js\",\"6150\",\"static/chunks/6150-57a79db9099e4be8.js\",\"8510\",\"static/chunks/8510-2f41b25832a6d317.js\",\"2286\",\"static/chunks/2286-91dc9ed7c6acaf3a.js\",\"1285\",\"static/chunks/1285-2b0f91300e0c0b9a.js\",\"9028\",\"static/chunks/9028-bdf215f649fe02e9.js\",\"4848\",\"static/chunks/app/(site)/(content)/%5B%5B...pathname%5D%5D/page-c1425cfd4f268718.js\"],\"Ad\"]\n40:I[46451,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"9505\",\"static/chunks/9505-a8f112b566ef7f41.js\",\"6150\",\"static/chunks/6150-57a79db9099e4be8.js\",\"8510\",\"static/chunks/8510-2f41b25832a6d317.js\",\"2286\",\"static/chunks/2286-91dc9ed7c6acaf3a.js\",\"1285\",\"static/chunks/1285-2b0f91300e0c0b9a.js\",\"9028\",\"static/chunks/9028-bdf215f649fe02e9.js\",\"4848\",\"static/chunks/app/(site)/(content)/%5B%5B...pathname%5D%5D/page-c1425cfd4f268718.js\"],\"PreservePageLayout\"]\n41:\"$Sreact.fragment\"\n48:I[66819,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"4012\",\"static/chunks/4012-d5519c7c19347ff0.js\",\"7457\",\"static/chunks/app/(site)/layout-512d7fc9258aa558.js\"],\"DateRelative\"]\n49:I[70155,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"9505\",\"static/chunks/9505-a8f112b566ef7f41.js\",\"6150\",\"static/chunks/6150-57a79db9099e4be8.js\",\"8510\",\"static/chunks/8510-2f41b25832a6d317.js\",\"2286\",\"static/chunks/2286-91dc9ed7c6acaf3a.js\",\"1285\",\"static/chunks/1285-2b0f91300e0c0b9a.js\",\"9028\",\"static/chunks/9028-bdf215f649fe02e9.js\",\"4848\",\"static/c"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"hunks/app/(site)/(content)/%5B%5B...pathname%5D%5D/page-c1425cfd4f268718.js\"],\"TrackPageView\"]\n4a:I[50004,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"9505\",\"static/chunks/9505-a8f112b566ef7f41.js\",\"6150\",\"static/chunks/6150-57a79db9099e4be8.js\",\"8510\",\"static/chunks/8510-2f41b25832a6d317.js\",\"2286\",\"static/chunks/2286-91dc9ed7c6acaf3a.js\",\"1285\",\"static/chunks/1285-2b0f91300e0c0b9a.js\",\"9028\",\"static/chunks/9028-bdf215f649fe02e9.js\",\"4848\",\"static/chunks/app/(site)/(content)/%5B%5B...pathname%5D%5D/page-c1425cfd4f268718.js\"],\"PageClientLayout\"]\nf:[null,[\"$\",\"div\",null,{\"className\":\"flex flex-row-reverse justify-end\",\"children\":[[\"$\",\"aside\",null,{\"className\":\"group/aside hidden xl:flex flex-col basis-56 grow-0 shrink-0 sticky py-8 break-anywhere lg:h-full h-[100vh] page-api-block:xl:max-2xl:z-[1] page-api-block:xl:max-2xl:backdrop-blur-md page-api-block:xl:max-2xl:fixed page-api-block:xl:max-2xl:right-8 page-api-block:xl:max-2xl:w-56 page-api-block:xl:max-2xl:bg-light-2/9 page-api-block:xl:max-2xl:rounded page-api-block:xl:max-2xl:h-auto page-api-block:xl:max-2xl:py-0 page-api-block:xl:max-2xl:mt-3 dark:page-api-block:xl:max-2xl:bg-dark-2/8 lg:max-h-[calc(100vh_-_4rem)] top-16 page-api-block:xl:max-2xl:top-16\",\"children\":[[\"$\",\"div\",null,{\"className\":\"hidden page-api-block:xl:max-2xl:flex flex-row items-center gap-3 text-sm font-semibold px-2 py-2\",\"children\":[[\"$\",\"$L28\",null,{\"icon\":\"bars\",\"className\":\"size-3\"}],\"On this page\"]}],[\"$\",\"div\",null,{\"className\":\"overflow-auto flex-1 flex flex-col gap-4 [\u0026::-webkit-scrollbar]:bg-transparent [\u0026::-webkit-scrollbar-thumb]:bg-transparent page-api-block:xl:max-2xl:hidden page-api-block:xl:max-2xl:group-hover/aside:flex\",\"children\":[[\"$\",\"$20\",null,{\"fallback\":null,\"children\":\"$L3d\"}],[\"$\",\"div\",null,{\"className\":\"flex flex-col gap-3 page-api-block:xl:max-2xl:px-3\",\"children\":[[\"$\",\"$20\",null,{\"fallback\":null,\"children\":[\"$\",\"$L3e\",null,{\"pageId\":\"-LRIJnzhhl3cynIFNMlD\",\"className\":\"mt-2\"}]}],null,[\"$\",\"div\",null,{\"children\":[\"$\",\"a\",null,{\"href\":\"/~gitbook/pdf?page=-LRIJnzhhl3cynIFNMlD\u0026only=yes\",\"className\":\"flex flex-row items-center text-sm text-dark/6 hover:text-primary py-2 dark:text-light/5\",\"children\":[[\"$\",\"$L28\",null,{\"icon\":\"file-pdf\",\"className\":\"size-4 mr-1.5\"}],\"Export as PDF\"]}]}]]}]]}],[\"$\",\"$L3f\",null,{\"zoneId\":null,\"placement\":\"page.aside\",\"spaceId\":\"-LR7sVOoZyL01-NkNVQJ\",\"siteAdsStatus\":\"$undefined\",\"ignore\":false,\"style\":\"mt-4\"}]]}],[[\"$\",\"main\",null,{\"className\":\"flex-1 relative py-8 lg:px-12 break-anywhere page-api-block:xl:max-2xl:pr-0 page-api-block:max-w-[1654px] page-api-block:mx-auto\",\"children\":[[\"$\",\"$L40\",null,{\"asFullWidth\":false}],null,[\"$\",\"header\",null,{\"className\":\"max-w-3xl mx-auto mb-6 space-y-3 page-api-block:ml-0\",\"children\":[[\"$\",\"h1\",null,{\"className\":\"text-4xl font-bold flex items-center gap-4\",\"children\":[\"$undefined\",\"Transactions\"]}],[\"$\",\"p\",null,{\"className\":\"text-lg text-dark-4 dark:text-light-4\",\"children\":\"ObjectBox for Swift is a fully transactional NoSQL database and ACID compliant. Learn here how database transactions work. Also, how does multiversion concurrency work?\"}]]}],[\"$\",\"$20\",null,{\"fallback\":[\"$\",\"div\",null,{\"className\":\"flex flex-col gap-4\",\"children\":[[\"$\",\"div\",null,{\"id\":\"what-are-objectbox-transactions\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[47px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [backg"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"round-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"explicit-transactions\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[47px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"classNa"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"me\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"skeleton-paragraph\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md [height:calc(15rem-1px)] [max-width:calc(48rem-1px)] w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_48px_48px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"skeleton-paragraph\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md [height:calc(15rem-1px)] [max-width:calc(48rem-1px)] w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_ca"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"lc(50%+1px)_calc(0%+47px)_/_48px_48px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"transaction-costs\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[47px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradie"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"nt-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"skeleton-paragraph\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md [height:calc(15rem-1px)] [max-width:calc(48rem-1px)] w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_48px_48px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"skeleton-paragraph\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md [height:calc(15rem-1px)] [max-width:calc(48rem-1px)] w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_48px_48px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"read-transactions\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflo"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"w-hidden relative grid dark:ring-light/1 rounded-md h-[47px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"multiversion-concurrency\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[47px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"locking-inside-a-write-transaction\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[47px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}]]}],\"children\":[\"$\",\"div\",null,{\"className\":\"[\u0026\u003e*+*]:mt-5 grid whitespace-pre-wrap\",\"children\":[[\"$\",\"h2\",null,{\"id\":\"what-are-objectbox-transactions\",\"className\":\"text-3xl font-semibold group relative grid w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[\"$\",\"div\",null,{\"className\":\"grid grid-area-1-1 relative -ml-6 w-7 border-0 opacity-0 group-hover:opacity-[0] group-focus:opacity-[0] md:group-hover:md:opacity-[1] md:group-focus:md:opacity-[1] mt-[1em]\",\"children\":[\"$\",\"a\",null,{\"href\":\"#what-are-objectbox-transactions\",\"aria-label\":\"Direct link to heading\",\"className\":\"inline-flex h-full items-start dark:text-light/3 dark:shadow-none dark:ring-0 leading-tight\",\"children\":[\"$\",\"$L28\",null,{\"icon\":\"hashtag\",\"className\":\"w-3.5 h-[1lh] transition-colors text-transparent group-hover:text-dark/6 dark:group-hover:text-light/5 lg:w-4\"}]}]}],[\"$\",\"div\",null,{\"className\":\"grid-area-1-1"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1," z-[1] mt-[1em]\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"What are ObjectBox Transactions?\"}]]]}]]}],[\"$\",\"p\",null,{\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"A database transaction groups several operations into a single unit of work that either executes completely or not at all. If you are looking for a more detailed introduction to transactions in general, check out this Wikipedia article on \"}]],\"$L42\",[[\"$\",\"$41\",\"0\",{\"children\":\".\"}]]]}],[\"$\",\"p\",null,{\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"You may not notice it, but almost all interactions with ObjectBox involve transactions. For example, if you call \"}],[\"$\",\"$41\",\"1\",{\"children\":[\"$\",\"code\",null,{\"className\":\"py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]\",\"children\":\"put\"}]}],[\"$\",\"$41\",\"2\",{\"children\":\" a write transaction is used. Also if you \"}],[\"$\",\"$41\",\"3\",{\"children\":[\"$\",\"code\",null,{\"className\":\"py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]\",\"children\":\"get\"}]}],[\"$\",\"$41\",\"4\",{\"children\":\" an object or query for objects, a read transaction is used. All of this is done under the hood and transparent to you. It may be fine to completely ignore transactions in your app without running into any problems. With more complex apps however, it’s usually worth learning transaction basics to make your app more consistent and efficient.\"}]]]}],[\"$\",\"h2\",null,{\"id\":\"explicit-transactions\",\"className\":\"text-3xl font-semibold group relative grid w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[\"$\",\"div\",null,{\"className\":\"grid grid-area-1-1 relative -ml-6 w-7 border-0 opacity-0 group-hover:opacity-[0] group-focus:opacity-[0] md:group-hover:md:opacity-[1] md:group-focus:md:opacity-[1] mt-[1em]\",\"children\":[\"$\",\"a\",null,{\"href\":\"#explicit-transactions\",\"aria-label\":\"Direct link to heading\",\"className\":\"inline-flex h-full items-start dark:text-light/3 dark:shadow-none dark:ring-0 leading-tight\",\"children\":[\"$\",\"$L28\",null,{\"icon\":\"hashtag\",\"className\":\"w-3.5 h-[1lh] transition-colors text-transparent group-hover:text-dark/6 dark:group-hover:text-light/5 lg:w-4\"}]}]}],[\"$\",\"div\",null,{\"className\":\"grid-area-1-1 z-[1] mt-[1em]\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"Explicit transactions\"}]]]}]]}],[\"$\",\"p\",null,{\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"All ObjectBox operations run in implicit transactions – unless an explicit transaction is in progress. In the latter case, multiple operations share the (explicit) transaction. In other words, with explicit transactions you control the transaction boundary. Doing so can greatly improve efficiency and consistency in your app.\"}]]]}],[\"$\",\"p\",null,{\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"The class \"}]],\"$L43\",[[\"$\",\"$41\",\"0\",{\"children\":\" offers the following methods to perform explicit transactions:\"}]]]}],[\"$\",\"ul\",null,{\"className\":\"space-y-2 w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[\"$\",\"li\",null,{\"className\":\"leading-normal flex items-start\",\"children\":[[\"$\",\"div\",null,{\"className\":\"text-base leading-normal flex items-center justify-center mr-1 min-h-[1lh] min-w-6 text-dark/6 dark:text-light/5\",\"children\":[\"$\",\"div\",null,{\"className\":\"before:font-var before:content-[--pseudoBefore--content]\",\"style\":{\"--pseudoBefore--content\":\"'•'\",\"--font-family\":\"Arial\",\"fontSize\":\"min(1.5em, 24px)\",\"lineHeight\":1}}]}],[\"$\",\"div\",null,{\"className\":\"space-y-2 flex "])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"flex-col flex-1\",\"children\":[[\"$\",\"p\",null,{\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl min-h-[1lh] flip-heading-hash [\u0026:is(h2)\u003ediv]:mt-0 [\u0026:is(h3)\u003ediv]:mt-0 [\u0026:is(h4)\u003ediv]:mt-0\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":[\"$\",\"code\",null,{\"className\":\"py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]\",\"children\":\"runInTransaction\"}]}],[\"$\",\"$41\",\"1\",{\"children\":[\"$\",\"strong\",null,{\"className\":\"font-bold\",\"children\":\":\"}]}],[\"$\",\"$41\",\"2\",{\"children\":\" Runs the given closure inside a transaction (comes in result-forwarding and/or throwing variants).\"}]]]}]]}]]}],[\"$\",\"li\",null,{\"className\":\"leading-normal flex items-start\",\"children\":[[\"$\",\"div\",null,{\"className\":\"text-base leading-normal flex items-center justify-center mr-1 min-h-[1lh] min-w-6 text-dark/6 dark:text-light/5\",\"children\":[\"$\",\"div\",null,{\"className\":\"before:font-var before:content-[--pseudoBefore--content]\",\"style\":{\"--pseudoBefore--content\":\"'•'\",\"--font-family\":\"Arial\",\"fontSize\":\"min(1.5em, 24px)\",\"lineHeight\":1}}]}],[\"$\",\"div\",null,{\"className\":\"space-y-2 flex flex-col flex-1\",\"children\":[[\"$\",\"p\",null,{\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl min-h-[1lh] flip-heading-hash [\u0026:is(h2)\u003ediv]:mt-0 [\u0026:is(h3)\u003ediv]:mt-0 [\u0026:is(h4)\u003ediv]:mt-0\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":[\"$\",\"code\",null,{\"className\":\"py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]\",\"children\":\"runInReadOnlyTransaction\"}]}],[\"$\",\"$41\",\"1\",{\"children\":[\"$\",\"strong\",null,{\"className\":\"font-bold\",\"children\":\":\"}]}],[\"$\",\"$41\",\"2\",{\"children\":\" Runs the given closure inside a read(-only) transaction. Unlike write transactions, multiple read transactions can run at the same time.\"}]]]}]]}]]}]]}],[\"$\",\"p\",null,{\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"The advantage of explicit transactions over the bulk put operations is that you can perform any number of operations and use objects of multiple boxes. In addition, you get a consistent (transactional) view on your data while the transaction is in progress.\"}]]]}],[\"$\",\"p\",null,{\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"Example for a write transaction:\"}]]]}],\"$L44\",[\"$\",\"$20\",null,{\"fallback\":[\"$\",\"div\",null,{\"id\":\"transaction-costs\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[47px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],\"children\":[\"$\",\"h2\",null,{\"id\":\"transaction-costs\",\"className\":\"text-3xl font-semibold group relative grid w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[\"$\",\"div\",null,{\"className\":\"grid grid-area-1-1 relative -ml-6 w-7 border-0 opacity-0 group-hover:opacity-[0] group-focus:opacity-[0] md:group-hover:md:opacity-[1] md:group-focus:md:opacity-[1] mt-[1em]\",\"children\":[\"$\",\"a\",null,{\"href\":\"#transaction-costs\",\"aria-label\":\"Direct link to h"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"eading\",\"className\":\"inline-flex h-full items-start dark:text-light/3 dark:shadow-none dark:ring-0 leading-tight\",\"children\":[\"$\",\"$L28\",null,{\"icon\":\"hashtag\",\"className\":\"w-3.5 h-[1lh] transition-colors text-transparent group-hover:text-dark/6 dark:group-hover:text-light/5 lg:w-4\"}]}]}],[\"$\",\"div\",null,{\"className\":\"grid-area-1-1 z-[1] mt-[1em]\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"Transaction Costs\"}]]]}]]}]}],[\"$\",\"$20\",null,{\"fallback\":[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],\"children\":[\"$\",\"p\",null,{\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"Understanding transactions is essential to master database performance. If you just remember one sentence on this topic, it should be this one: a write transaction has its price.\"}]]]}]}],[\"$\",\"$20\",null,{\"fallback\":[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],\"children\":[\"$\",\"p\",null,{\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"Committing a transaction involves syncing data to the physical storage, which is a relatively expensive operation for databases. Only when the file system confirms that all data has been stored in a durable manner (not just memory cached), the transaction can be considered successful. This file sync required by a transaction may take a couple of milliseconds. Keep this in mind and try to group several operations (e.g.\"}],[\"$\",\"$41\",\"1\",{\"children\":[\"$\",\"code\",null,{\"className\":\"py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]\",\"children\":\"put\"}]}],[\"$\",\"$41\",\"2\",{\"children\":\"calls) in one transaction.\"}]]]}]}],[\"$\",\"$20\",null,{\"fallback\":[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],\"children\":[\"$\",\"p\",null,{\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"Consider this example:\"}]]]}]}],[\"$\",\"$20\",null,{\"fallback\":[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"skeleton-paragraph\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md [height:calc(15rem-1px)] [max-width:calc(48rem-1px)] w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_48px_48px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],\"children\":\"$L45\"}],[\"$\",\"$20\",null,{\"fallback\":[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],\"children\":[\"$\",\"p\",null,{\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"Do you see what’s wrong with that code? There is an implicit transaction for each user which is very inefficient especially for a high number of objects. It is much more efficient to use of of the put overloads to store all users at once:\"}]]]}]}],[\"$\",\"$20\",null,{\"fallback\":[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"skeleton-paragraph\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md [height:calc(15rem-1px)] [max-width:calc(48rem-1px)] w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_48px_48px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],\"children\":\"$L46\"}],[\"$\",\"$20\",null,{\"fallback\":[\"$\",\"div\",n"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"ull,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],\"children\":[\"$\",\"p\",null,{\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"Much better! If you have 1,000 users, the latter example uses a single transaction to store all users. The first code example uses 1,000 (!) implicit transactions causing a massive slow down.\"}]]]}]}],[\"$\",\"$20\",null,{\"fallback\":[\"$\",\"div\",null,{\"id\":\"read-transactions\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[47px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],\"children\":[\"$\",\"h2\",null,{\"id\":\"read-transactions\",\"className\":\"text-3xl font-semibold group relative grid w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[\"$\",\"div\",null,{\"className\":\"grid grid-area-1-1 relative -ml-6 w-7 border-0 opacity-0 group-hover:opacity-[0] group-focus:opacity-[0] md:group-hover:md:opacity-[1] md:group-focus:md:opacity-[1] mt-[1em]\",\"children\":[\"$\",\"a\",null,{\"href\":\"#read-transactions\",\"aria-label\":\"Direct link to heading\",\"className\":\"inline-flex h-full items-start dark:text-light/3 dark:shadow-none dark:ring-0 leading-tight\",\"children\":[\"$\",\"$L28\",null,{\"icon\":\"hashtag\",\"className\":\"w-3.5 h-[1lh] transition-colors text-transparent group-hover:text-dark/6 dark:group-hover:text-light/5 lg:w-4\"}]}]}],[\"$\",\"div\",null,{\"className\":\"grid-area-1-1 z-[1] mt-[1em]\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"Read Transactions\"}]]]}]]}]}],[\"$\",\"$20\",null,{\"fallback\":[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],\"childr"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"en\":[\"$\",\"p\",null,{\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"In ObjectBox, read transactions are cheap. In contrast to write transactions, there is no commit and thus no expensive sync to the file system. Operations like \"}],[\"$\",\"$41\",\"1\",{\"children\":[\"$\",\"code\",null,{\"className\":\"py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]\",\"children\":\"get\"}]}],[\"$\",\"$41\",\"2\",{\"children\":\" , \"}],[\"$\",\"$41\",\"3\",{\"children\":[\"$\",\"code\",null,{\"className\":\"py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]\",\"children\":\"count\"}]}],[\"$\",\"$41\",\"4\",{\"children\":\" , and queries run inside an implicit read transaction if they are not called when already inside an explicit transaction (read or write). Note that it is illegal to \"}],[\"$\",\"$41\",\"5\",{\"children\":[\"$\",\"code\",null,{\"className\":\"py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]\",\"children\":\"put\"}]}],[\"$\",\"$41\",\"6\",{\"children\":\" when inside a read transaction: an exception will be thrown.\"}]]]}]}],[\"$\",\"$20\",null,{\"fallback\":[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],\"children\":[\"$\",\"p\",null,{\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"While read transactions are much cheaper than write transactions, there is still some overhead to starting a read transaction. Thus, for a high number of reads (e.g. hundreds, in a loop), you can improve performance by grouping those reads in a single read transaction (see explicit transactions below).\"}]]]}]}],[\"$\",\"$20\",null,{\"fallback\":[\"$\",\"div\",null,{\"id\":\"multiversion-concurrency\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[47px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],\"children\":[\"$\",\"h2\",null,{\"id\":\"multiversion-concurrency\",\"className\":\"text-3xl font-semibold group rela"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"tive grid w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[\"$\",\"div\",null,{\"className\":\"grid grid-area-1-1 relative -ml-6 w-7 border-0 opacity-0 group-hover:opacity-[0] group-focus:opacity-[0] md:group-hover:md:opacity-[1] md:group-focus:md:opacity-[1] mt-[1em]\",\"children\":[\"$\",\"a\",null,{\"href\":\"#multiversion-concurrency\",\"aria-label\":\"Direct link to heading\",\"className\":\"inline-flex h-full items-start dark:text-light/3 dark:shadow-none dark:ring-0 leading-tight\",\"children\":[\"$\",\"$L28\",null,{\"icon\":\"hashtag\",\"className\":\"w-3.5 h-[1lh] transition-colors text-transparent group-hover:text-dark/6 dark:group-hover:text-light/5 lg:w-4\"}]}]}],[\"$\",\"div\",null,{\"className\":\"grid-area-1-1 z-[1] mt-[1em]\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"Multiversion concurrency\"}]]]}]]}]}],[\"$\",\"$20\",null,{\"fallback\":[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],\"children\":[\"$\",\"p\",null,{\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"ObjectBox gives developers \"}]],\"$L47\",[[\"$\",\"$41\",\"0\",{\"children\":\" semantics. This allows multiple concurrent readers (read transactions) which can execute immediately without blocking or waiting. This is guaranteed by storing multiple versions of (committed) data. Even if a write transaction is in progress, a read transaction can read the last consistent state immediately. Write transactions are executed sequentially to ensure a consistent state. Thus, it is advised to keep write transactions short to avoid blocking other pending write transactions. For example, it is usually a bad idea to do networking or complex calculations while inside a write transaction. Instead, do any expensive operation and prepare objects before entering a write transaction.\"}]]]}]}],[\"$\",\"$20\",null,{\"fallback\":[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],\"children\":[\"$\",\"p\",null,{\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"Note that you do not have to worry about making write transactions sequential yourself. If multiple threads want to write at the same time (e.g. via \"}],[\"$\",\"$41\",\"1\",{\"children\":[\"$\",\"code\",null,{\"className\":\"py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]\",\"children\":\"put\"}]}],[\"$\",\"$41\",\"2\",{\"children\":\" or \"}],[\"$\",\"$41\",\"3\",{\"children\":[\"$\",\"code\",null,{\"className\":\"py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]\",\"children\":\"runInTransaction\"}]}],[\"$\",\"$41\",\"4\",{\"children\":\"), one of the threads will be selected to go first, while the other threads have to wait. It works just like a lock.\"}]]]}]}],[\"$\",\"$20\",null,{\"fallback\":[\"$\",\"div\",null,{\"id\":\"locking-inside-a-write-transaction\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[47px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],\"children\":[\"$\",\"h3\",null,{\"id\":\"locking-inside-a-write-transaction\",\"className\":\"text-2xl font-semibold group relative grid w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[\"$\",\"div\",null,{\"className\":\"grid grid-area-1-1 relative -ml-6 w-7 border-0 opacity-0 group-hover:opacity-[0] group-focus:opacity-[0] md:group-hover:md:opacity-[1] md:group-focus:md:opacity-[1] mt-[0.75em]\",\"children\":[\"$\",\"a\",null,{\"href\":\"#locking-inside-a-write-transaction\",\"aria-label\":\"Direct link to heading\",\"className\":\"inline-flex h-full items-start dark:text-light/3 dark:shadow-none dark:ring-0 leading-snug\",\"children\":[\"$\",\"$L28\",null,{\"icon\":\"hashtag\",\"className\":\"w-3.5 h-[1lh] transition-colors text-transparent group-hover:text-dark/6 dark:group-hover:text-light/5 lg:w-4\"}]}]}],[\"$\",\"div\",null,{\"className\":\"grid-area-1-1 z-[1] mt-[0.75em]\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"Locking inside a Write Transaction\"}]]]}]]}]}],[\"$\",\"$20\",null,{\"fallback\":[\"$\",\"div\",null,{\"id\":\"$undefined\",\"role\":\"status\",\"aria-busy\":true,\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[\"$\",\"div\",null,{\"className\":\"ring-1 ring-dark/2 overflow-hidden relative grid dark:ring-light/1 rounded-md h-[35px] [max-width:calc(48rem-1px)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full bg-dark-4/4 dark:bg-light-3/1 grid grid-area-1-1 overflow-hidden [mask:conic-gradient(from_90deg_at_1px_1px,_#0000_90deg,_#0003_0)_calc(50%+1px)_calc(0%+47px)_/_12px_12px]\",\"children\":[\"$\",\"div\",null,{\"className\":\"aspect-square from-dark-4 to-transparent grid-area-1-1 relative origin-[50%_50%] top-[50%] self-stretch bg-transparent will-change-transform animate-[rotateLoop_2s_linear_infinite] [background-image:conic-gradient(from_-90deg_at_50%_50%,_var(--tw-gradient-stops)_0deg,_var(--tw-gradient-stops)_90deg,_var(--tw-gradient-stops)_280deg)] dark:from-light-4/6\"}]}]}]}],\"children\":[\"$\",\"p\",null,{\"className\":\"w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"Avoid locking (even implicitly by e.g. calling \"}],[\"$\",\"$41\",\"1\",{\"children\":[\"$\",\"code\",null,{\"className\":\"py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]\",\"ch"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"ildren\":\"DispatchQueue.sync\"}]}],[\"$\",\"$41\",\"2\",{\"children\":\"or explicitly using \"}],[\"$\",\"$41\",\"3\",{\"children\":[\"$\",\"code\",null,{\"className\":\"py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]\",\"children\":\"NSLock\"}]}],[\"$\",\"$41\",\"4\",{\"children\":\" or \"}],[\"$\",\"$41\",\"5\",{\"children\":[\"$\",\"code\",null,{\"className\":\"py-[1px] px-1.5 min-w-[1.625rem] inline-flex justify-center items-center ring-1 ring-inset ring-dark/1 bg-dark/[0.06] rounded text-dark/8 dark:ring-light/1 dark:bg-light/1 dark:text-light/7 text-[.875em] leading-[calc(max(1.20em,1.25rem))]\",\"children\":\"objc_sync_enter\"}]}],[\"$\",\"$41\",\"6\",{\"children\":\") when inside a write transaction when possible. Because write transactions run exclusively, they effectively acquire a write lock internally. As with all locks, you need to pay close attention when multiple locks are involved. Always obtain locks in the same order to avoid deadlocks. If you acquire a lock “X” inside a transaction, you must ensure that your code does not start another write transaction while having the lock “X”.\"}]]]}]}]]}]}],[\"$\",\"div\",null,{\"className\":\"flex flex-col md:flex-row mt-6 gap-2 max-w-3xl mx-auto page-api-block:ml-0\",\"children\":[[\"$\",\"$L1c\",null,{\"href\":\"/relations\",\"className\":\"group text-sm p-2.5 flex gap-4 flex-1 flex-row-reverse items-center pl-4 border border-dark/3 rounded straight-corners:rounded-none hover:border-primary/6 dark:border-light/2 text-pretty dark:hover:border-primary-300/4 md:p-4 md:text-base\",\"children\":[[\"$\",\"span\",null,{\"className\":\"flex flex-col flex-1 text-right\",\"children\":[[\"$\",\"span\",null,{\"className\":\"text-xs\",\"children\":\"Previous\"}],[\"$\",\"span\",null,{\"className\":\"text-dark dark:text-light/6 group-hover:text-primary line-clamp-2\",\"children\":\"Relations\"}]]}],[\"$\",\"$L28\",null,{\"icon\":\"chevron-left\",\"className\":\"hidden size-4 text-dark/5 group-hover:text-primary dark:text-light/4 md:block\"}]]}],[\"$\",\"$L1c\",null,{\"href\":\"/faq\",\"className\":\"group text-sm p-2.5 flex gap-4 flex-1 flex-row items-center pr-4 border border-dark/3 rounded straight-corners:rounded-none hover:border-primary/6 dark:border-light/2 text-pretty dark:hover:border-primary-300/4 md:p-4 md:text-base\",\"children\":[[\"$\",\"span\",null,{\"className\":\"flex flex-col flex-1\",\"children\":[[\"$\",\"span\",null,{\"className\":\"text-xs\",\"children\":\"Next\"}],[\"$\",\"span\",null,{\"className\":\"text-dark dark:text-light/6 group-hover:text-primary line-clamp-2\",\"children\":\"ObjectBox Swift FAQ\"}]]}],[\"$\",\"$L28\",null,{\"icon\":\"chevron-right\",\"className\":\"hidden size-4 text-dark/5 group-hover:text-primary dark:text-light/4 md:block\"}]]}]]}],[\"$\",\"div\",null,{\"className\":\"flex flex-row items-center mt-6 max-w-3xl mx-auto page-api-block:ml-0\",\"children\":[[\"$\",\"p\",null,{\"className\":\"flex-1 text-sm text-dark/6 dark:text-light/5\",\"children\":[[[\"$\",\"$41\",\"string-0\",{\"children\":\"Last updated \"}],[\"$\",\"$41\",\"arg-0\",{\"children\":[\"$\",\"$L48\",null,{\"value\":\"2024-07-29T10:44:15.181Z\"}]}]],\"\"]}],null]}]]}],[\"$\",\"$L49\",null,{\"sitePointer\":{\"siteId\":\"site_oiFw9\",\"spaceId\":\"-LR7sVOoZyL01-NkNVQJ\",\"siteSectionId\":\"$undefined\",\"siteSpaceId\":\"sitesp_VTGcb\",\"siteShareKey\":\"$undefined\",\"organizationId\":\"-LETrjVL2EKnHuIjYh8P\",\"revisionId\":\"$undefined\",\"changeRequestId\":\"$undefined\"},\"spaceId\":\"-LR7sVOoZyL01-NkNVQJ\",\"pageId\":\"-LRIJnzhhl3cynIFNMlD\",\"apiHost\":\"https://api.gitbook.com\"}]]]}],[\"$\",\"$20\",null,{\"fallback\":null,\"children\":[\"$\",\"$L4a\",null,{\"withSections\":false}]}]]\n16:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"name\":\"color-scheme\",\"content\":\"light\"}],[\"$\",\"meta\",\"2\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"3\",{\"children\":\"Transactions | ObjectBox Swift\"}],[\"$\",\"meta\",\"4\",{\"name\":\"description\",\"content\":\"ObjectBox for Swift is a fully transactional NoSQL database and ACID compliant. Learn here how database transactions work. Also, how does multiversion concurrency work?\"}],[\"$\",\"meta\",\"5\",{\"name\":\"g"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"enerator\",\"content\":\"GitBook (eab7931)\"}],[\"$\",\"meta\",\"6\",{\"name\":\"robots\",\"content\":\"index, follow\"}],[\"$\",\"link\",\"7\",{\"rel\":\"canonical\",\"href\":\"https://swift.objectbox.io/transactions\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:title\",\"content\":\"Transactions | ObjectBox Swift\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:description\",\"content\":\"ObjectBox for Swift is a fully transactional NoSQL database and ACID compliant. Learn here how database transactions work. Also, how does multiversion concurrency work?\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:image\",\"content\":\"https://swift.objectbox.io/~gitbook/ogimage/-LRIJnzhhl3cynIFNMlD\"}],[\"$\",\"meta\",\"11\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"12\",{\"name\":\"twitter:title\",\"content\":\"Transactions | ObjectBox Swift\"}],[\"$\",\"meta\",\"13\",{\"name\":\"twitter:description\",\"content\":\"ObjectBox for Swift is a fully transactional NoSQL database and ACID compliant. Learn here how database transactions work. Also, how does multiversion concurrency work?\"}],[\"$\",\"meta\",\"14\",{\"name\":\"twitter:image\",\"content\":\"https://swift.objectbox.io/~gitbook/ogimage/-LRIJnzhhl3cynIFNMlD\"}],[\"$\",\"link\",\"15\",{\"rel\":\"icon\",\"href\":\"https://2249461369-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/spaces%2F-LR7sVOoZyL01-NkNVQJ%2Favatar.png?generation=1542042291053653\u0026alt=media\",\"type\":\"image/png\",\"media\":\"(prefers-color-scheme: light)\"}],[\"$\",\"link\",\"16\",{\"rel\":\"icon\",\"href\":\"https://2249461369-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/spaces%2F-LR7sVOoZyL01-NkNVQJ%2Favatar.png?generation=1542042291053653\u0026alt=media\",\"type\":\"image/png\",\"media\":\"(prefers-color-scheme: dark)\"}],[\"$\",\"meta\",\"17\",{\"name\":\"next-size-adjust\"}]]\ne:null\n4b:I[14909,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"9505\",\"static/chunks/9505-a8f112b566ef7f41.js\",\"6150\",\"static/chunks/6150-57a79db9099e4be8.js\",\"8510\",\"static/chunks/8510-2f41b25832a6d317.js\",\"2286\",\"static/chunks/2286-91dc9ed7c6acaf3a.js\",\"1285\",\"static/chunks/1285-2b0f91300e0c0b9a.js\",\"9028\",\"static/chunks/9028-bdf215f649fe02e9.js\",\"4848\",\"static/chunks/app/(site)/(content)/%5B%5B...pathname%5D%5D/page-c1425cfd4f268718.js\"],\"ScrollSectionsList\"]\n4c:I[17370,[\"2634\",\"static/chunks/b5d5b83b-3d9186fb60556c53.js\",\"7609\",\"static/chunks/7609-ae1015bd89577747.js\",\"1281\",\"static/chunks/1281-411df876b32e19c2.js\",\"9505\",\"static/chunks/9505-a8f112b566ef7f41.js\",\"6150\",\"static/chunks/6150-57a79db9099e4be8.js\",\"8510\",\"static/chunks/8510-2f41b25832a6d317.js\",\"2286\",\"static/chunks/2286-91dc9ed7c6acaf3a.js\",\"1285\",\"static/chunks/1285-2b0f91300e0c0b9a.js\",\"9028\",\"static/chunks/9028-bdf215f649fe02e9.js\",\"4848\",\"static/chunks/app/(site)/(content)/%5B%5B...pathname%5D%5D/page-c1425cfd4f268718.js\"],\"CopyCodeButton\"]\n3d:[\"$\",\"$L4b\",null,{\"sections\":[{\"id\":\"what-are-objectbox-transactions\",\"title\":\"What are ObjectBox Transactions?\",\"depth\":1},{\"id\":\"explicit-transactions\",\"title\":\"Explicit transactions\",\"depth\":1},{\"id\":\"transaction-costs\",\"title\":\"Transaction Costs\",\"depth\":1},{\"id\":\"read-transactions\",\"title\":\"Read Transactions\",\"depth\":1},{\"id\":\"multiversion-concurrency\",\"title\":\"Multiversion concurrency\",\"depth\":1},{\"id\":\"locking-inside-a-write-transaction\",\"title\":\"Locking inside a Write Transaction\",\"depth\":2}]}]\n42:[\"$\",\"$L1c\",null,{\"href\":\"https://en.wikipedia.org/wiki/Database_transaction\",\"className\":\"underline underline-offset-2 text-primary hover:text-primary-700 transition-colors \",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"database transactions\"}]]]}]\n43:[\"$\",\"$L1c\",null,{\"href\":\"https://objectbox.io/docfiles/swift/current/Classes/Store.html\",\"className\":\"underline underline-offset-2 text-primary hover:text-primary-700 transition-colors \",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"Store\"}]]]}]\n47:[\"$\",\"$L1c\",null,{\"href\":\"https://en.wikipedia.org/wiki/Multiversion_concurrency_control\",\"className\":\"underline underline-offset-2 text-primary hover:text-primary-700 transition-colors \",\"children\":[[[\"$\",\"$41\",\"0\",{\"children\":\"Multiversion concurrency control (MVCC)\"}]]]"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"}]\n44:[\"$\",\"div\",null,{\"className\":\"group/codeblock grid grid-flow-col w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[\"$\",\"div\",null,{\"className\":\"flex items-center justify-start [grid-area:1/1] text-sm gap-2\",\"children\":null}],[\"$\",\"$L4c\",null,{\"codeId\":\"7276abad27114ae89ea6b3a75d1276c9\",\"style\":[\"group-hover/codeblock:opacity-[1]\",\"transition-opacity\",\"duration-75\",\"opacity-0\",\"text-xs\",\"[grid-area:2/1]\",\"z-[2]\",\"justify-self-end\",\"backdrop-blur-md\",\"leading-none\",\"self-start\",\"ring-1\",\"ring-dark/2\",\"text-dark/7\",\"bg-transparent\",\"rounded-md\",\"mr-2\",\"mt-2\",\"p-1\",\"hover:ring-dark/3\",\"dark:ring-light/2\",\"dark:text-light/7\",\"dark:hover:ring-light/3\"]}],[\"$\",\"pre\",null,{\"className\":\"[grid-area:2/1] relative overflow-auto bg-light-2 dark:bg-dark-2 hide-scroll rounded-md straight-corners:rounded-sm\",\"children\":[\"$\",\"code\",null,{\"id\":\"7276abad27114ae89ea6b3a75d1276c9\",\"className\":\"min-w-full inline-grid [grid-template-columns:auto_1fr] py-2 px-2 [counter-reset:line]\",\"children\":[[\"$\",\"span\",null,{\"className\":\"grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [\u0026.highlighted:first-child]:rounded-t-md [\u0026.highlighted:first-child\u003e*]:mt-1 [\u0026.highlighted:last-child]:rounded-b-md [\u0026.highlighted:last-child\u003e*]:mb-1 [\u0026:only-child]:hover:ring-transparent [\u0026.highlighted]:rounded-none [\u0026:not(.highlighted)_+_.highlighted]:rounded-t-md [\u0026:not(.highlighted)_+_.highlighted\u003e*]:mt-1 [\u0026.highlighted:has(+:not(.highlighted))]:rounded-b-md [\u0026.highlighted:has(+:not(.highlighted))\u003e*]:mb-1 [\u0026:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md\",\"children\":[null,[\"$\",\"span\",null,{\"className\":\"ml-3 block text-sm\",\"children\":[[[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-keyword)\"},\"children\":\"try\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" store.\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\"runInTransaction\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" {\"}]],\"\\n\"]}]]}],[\"$\",\"span\",null,{\"className\":\"grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [\u0026.highlighted:first-child]:rounded-t-md [\u0026.highlighted:first-child\u003e*]:mt-1 [\u0026.highlighted:last-child]:rounded-b-md [\u0026.highlighted:last-child\u003e*]:mb-1 [\u0026:only-child]:hover:ring-transparent [\u0026.highlighted]:rounded-none [\u0026:not(.highlighted)_+_.highlighted]:rounded-t-md [\u0026:not(.highlighted)_+_.highlighted\u003e*]:mt-1 [\u0026.highlighted:has(+:not(.highlighted))]:rounded-b-md [\u0026.highlighted:has(+:not(.highlighted))\u003e*]:mb-1 [\u0026:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md\",\"children\":[null,[\"$\",\"span\",null,{\"className\":\"ml-3 block text-sm\",\"children\":[[[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-keyword)\"},\"children\":\"try\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" allUsers.\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\"forEach\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" { user \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-keyword)\"},\"children\":\"in\"}]],\"\\n\"]}]]}],[\"$\",\"span\",null,{\"className\":\"grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [\u0026.highlighted:first-child]:rounded-t-md [\u0026.highlighted:first-child\u003e*]:mt-1 [\u0026.highlighted:last-child]:rounded-b-md [\u0026.highlighted:last-child\u003e*]:mb-1 [\u0026:only-child]:hover:ring-transparent [\u0026.highlighted]:rounded-none [\u0026:not(.highlighted)_+_.highlighted]:rounded-t-md [\u0026:not(.highlighted)_+_.highlighted\u003e*]:mt-1 [\u0026.highlighted:has(+:not(.highlighted))]:rounded-b-md [\u0026.highlighted:has(+:not(.highlighted))\u003e*]:mb-1 [\u0026:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md\",\"children\":[null,[\"$\",\"span\",null,{"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"\"className\":\"ml-3 block text-sm\",\"children\":[[[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-keyword)\"},\"children\":\"if\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\" \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-punctuation)\"},\"children\":\"(\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\"modify\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-punctuation)\"},\"children\":\"(\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\"user\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-punctuation)\"},\"children\":\"))\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" {\"}]],\"\\n\"]}]]}],[\"$\",\"span\",null,{\"className\":\"grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [\u0026.highlighted:first-child]:rounded-t-md [\u0026.highlighted:first-child\u003e*]:mt-1 [\u0026.highlighted:last-child]:rounded-b-md [\u0026.highlighted:last-child\u003e*]:mb-1 [\u0026:only-child]:hover:ring-transparent [\u0026.highlighted]:rounded-none [\u0026:not(.highlighted)_+_.highlighted]:rounded-t-md [\u0026:not(.highlighted)_+_.highlighted\u003e*]:mt-1 [\u0026.highlighted:has(+:not(.highlighted))]:rounded-b-md [\u0026.highlighted:has(+:not(.highlighted))\u003e*]:mb-1 [\u0026:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md\",\"children\":[null,[\"$\",\"span\",null,{\"className\":\"ml-3 block text-sm\",\"children\":[[[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-keyword)\"},\"children\":\"try\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" box.\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\"put\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-punctuation)\"},\"children\":\"(\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\"user\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-punctuation)\"},\"children\":\")\"}]],\"\\n\"]}]]}],[\"$\",\"span\",null,{\"className\":\"grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [\u0026.highlighted:first-child]:rounded-t-md [\u0026.highlighted:first-child\u003e*]:mt-1 [\u0026.highlighted:last-child]:rounded-b-md [\u0026.highlighted:last-child\u003e*]:mb-1 [\u0026:only-child]:hover:ring-transparent [\u0026.highlighted]:rounded-none [\u0026:not(.highlighted)_+_.highlighted]:rounded-t-md [\u0026:not(.highlighted)_+_.highlighted\u003e*]:mt-1 [\u0026.highlighted:has(+:not(.highlighted))]:rounded-b-md [\u0026.highlighted:has(+:not(.highlighted))\u003e*]:mb-1 [\u0026:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md\",\"children\":[null,[\"$\",\"span\",null,{\"className\":\"ml-3 block text-sm\",\"children\":[[[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" } \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-keyword)\"},\"children\":\"else\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" {\"}]],\"\\n\"]}]]}],[\"$\",\"span\",null,{\"className\":\"grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [\u0026.highlighted:first-child]:rounded-t-md [\u0026.highlighted:first-child\u003e*]:mt-1 [\u0026.highlighted:last-child]:rounded-b-md [\u0026.highlighted:last-child\u003e*]:mb-1 [\u0026:only-child]:hover:ring-transparent [\u0026.highlighted]:rounded-none [\u0026:not(.highlighted)_+_.highlighted]:rounded-t-md [\u0026:not(.highlighted)_+_.highlighted\u003e*]:mt-1 [\u0026.highlighted:has(+:not(.highlighted))]:rounded-b-md [\u0026.highlighted:has(+:not(.highlighted))\u003e*]:mb-1 [\u0026:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md\",\"children\":[null,[\"$\",\"span\",null,{\"className\":\"ml-3 block text-sm\",\"children\":[[[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-keyword)\"},\"children\":\"try\"}],"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" box.\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\"remove\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-punctuation)\"},\"children\":\"(\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\"user\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-punctuation)\"},\"children\":\")\"}]],\"\\n\"]}]]}],[\"$\",\"span\",null,{\"className\":\"grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [\u0026.highlighted:first-child]:rounded-t-md [\u0026.highlighted:first-child\u003e*]:mt-1 [\u0026.highlighted:last-child]:rounded-b-md [\u0026.highlighted:last-child\u003e*]:mb-1 [\u0026:only-child]:hover:ring-transparent [\u0026.highlighted]:rounded-none [\u0026:not(.highlighted)_+_.highlighted]:rounded-t-md [\u0026:not(.highlighted)_+_.highlighted\u003e*]:mt-1 [\u0026.highlighted:has(+:not(.highlighted))]:rounded-b-md [\u0026.highlighted:has(+:not(.highlighted))\u003e*]:mb-1 [\u0026:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md\",\"children\":[null,[\"$\",\"span\",null,{\"className\":\"ml-3 block text-sm\",\"children\":[[[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" }\"}]],\"\\n\"]}]]}],[\"$\",\"span\",null,{\"className\":\"grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [\u0026.highlighted:first-child]:rounded-t-md [\u0026.highlighted:first-child\u003e*]:mt-1 [\u0026.highlighted:last-child]:rounded-b-md [\u0026.highlighted:last-child\u003e*]:mb-1 [\u0026:only-child]:hover:ring-transparent [\u0026.highlighted]:rounded-none [\u0026:not(.highlighted)_+_.highlighted]:rounded-t-md [\u0026:not(.highlighted)_+_.highlighted\u003e*]:mt-1 [\u0026.highlighted:has(+:not(.highlighted))]:rounded-b-md [\u0026.highlighted:has(+:not(.highlighted))\u003e*]:mb-1 [\u0026:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md\",\"children\":[null,[\"$\",\"span\",null,{\"className\":\"ml-3 block text-sm\",\"children\":[[[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" }\"}]],\"\\n\"]}]]}],[\"$\",\"span\",null,{\"className\":\"grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [\u0026.highlighted:first-child]:rounded-t-md [\u0026.highlighted:first-child\u003e*]:mt-1 [\u0026.highlighted:last-child]:rounded-b-md [\u0026.highlighted:last-child\u003e*]:mb-1 [\u0026:only-child]:hover:ring-transparent [\u0026.highlighted]:rounded-none [\u0026:not(.highlighted)_+_.highlighted]:rounded-t-md [\u0026:not(.highlighted)_+_.highlighted\u003e*]:mt-1 [\u0026.highlighted:has(+:not(.highlighted))]:rounded-b-md [\u0026.highlighted:has(+:not(.highlighted))\u003e*]:mb-1 [\u0026:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md\",\"children\":[null,[\"$\",\"span\",null,{\"className\":\"ml-3 block text-sm\",\"children\":[[[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\"}\"}]],null]}]]}]]}]}]]}]\n45:[\"$\",\"div\",null,{\"className\":\"group/codeblock grid grid-flow-col w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[\"$\",\"div\",null,{\"className\":\"flex items-center justify-start [grid-area:1/1] text-sm gap-2\",\"children\":null}],[\"$\",\"$L4c\",null,{\"codeId\":\"238ea954e3cf493fbba3db48e92635b9\",\"style\":[\"group-hover/codeblock:opacity-[1]\",\"transition-opacity\",\"duration-75\",\"opacity-0\",\"text-xs\",\"[grid-area:2/1]\",\"z-[2]\",\"justify-self-end\",\"backdrop-blur-md\",\"leading-none\",\"self-start\",\"ring-1\",\"ring-dark/2\",\"text-dark/7\",\"bg-transparent\",\"rounded-md\",\"mr-2\",\"mt-2\",\"p-1\",\"hover:ring-dark/3\",\"dark:ring-light/2\",\"dark:text-light/7\",\"dark:hover:ring-light/3\"]}],[\"$\",\"pre\",null,{\"className\":\"[grid-area:2/1] relative overflow-auto bg-light-2 dark:bg-dark-2 hide-scroll rounded-md straight-corners:rounded-sm\",\"children\":[\"$\",\"code\",null,{\"id\":\"238ea954e3cf493fbba3db48e92635b9\",\"className\":\"min-w-full inline-grid [grid-template-columns:auto_1fr] py-2 px-2 [counter-reset:line]\",\"children\":[[\"$\",\"span\",null,{\"className\":\"grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transpare"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"nt hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [\u0026.highlighted:first-child]:rounded-t-md [\u0026.highlighted:first-child\u003e*]:mt-1 [\u0026.highlighted:last-child]:rounded-b-md [\u0026.highlighted:last-child\u003e*]:mb-1 [\u0026:only-child]:hover:ring-transparent [\u0026.highlighted]:rounded-none [\u0026:not(.highlighted)_+_.highlighted]:rounded-t-md [\u0026:not(.highlighted)_+_.highlighted\u003e*]:mt-1 [\u0026.highlighted:has(+:not(.highlighted))]:rounded-b-md [\u0026.highlighted:has(+:not(.highlighted))\u003e*]:mb-1 [\u0026:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md\",\"children\":[null,[\"$\",\"span\",null,{\"className\":\"ml-3 block text-sm\",\"children\":[[[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-keyword)\"},\"children\":\"try\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" allUsers.\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\"forEach\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" { user \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-keyword)\"},\"children\":\"in\"}]],\"\\n\"]}]]}],[\"$\",\"span\",null,{\"className\":\"grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [\u0026.highlighted:first-child]:rounded-t-md [\u0026.highlighted:first-child\u003e*]:mt-1 [\u0026.highlighted:last-child]:rounded-b-md [\u0026.highlighted:last-child\u003e*]:mb-1 [\u0026:only-child]:hover:ring-transparent [\u0026.highlighted]:rounded-none [\u0026:not(.highlighted)_+_.highlighted]:rounded-t-md [\u0026:not(.highlighted)_+_.highlighted\u003e*]:mt-1 [\u0026.highlighted:has(+:not(.highlighted))]:rounded-b-md [\u0026.highlighted:has(+:not(.highlighted))\u003e*]:mb-1 [\u0026:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md\",\"children\":[null,[\"$\",\"span\",null,{\"className\":\"ml-3 block text-sm\",\"children\":[[[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\"modify\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-punctuation)\"},\"children\":\"(\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\"user\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-punctuation)\"},\"children\":\")\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-comment)\"},\"children\":\"// modifies properties of given user\"}]],\"\\n\"]}]]}],[\"$\",\"span\",null,{\"className\":\"grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [\u0026.highlighted:first-child]:rounded-t-md [\u0026.highlighted:first-child\u003e*]:mt-1 [\u0026.highlighted:last-child]:rounded-b-md [\u0026.highlighted:last-child\u003e*]:mb-1 [\u0026:only-child]:hover:ring-transparent [\u0026.highlighted]:rounded-none [\u0026:not(.highlighted)_+_.highlighted]:rounded-t-md [\u0026:not(.highlighted)_+_.highlighted\u003e*]:mt-1 [\u0026.highlighted:has(+:not(.highlighted))]:rounded-b-md [\u0026.highlighted:has(+:not(.highlighted))\u003e*]:mb-1 [\u0026:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md\",\"children\":[null,[\"$\",\"span\",null,{\"className\":\"ml-3 block text-sm\",\"children\":[[[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-keyword)\"},\"children\":\"try\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" box.\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\"put\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-punctuation)\"},\"children\":\"(\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\"user\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-punctuation)\"},\"children\":\")\"}]],\"\\n\"]}]]}],[\"$\",\"span\",null,{\"className\":\"grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [\u0026.highlighted:first-child]:rounded-t-md [\u0026.highlighted:first-child\u003e*]:mt-1 [\u0026.highlighted:last-child]:rounde"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1,"d-b-md [\u0026.highlighted:last-child\u003e*]:mb-1 [\u0026:only-child]:hover:ring-transparent [\u0026.highlighted]:rounded-none [\u0026:not(.highlighted)_+_.highlighted]:rounded-t-md [\u0026:not(.highlighted)_+_.highlighted\u003e*]:mt-1 [\u0026.highlighted:has(+:not(.highlighted))]:rounded-b-md [\u0026.highlighted:has(+:not(.highlighted))\u003e*]:mb-1 [\u0026:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md\",\"children\":[null,[\"$\",\"span\",null,{\"className\":\"ml-3 block text-sm\",\"children\":[[[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\"}\"}]],null]}]]}]]}]}]]}]\n46:[\"$\",\"div\",null,{\"className\":\"group/codeblock grid grid-flow-col w-full mx-auto decoration-primary/6 max-w-3xl page-api-block:ml-0\",\"children\":[[\"$\",\"div\",null,{\"className\":\"flex items-center justify-start [grid-area:1/1] text-sm gap-2\",\"children\":null}],[\"$\",\"$L4c\",null,{\"codeId\":\"5cb53639380448ddb08b50c0f0eb3848\",\"style\":[\"group-hover/codeblock:opacity-[1]\",\"transition-opacity\",\"duration-75\",\"opacity-0\",\"text-xs\",\"[grid-area:2/1]\",\"z-[2]\",\"justify-self-end\",\"backdrop-blur-md\",\"leading-none\",\"self-start\",\"ring-1\",\"ring-dark/2\",\"text-dark/7\",\"bg-transparent\",\"rounded-md\",\"mr-2\",\"mt-2\",\"p-1\",\"hover:ring-dark/3\",\"dark:ring-light/2\",\"dark:text-light/7\",\"dark:hover:ring-light/3\"]}],[\"$\",\"pre\",null,{\"className\":\"[grid-area:2/1] relative overflow-auto bg-light-2 dark:bg-dark-2 hide-scroll rounded-md straight-corners:rounded-sm\",\"children\":[\"$\",\"code\",null,{\"id\":\"5cb53639380448ddb08b50c0f0eb3848\",\"className\":\"min-w-full inline-grid [grid-template-columns:auto_1fr] py-2 px-2 [counter-reset:line]\",\"children\":[[\"$\",\"span\",null,{\"className\":\"grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [\u0026.highlighted:first-child]:rounded-t-md [\u0026.highlighted:first-child\u003e*]:mt-1 [\u0026.highlighted:last-child]:rounded-b-md [\u0026.highlighted:last-child\u003e*]:mb-1 [\u0026:only-child]:hover:ring-transparent [\u0026.highlighted]:rounded-none [\u0026:not(.highlighted)_+_.highlighted]:rounded-t-md [\u0026:not(.highlighted)_+_.highlighted\u003e*]:mt-1 [\u0026.highlighted:has(+:not(.highlighted))]:rounded-b-md [\u0026.highlighted:has(+:not(.highlighted))\u003e*]:mb-1 [\u0026:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md\",\"children\":[null,[\"$\",\"span\",null,{\"className\":\"ml-3 block text-sm\",\"children\":[[[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-keyword)\"},\"children\":\"try\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" allUsers.\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\"forEach\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" { user \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-keyword)\"},\"children\":\"in\"}]],\"\\n\"]}]]}],[\"$\",\"span\",null,{\"className\":\"grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [\u0026.highlighted:first-child]:rounded-t-md [\u0026.highlighted:first-child\u003e*]:mt-1 [\u0026.highlighted:last-child]:rounded-b-md [\u0026.highlighted:last-child\u003e*]:mb-1 [\u0026:only-child]:hover:ring-transparent [\u0026.highlighted]:rounded-none [\u0026:not(.highlighted)_+_.highlighted]:rounded-t-md [\u0026:not(.highlighted)_+_.highlighted\u003e*]:mt-1 [\u0026.highlighted:has(+:not(.highlighted))]:rounded-b-md [\u0026.highlighted:has(+:not(.highlighted))\u003e*]:mb-1 [\u0026:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md\",\"children\":[null,[\"$\",\"span\",null,{\"className\":\"ml-3 block text-sm\",\"children\":[[[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\"modify\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-punctuation)\"},\"children\":\"(\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\"user\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-punctuation)\"},\"children\":\")\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-comment)\"},\"children\":\"//"])</script><script nonce="NTQ0NmExY2YtNDE4ZC00OWE3LWIzYTgtZDMzNTM2NmE5NzFl">self.__next_f.push([1," modifies properties of given user\"}]],\"\\n\"]}]]}],[\"$\",\"span\",null,{\"className\":\"grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [\u0026.highlighted:first-child]:rounded-t-md [\u0026.highlighted:first-child\u003e*]:mt-1 [\u0026.highlighted:last-child]:rounded-b-md [\u0026.highlighted:last-child\u003e*]:mb-1 [\u0026:only-child]:hover:ring-transparent [\u0026.highlighted]:rounded-none [\u0026:not(.highlighted)_+_.highlighted]:rounded-t-md [\u0026:not(.highlighted)_+_.highlighted\u003e*]:mt-1 [\u0026.highlighted:has(+:not(.highlighted))]:rounded-b-md [\u0026.highlighted:has(+:not(.highlighted))\u003e*]:mb-1 [\u0026:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md\",\"children\":[null,[\"$\",\"span\",null,{\"className\":\"ml-3 block text-sm\",\"children\":[[[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\"}\"}]],\"\\n\"]}]]}],[\"$\",\"span\",null,{\"className\":\"grid [grid-template-columns:subgrid] col-span-2 relative ring-1 ring-transparent hover:ring-dark-4/5 hover:z-[1] dark:hover:ring-light-4/4 rounded [\u0026.highlighted:first-child]:rounded-t-md [\u0026.highlighted:first-child\u003e*]:mt-1 [\u0026.highlighted:last-child]:rounded-b-md [\u0026.highlighted:last-child\u003e*]:mb-1 [\u0026:only-child]:hover:ring-transparent [\u0026.highlighted]:rounded-none [\u0026:not(.highlighted)_+_.highlighted]:rounded-t-md [\u0026:not(.highlighted)_+_.highlighted\u003e*]:mt-1 [\u0026.highlighted:has(+:not(.highlighted))]:rounded-b-md [\u0026.highlighted:has(+:not(.highlighted))\u003e*]:mb-1 [\u0026:not(.highlighted)_+_.highlighted:has(+:not(.highlighted))]:rounded-md\",\"children\":[null,[\"$\",\"span\",null,{\"className\":\"ml-3 block text-sm\",\"children\":[[[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-keyword)\"},\"children\":\"try\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-foreground)\"},\"children\":\" box.\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\"put\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-punctuation)\"},\"children\":\"(\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-function)\"},\"children\":\"allUsers\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"var(--shiki-token-punctuation)\"},\"children\":\")\"}]],null]}]]}]]}]}]]}]\n"])</script></body></html>