<!DOCTYPE html><html lang="en"><head><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="preload" as="image" href="/favicon.svg"><script async="" src="https://www.googletagmanager.com/gtag/js?id=G-D1MGR8VRWJ"></script><link rel="dns-prefetch" href="https://www.googletagmanager.com/"><link href="https://www.googletagmanager.com/gtag/js?id=G-D1MGR8VRWJ" rel="preload" as="script"><link rel="preload" as="font" href="/fonts/inter.woff2" type="font/woff2" crossorigin="anonymous"><link rel="preload" as="font" href="/fonts/inconsolata.woff2" type="font/woff2" crossorigin="anonymous"><link rel="preload" as="font" href="/fonts/shantell.woff2" type="font/woff2" crossorigin="anonymous"><title>getRowHash | TinyBase</title><meta name="description" content="The getRowHash function returns a hash for a single Row in a Table, based on each Cell Id and hash."><meta property="og:type" content="website"><meta property="og:title" content="getRowHash | TinyBase"><meta property="og:description" content="The getRowHash function returns a hash for a single Row in a Table, based on each Cell Id and hash."><meta property="og:url" content="https://beta.tinybase.org/api/common/functions/hash/getrowhash/"><meta property="og:image" content="https://beta.tinybase.org/favicon_pad.png"><meta name="twitter:card" content="summary"><meta name="twitter:title" content="getRowHash | TinyBase"><meta name="twitter:description" content="The getRowHash function returns a hash for a single Row in a Table, based on each Cell Id and hash."><meta name="twitter:site" content="@tinybasejs"><meta name="twitter:image" content="https://beta.tinybase.org/favicon_pad.png"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><link rel="canonical" href="https://beta.tinybase.org/api/common/functions/hash/getrowhash/"><link rel="stylesheet" href="/css/index.css"><script src="/js/app.js"></script></head><body><header><a href="/"><img src="/favicon.svg" alt="TinyBase logo"><span>TinyBase <em>β</em></span></a><nav><ul><li><a href="/guides/">Guides</a></li><li><a href="/demos/">Demos</a></li><li><a href="/api/">API</a></li><li><a href="https://github.com/tinyplex/tinybase">GitHub</a></li></ul></nav><span id="dark"></span></header><main><nav><ul><li id="root" class="parent open"><span></span><a href="/">TinyBase</a><ul><li id="G" class="parent"><span></span><a href="/guides/">Guides</a></li><li id="D2" class="parent"><span></span><a href="/demos/">Demos</a></li><li id="api" class="parent open"><span></span><a href="/api/">API</a><ul><li id="s" class="parent"><span></span><a href="/api/store/"><code>store</code></a></li><li id="m" class="parent"><span></span><a href="/api/mergeable-store/"><code>mergeable-store</code></a></li><li id="m3" class="parent"><span></span><a href="/api/metrics/"><code>metrics</code></a></li><li id="i" class="parent"><span></span><a href="/api/indexes/"><code>indexes</code></a></li><li id="r" class="parent"><span></span><a href="/api/relationships/"><code>relationships</code></a></li><li id="q" class="parent"><span></span><a href="/api/queries/"><code>queries</code></a></li><li id="c" class="parent"><span></span><a href="/api/checkpoints/"><code>checkpoints</code></a></li><li id="c3" class="parent open"><span></span><a href="/api/common/"><code>common</code></a><ul><li id="c3/F8" class="parent open"><span></span><a href="/api/common/functions/">Functions</a><ul><li id="c3/F8/C28" class="parent"><span></span><a href="/api/common/functions/convenience/">Convenience functions</a></li><li id="c3/F8/H2" class="parent open"><span></span><a href="/api/common/functions/hash/">Hash functions</a><ul><li id="gTITH"><span></span><a href="/api/common/functions/hash/gettableintableshash/"><code>getTableInTablesHash</code></a></li><li id="gTH"><span></span><a href="/api/common/functions/hash/gettableshash/"><code>getTablesHash</code></a></li><li id="gRITH"><span></span><a href="/api/common/functions/hash/getrowintablehash/"><code>getRowInTableHash</code></a></li><li id="gTH2"><span></span><a href="/api/common/functions/hash/gettablehash/"><code>getTableHash</code></a></li><li id="gCIRH"><span></span><a href="/api/common/functions/hash/getcellinrowhash/"><code>getCellInRowHash</code></a></li><li id="gRH" class="current"><span></span><a href="/api/common/functions/hash/getrowhash/"><code>getRowHash</code></a></li><li id="gCH"><span></span><a href="/api/common/functions/hash/getcellhash/"><code>getCellHash</code></a></li><li id="gVIVH"><span></span><a href="/api/common/functions/hash/getvalueinvalueshash/"><code>getValueInValuesHash</code></a></li><li id="gVH"><span></span><a href="/api/common/functions/hash/getvalueshash/"><code>getValuesHash</code></a></li><li id="gVH2"><span></span><a href="/api/common/functions/hash/getvaluehash/"><code>getValueHash</code></a></li><li id="aORH"><span></span><a href="/api/common/functions/hash/addorremovehash/"><code>addOrRemoveHash</code></a></li><li id="gH"><span></span><a href="/api/common/functions/hash/gethash/"><code>getHash</code></a></li></ul></li><li id="c3/F8/S16" class="parent"><span></span><a href="/api/common/functions/stamps/">Stamps functions</a></li></ul></li><li id="c3/TA15" class="parent"><span></span><a href="/api/common/type-aliases/">Type Aliases</a></li></ul></li><li id="p" class="parent"><span></span><a href="/api/persisters/"><code>persisters</code></a></li><li id="p2" class="parent"><span></span><a href="/api/persister-automerge/"><code>persister-automerge</code></a></li><li id="p3" class="parent"><span></span><a href="/api/persister-browser/"><code>persister-browser</code></a></li><li id="p4" class="parent"><span></span><a href="/api/persister-cr-sqlite-wasm/"><code>persister-cr-sqlite-wasm</code></a></li><li id="p5" class="parent"><span></span><a href="/api/persister-durable-object-storage/"><code>persister-durable-object-storage</code></a></li><li id="p6" class="parent"><span></span><a href="/api/persister-electric-sql/"><code>persister-electric-sql</code></a></li><li id="p7" class="parent"><span></span><a href="/api/persister-expo-sqlite/"><code>persister-expo-sqlite</code></a></li><li id="p8" class="parent"><span></span><a href="/api/persister-file/"><code>persister-file</code></a></li><li id="p9" class="parent"><span></span><a href="/api/persister-indexed-db/"><code>persister-indexed-db</code></a></li><li id="p10" class="parent"><span></span><a href="/api/persister-libsql/"><code>persister-libsql</code></a></li><li id="p11" class="parent"><span></span><a href="/api/persister-partykit-client/"><code>persister-partykit-client</code></a></li><li id="p12" class="parent"><span></span><a href="/api/persister-partykit-server/"><code>persister-partykit-server</code></a></li><li id="p13" class="parent"><span></span><a href="/api/persister-pglite/"><code>persister-pglite</code></a></li><li id="p14" class="parent"><span></span><a href="/api/persister-postgres/"><code>persister-postgres</code></a></li><li id="p15" class="parent"><span></span><a href="/api/persister-powersync/"><code>persister-powersync</code></a></li><li id="p16" class="parent"><span></span><a href="/api/persister-remote/"><code>persister-remote</code></a></li><li id="p17" class="parent"><span></span><a href="/api/persister-sqlite-bun/"><code>persister-sqlite-bun</code></a></li><li id="p18" class="parent"><span></span><a href="/api/persister-sqlite-wasm/"><code>persister-sqlite-wasm</code></a></li><li id="p19" class="parent"><span></span><a href="/api/persister-sqlite3/"><code>persister-sqlite3</code></a></li><li id="p20" class="parent"><span></span><a href="/api/persister-yjs/"><code>persister-yjs</code></a></li><li id="s42" class="parent"><span></span><a href="/api/synchronizers/"><code>synchronizers</code></a></li><li id="s45" class="parent"><span></span><a href="/api/synchronizer-broadcast-channel/"><code>synchronizer-broadcast-channel</code></a></li><li id="s48" class="parent"><span></span><a href="/api/synchronizer-local/"><code>synchronizer-local</code></a></li><li id="s51" class="parent"><span></span><a href="/api/synchronizer-ws-client/"><code>synchronizer-ws-client</code></a></li><li id="s54" class="parent"><span></span><a href="/api/synchronizer-ws-server/"><code>synchronizer-ws-server</code></a></li><li id="s55" class="parent"><span></span><a href="/api/synchronizer-ws-server-durable-object/"><code>synchronizer-ws-server-durable-object</code></a></li><li id="s56" class="parent"><span></span><a href="/api/synchronizer-ws-server-simple/"><code>synchronizer-ws-server-simple</code></a></li><li id="u" class="parent"><span></span><a href="/api/ui-react/"><code>ui-react</code></a></li><li id="u2" class="parent"><span></span><a href="/api/ui-react-dom/"><code>ui-react-dom</code></a></li><li id="u3" class="parent"><span></span><a href="/api/ui-react-inspector/"><code>ui-react-inspector</code></a></li></ul></li></ul></li></ul></nav><article><nav><ul><li><a href="/">TinyBase</a></li><li><a href="/api/">API</a></li><li><a href="/api/common/"><code>common</code></a></li><li><a href="/api/common/functions/">Functions</a></li><li><a href="/api/common/functions/hash/">Hash functions</a></li><li><a href="/api/common/functions/hash/getrowhash/"><code>getRowHash</code></a></li></ul></nav><section class="s1" id="/api/common/functions/hash/getrowhash/" data-id="gRH"><h1><code>getRowHash</code></h1><p>The <code>getRowHash</code> function returns a hash for a single <a href="/api/store/type-aliases/store/row/"><code>Row</code></a> in a <a href="/api/store/type-aliases/store/table/"><code>Table</code></a>, based on each <a href="/api/store/type-aliases/store/cell/"><code>Cell</code></a> <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a> and hash.</p><pre><code><span class="function"><a href="/api/common/functions/hash/getrowhash/">getRowHash</a></span><span class="punctuation">(</span>cellHashes<span class="operator">:</span> <span class="punctuation">{</span><span class="punctuation">[</span>cellId<span class="operator">:</span> <span class="type"><a href="/api/common/type-aliases/identity/id/">Id</a></span><span class="punctuation">]</span><span class="operator">:</span> <span class="type"><a href="/api/common/type-aliases/stamps/hash/">Hash</a></span><span class="punctuation">}</span><span class="punctuation">)</span><span class="operator">:</span> <span class="type"><a href="/api/common/type-aliases/stamps/hash/">Hash</a></span></code></pre><div class="table"><table><tr><th></th><th>Type</th><th>Description</th></tr><tr><th><code>cellHashes</code></th><td><code><span class="punctuation">{</span><span class="punctuation">[</span>cellId<span class="operator">:</span> <span class="type"><a href="/api/common/type-aliases/identity/id/">Id</a></span><span class="punctuation">]</span><span class="operator">:</span> <span class="type"><a href="/api/common/type-aliases/stamps/hash/">Hash</a></span><span class="punctuation">}</span></code></td><td><p>An object containing each <a href="/api/store/type-aliases/store/cell/"><code>Cell</code></a> <a href="/api/common/type-aliases/identity/id/"><code>Id</code></a> and its hash.</p></td></tr><tr><th class="right">returns</th><td><code><span class="type"><a href="/api/common/type-aliases/stamps/hash/">Hash</a></span></code></td><td><p></p><p>A hash of the <a href="/api/store/type-aliases/store/row/"><code>Row</code></a>.</p><p></p></td></tr></table></div><section class="s2"><h2>Example</h2><p>This example gets the hash of a <a href="/api/store/type-aliases/store/row/"><code>Row</code></a>.</p><pre><code><span class="keyword">import</span> <span class="punctuation">{</span>getRowHash<span class="punctuation">}</span> <span class="keyword">from</span> <span class="string">'tinybase'</span><span class="punctuation">;</span>
0 commit comments