-
Notifications
You must be signed in to change notification settings - Fork 0
/
io.randomseed.utils.db.html
56 lines (56 loc) · 54.3 KB
/
io.randomseed.utils.db.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>io.randomseed.utils.db documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script><link rel="stylesheet" type="text/css" href="css/randomseed.css" /></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Random:utils</span> <span class="project-version">1.2.34</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="10_introduction.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>io</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>randomseed</span></div></div></li><li class="depth-3"><a href="io.randomseed.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.bot.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bot</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.bus.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bus</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.crypto.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crypto</span></div></a></li><li class="depth-4 current"><a href="io.randomseed.utils.db.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.db.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.fs.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>fs</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.ip.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ip</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.log.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>log</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.map.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>map</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.nop-cache.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>nop-cache</span></div></a></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reitit</span></div></div></li><li class="depth-5"><a href="io.randomseed.utils.reitit.http.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>http</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.set.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>set</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.validators.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validators</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.validators.common.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>common</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.var.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>var</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.vec.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>vec</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="io.randomseed.utils.db.html#var-braced-.3F"><div class="inner"><span>braced-?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-braced-join-.3F"><div class="inner"><span>braced-join-?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-braced-join-col-names"><div class="inner"><span>braced-join-col-names</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-braced-join-col-names-no-conv"><div class="inner"><span>braced-join-col-names-no-conv</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-cache-create"><div class="inner"><span>cache-create</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-cache-evict.21"><div class="inner"><span>cache-evict!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-cache-id.2B"><div class="inner"><span>cache-id+</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-cache-lookup"><div class="inner"><span>cache-lookup</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-cache-lookup-coll"><div class="inner"><span>cache-lookup-coll</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-cache-prepare"><div class="inner"><span>cache-prepare</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-cached-setting-del"><div class="inner"><span>cached-setting-del</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-cached-setting-get"><div class="inner"><span>cached-setting-get</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-cached-setting-set"><div class="inner"><span>cached-setting-set</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-cwr-lookup"><div class="inner"><span>cwr-lookup</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-dash"><div class="inner"><span>dash</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-data-source.3F"><div class="inner"><span>data-source?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-for-insert-multi-or"><div class="inner"><span>for-insert-multi-or</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-for-insert-or"><div class="inner"><span>for-insert-or</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-for-replace"><div class="inner"><span>for-replace</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-for-replace-multi"><div class="inner"><span>for-replace-multi</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-get-cached"><div class="inner"><span>get-cached</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-get-cached-coll"><div class="inner"><span>get-cached-coll</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-get-cached-coll-prop"><div class="inner"><span>get-cached-coll-prop</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-get-cached-prop"><div class="inner"><span>get-cached-prop</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-get-cached-prop-or-default"><div class="inner"><span>get-cached-prop-or-default</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-get-failed.3F"><div class="inner"><span>get-failed?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-get-id"><div class="inner"><span>get-id</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-get-ids"><div class="inner"><span>get-ids</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-id-as-str"><div class="inner"><span>id-as-str</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-id-from-db"><div class="inner"><span>id-from-db</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-id-to-db"><div class="inner"><span>id-to-db</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-init-cache"><div class="inner"><span>init-cache</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-init-caches"><div class="inner"><span>init-caches</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-insert-multi-or.21"><div class="inner"><span>insert-multi-or!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-insert-or.21"><div class="inner"><span>insert-or!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-insert-or-ignore.21"><div class="inner"><span>insert-or-ignore!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-insert-or-ignore-multi.21"><div class="inner"><span>insert-or-ignore-multi!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-insert-or-replace.21"><div class="inner"><span>insert-or-replace!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-insert-or-replace-multi.21"><div class="inner"><span>insert-or-replace-multi!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-invalidate.21"><div class="inner"><span>invalidate!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-invalidate.2B.21"><div class="inner"><span>invalidate+!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-invalidator"><div class="inner"><span>invalidator</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-join-.3F"><div class="inner"><span>join-?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-join-col-names"><div class="inner"><span>join-col-names</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-join-v.3D.3F"><div class="inner"><span>join-v=?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-listed-nil"><div class="inner"><span>listed-nil</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-make-deleter"><div class="inner"><span>make-deleter</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-make-getter"><div class="inner"><span>make-getter</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-make-getter-coll"><div class="inner"><span>make-getter-coll</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-make-setter"><div class="inner"><span>make-setter</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-make-setting-deleter"><div class="inner"><span>make-setting-deleter</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-make-setting-getter"><div class="inner"><span>make-setting-getter</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-make-setting-setter"><div class="inner"><span>make-setting-setter</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-memoize"><div class="inner"><span>memoize</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-memoize.2B"><div class="inner"><span>memoize+</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-memoized.2B.3F"><div class="inner"><span>memoized+?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-memoizer"><div class="inner"><span>memoizer</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-not-found"><div class="inner"><span>not-found</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-not-found.3F"><div class="inner"><span>not-found?</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-opts-map"><div class="inner"><span>opts-map</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-opts-simple-map"><div class="inner"><span>opts-simple-map</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-opts-simple-vec"><div class="inner"><span>opts-simple-vec</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-opts-slashed-map"><div class="inner"><span>opts-slashed-map</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-opts-slashed-vec"><div class="inner"><span>opts-slashed-vec</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-opts-vec"><div class="inner"><span>opts-vec</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-print-caches"><div class="inner"><span>print-caches</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-remove-caches"><div class="inner"><span>remove-caches</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-replace.21"><div class="inner"><span>replace!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-replace-multi.21"><div class="inner"><span>replace-multi!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-to-lisp"><div class="inner"><span>to-lisp</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-to-lisp-simple"><div class="inner"><span>to-lisp-simple</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-to-lisp-slashed"><div class="inner"><span>to-lisp-slashed</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-to-snake"><div class="inner"><span>to-snake</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-to-snake-simple"><div class="inner"><span>to-snake-simple</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-to-snake-slashed"><div class="inner"><span>to-snake-slashed</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-underscore"><div class="inner"><span>underscore</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.db.html#var-values-.3F"><div class="inner"><span>values-?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">io.randomseed.utils.db</h1><h4 class="added">added in 1.0.0</h4><div class="doc"><div class="markdown"><p>Random utils, database helper functions.</p>
</div></div><div class="public anchor" id="var-braced-.3F"><h3>braced-?</h3><div class="usage"><code>(braced-? coll)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L395">view source</a></div></div><div class="public anchor" id="var-braced-join-.3F"><h3>braced-join-?</h3><div class="usage"><code>(braced-join-? ids)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L383">view source</a></div></div><div class="public anchor" id="var-braced-join-col-names"><h3>braced-join-col-names</h3><div class="usage"><code>(braced-join-col-names cols)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L371">view source</a></div></div><div class="public anchor" id="var-braced-join-col-names-no-conv"><h3>braced-join-col-names-no-conv</h3><div class="usage"><code>(braced-join-col-names-no-conv cols)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L375">view source</a></div></div><div class="public anchor" id="var-cache-create"><h3>cache-create</h3><div class="usage"><code>(cache-create ttl)</code><code>(cache-create ttl queue-size)</code><code>(cache-create ttl queue-size initial-map)</code></div><div class="doc"><div class="markdown"><p>Creates a cache object of the given TTL and/or queue size. Optionally it can get an initial map of entries. Returns cache object encapsulated in an atom.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L76">view source</a></div></div><div class="public anchor" id="var-cache-evict.21"><h3>cache-evict!</h3><div class="usage"><code>(cache-evict! cache-atom entry)</code><code>(cache-evict! cache-atom entry & more)</code></div><div class="doc"><div class="markdown"><p>Removes entry or entries from the cache. Returns the updated cache from the atom.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L86">view source</a></div></div><div class="public anchor" id="var-cache-id.2B"><h3>cache-id+</h3><div class="usage"><code>(cache-id+ f)</code></div><div class="doc"><div class="markdown"><p>Returns metadata value associated with <code>:io.randomseed.utils.db/cache</code> key for the function <code>f</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L168">view source</a></div></div><div class="public anchor" id="var-cache-lookup"><h3>cache-lookup</h3><div class="usage"><code>(cache-lookup cache id)</code><code>(cache-lookup cache id & ids)</code></div><div class="doc"><div class="markdown"><p>Looks for the entry of the given ID in a cache which should be a cache object encapsulated in an atom. For multiple IDs, calls <code>cache-lookup-coll</code>. If the entry was not found, returns <code>:io.randomseed.utils.db/not-found</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L121">view source</a></div></div><div class="public anchor" id="var-cache-lookup-coll"><h3>cache-lookup-coll</h3><div class="usage"><code>(cache-lookup-coll cache ids)</code></div><div class="doc"><div class="markdown"><p>Looks for a collection of entries identified by the given ID in a cache which should be a cache object encapsulated in an atom. Returns a map with identifiers as keys and values for all found entries. Entries which are missing in the cache are grouped under the <code>:io.randomseed.utils.db/not-found</code> key as a list.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L106">view source</a></div></div><div class="public anchor" id="var-cache-prepare"><h3>cache-prepare</h3><div class="usage"><code>(cache-prepare ttl)</code><code>(cache-prepare ttl queue-size)</code><code>(cache-prepare ttl queue-size initial-map)</code></div><div class="doc"><div class="markdown"><p>Prepares a cache object of the given TTL and/or queue size. Optionally it can get an initial map of entries. Returns a cache object.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L57">view source</a></div></div><div class="public anchor" id="var-cached-setting-del"><h3>cached-setting-del</h3><div class="usage"><code>(cached-setting-del cache deleter db entity-id)</code><code>(cached-setting-del cache deleter db entity-id setting-id)</code><code>(cached-setting-del cache deleter db entity-id setting-id & pairs)</code></div><div class="doc"><div class="markdown"><p>Deletes the cached result of calling the given setting deleter. Purges cache entry after operation succeeded.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L1023">view source</a></div></div><div class="public anchor" id="var-cached-setting-get"><h3>cached-setting-get</h3><div class="usage"><code>(cached-setting-get cache getter db entity-id setting-id)</code><code>(cached-setting-get cache getter db entity-id setting-id & setting-ids)</code></div><div class="doc"><div class="markdown"><p>Gets the cached result of calling the given setting getter. Updates cache when necessary.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L989">view source</a></div></div><div class="public anchor" id="var-cached-setting-set"><h3>cached-setting-set</h3><div class="usage"><code>(cached-setting-set cache setter db entity-id setting-id value)</code><code>(cached-setting-set cache setter db entity-id setting-id value & pairs)</code></div><div class="doc"><div class="markdown"><p>Sets the cached result of calling the given setting setter. Purges cache entry after operation succeeded.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L1010">view source</a></div></div><div class="public anchor" id="var-cwr-lookup"><h3>cwr-lookup</h3><div class="usage"><code>(cwr-lookup cache id)</code></div><div class="doc"><div class="markdown"><p>Performs a cache lookup of <code>id</code> on <code>cache</code> and returns the hit. If there is no element found, returns the keyword <code>:io.randomseed.utils.db/not-found</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L95">view source</a></div></div><div class="public anchor" id="var-dash"><h3>dash</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L32">view source</a></div></div><div class="public anchor" id="var-data-source.3F"><h3>data-source?</h3><div class="usage"><code>(data-source? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L412">view source</a></div></div><div class="public anchor" id="var-for-insert-multi-or"><h3>for-insert-multi-or</h3><div class="usage"><code>(for-insert-multi-or table cols rows opts)</code></div><div class="doc"><div class="markdown"><p>Given a table name, a vector of column names, and a vector of row values (each row is a vector of its values), return a vector of the full <code>INSERT</code> SQL string and its parameters. Applies any <code>:table-fn</code> / <code>:column-fn</code> supplied in the options. If <code>:suffix</code> is provided in <code>opts</code>, that string is appended to the <code>INSERT IGNORE ...</code> statement. The <code>IGNORE</code> part can be replaced by supplying :alt-clause option key.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L713">view source</a></div></div><div class="public anchor" id="var-for-insert-or"><h3>for-insert-or</h3><div class="usage"><code>(for-insert-or table key-map opts)</code></div><div class="doc"><div class="markdown"><p>Given a table name and a hash map of column names and their values, return a vector of the full <code>INSERT OR IGNORE</code> SQL string and its parameters. Applies any <code>:table-fn</code> / <code>:column-fn</code> supplied in the options. If <code>:suffix</code> is provided in <code>opts</code>, that string is appended to the <code>INSERT ...</code> statement. If <code>:alt-clause</code> is provided in <code>opts</code>, it will replace the default IGNORE string.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L672">view source</a></div></div><div class="public anchor" id="var-for-replace"><h3>for-replace</h3><div class="usage"><code>(for-replace table key-map opts)</code></div><div class="doc"><div class="markdown"><p>Given a table name and a hash map of column names and their values, return a vector of the full <code>REPLACE</code> SQL string and its parameters. Applies any <code>:table-fn</code> / <code>:column-fn</code> supplied in the options. If <code>:suffix</code> is provided in <code>opts</code>, that string is appended to the <code>INSERT ...</code> statement.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L656">view source</a></div></div><div class="public anchor" id="var-for-replace-multi"><h3>for-replace-multi</h3><div class="usage"><code>(for-replace-multi table cols rows opts)</code></div><div class="doc"><div class="markdown"><p>Given a table name, a vector of column names, and a vector of row values (each row is a vector of its values), return a vector of the full <code>REPLACE</code> SQL string and its parameters. Applies any <code>:table-fn</code> / <code>:column-fn</code> supplied in the options. If <code>:suffix</code> is provided in <code>opts</code>, that string is appended to the <code>REPLACE ...</code> statement.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L690">view source</a></div></div><div class="public anchor" id="var-get-cached"><h3>get-cached</h3><div class="usage"><code>(get-cached cache db-getter db id)</code><code>(get-cached cache db-getter db id & more)</code><code>(get-cached cache table db id)</code><code>(get-cached cache table db id & more)</code><code>(get-cached cache table db-getter db id)</code><code>(get-cached cache table db-getter db id & more)</code></div><div class="doc"><div class="markdown"><p>Returns a (possibly cached) sequence of maps requested using db-getter for the given IDs. A database connection and a table name can be passed to be used with the standard get-id getter function instead. When multiple IDs are given, calls get-cached-coll.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L564">view source</a></div></div><div class="public anchor" id="var-get-cached-coll"><h3>get-cached-coll</h3><div class="usage"><code>(get-cached-coll cache db-getter db ids)</code><code>(get-cached-coll cache table db ids)</code><code>(get-cached-coll cache table db-getter db ids)</code></div><div class="doc"><div class="markdown"><p>Returns a (possibly cached) sequence of maps requested using db-getter for the given IDs. When called with a table name it will be passed as a second argument to the given getter function. When no getter is given the standard one (get-ids) is used. Use make-getter-coll to create getter (with or without predefined table name).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L541">view source</a></div></div><div class="public anchor" id="var-get-cached-coll-prop"><h3>get-cached-coll-prop</h3><div class="usage"><code>(get-cached-coll-prop cache db-getter db property ids)</code><code>(get-cached-coll-prop cache table db property ids)</code><code>(get-cached-coll-prop cache table db-getter db property ids)</code></div><div class="doc"><div class="markdown"><p>Uses get-cached-coll to retrieve a map with keys being IDs and values being requested properties. If there is no data for the given ID, corresponding entry is not added to the resulting map. If the property does not exist, nil is added.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L588">view source</a></div></div><div class="public anchor" id="var-get-cached-prop"><h3>get-cached-prop</h3><div class="usage"><code>(get-cached-prop cache db-getter db property id)</code><code>(get-cached-prop cache db-getter db property id & more)</code><code>(get-cached-prop cache table db property id)</code><code>(get-cached-prop cache table db property id & more)</code><code>(get-cached-prop cache table db-getter db property id)</code><code>(get-cached-prop cache table db-getter db property id & more)</code></div><div class="doc"><div class="markdown"><p>Same as get-cached but retrieves a single property from the result by using the get function. When multiple IDs are given it calls get-cached-coll-prop to handle it.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L604">view source</a></div></div><div class="public anchor" id="var-get-cached-prop-or-default"><h3>get-cached-prop-or-default</h3><div class="usage"><code>(get-cached-prop-or-default cache db-getter db property default id)</code><code>(get-cached-prop-or-default cache db-getter db property default id & more)</code><code>(get-cached-prop-or-default cache table db property default id)</code><code>(get-cached-prop-or-default cache table db property default id & more)</code><code>(get-cached-prop-or-default cache table db-getter db property default id)</code><code>(get-cached-prop-or-default cache table db-getter db property default id & more)</code></div><div class="doc"><div class="markdown"><p>Same as get-cached-prop but when there is no entry for the given ID, it returns the given default value.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L624">view source</a></div></div><div class="public anchor" id="var-get-failed.3F"><h3>get-failed?</h3><div class="usage"><code>(get-failed? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if getting from a database failed in post-processing phase (e.g. de-serialization) and the data were broken.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L839">view source</a></div></div><div class="public anchor" id="var-get-id"><h3>get-id</h3><div class="usage"><code>(get-id db table id)</code><code>(get-id db table id & more)</code></div><div class="doc"><div class="markdown"><p>Gets properties of the given ID from a database table. For multiple IDs, calls get-ids.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L531">view source</a></div></div><div class="public anchor" id="var-get-ids"><h3>get-ids</h3><div class="usage"><code>(get-ids db table ids)</code></div><div class="doc"><div class="markdown"><p>Gets a map of ID-to-properties from a database for the given IDs and a table. Assumes each result will be related to a single, unique ID.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L521">view source</a></div></div><div class="public anchor" id="var-id-as-str"><h3>id-as-str</h3><div class="usage"><code>(id-as-str v)</code></div><div class="doc"><div class="markdown"><p>Tries to convert the given argument to a string identifier.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L49">view source</a></div></div><div class="public anchor" id="var-id-from-db"><h3>id-from-db</h3><div class="usage"><code>(id-from-db v)</code></div><div class="doc"><div class="markdown"><p>Converts the given ID retrieved from a database to a value suitable to be used in Clojure programs. If <code>v</code> is a number or a keyword, it is returned as is. Otherwise it is converted to a keyword.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L36">view source</a></div></div><div class="public anchor" id="var-id-to-db"><h3>id-to-db</h3><div class="usage"><code>(id-to-db v)</code></div><div class="doc"><div class="markdown"><p>Converts the given ID to a value suitable to be stored in a database. If <code>v</code> is a number, it is passed as is. Otherwise it is converted to a string.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L43">view source</a></div></div><div class="public anchor" id="var-init-cache"><h3>init-cache</h3><div class="usage"><code>(init-cache {:keys [size ttl seed]})</code></div><div class="doc"><div class="markdown"><p>Initializes single cache by parsing TTL and queue size.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L1041">view source</a></div></div><div class="public anchor" id="var-init-caches"><h3>init-caches</h3><div class="usage"><code>(init-caches config)</code></div><div class="doc"><div class="markdown"><p>Initializes in-memory caches by resetting atoms associated with cache parameters.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L1048">view source</a></div></div><div class="public anchor" id="var-insert-multi-or.21"><h3>insert-multi-or!</h3><div class="usage"><code>(insert-multi-or! connectable table cols rows)</code><code>(insert-multi-or! connectable table cols rows opts)</code></div><div class="doc"><div class="markdown"><p>Syntactic sugar over <code>execute!</code> to make inserting columns/rows easier. Same as insert-or! but supports multiple rows to be inserted at once.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L752">view source</a></div></div><div class="public anchor" id="var-insert-or.21"><h3>insert-or!</h3><div class="usage"><code>(insert-or! connectable table key-map)</code><code>(insert-or! connectable table key-map opts)</code></div><div class="doc"><div class="markdown"><p>Syntactic sugar over <code>execute-one!</code> to make inserting hash maps easier. Given a connectable object, a table name, and a data hash map, inserts the data as a single row in the database and attempts to return a map of generated keys. By default it uses <code>INSERT OR IGNORE</code> but the <code>IGNORE</code> can be changed to anything by supplying :alt-clause option in opts map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L738">view source</a></div></div><div class="public anchor" id="var-insert-or-ignore.21"><h3>insert-or-ignore!</h3><div class="usage"><code>(insert-or-ignore! connectable table key-map)</code><code>(insert-or-ignore! connectable table key-map opts)</code></div><div class="doc"><div class="markdown"><p>Syntactic sugar over <code>execute-one!</code> to make inserting hash maps easier. Given a connectable object, a table name, and a data hash map, inserts the data as a single row in the database and attempts to return a map of generated keys.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L790">view source</a></div></div><div class="public anchor" id="var-insert-or-ignore-multi.21"><h3>insert-or-ignore-multi!</h3><div class="usage"><code>(insert-or-ignore-multi! connectable table cols rows)</code><code>(insert-or-ignore-multi! connectable table cols rows opts)</code></div><div class="doc"><div class="markdown"><p>Syntactic sugar over <code>execute!</code> to make inserting columns/rows easier. Same as insert-multi! but supports :alt-clause option key.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L773">view source</a></div></div><div class="public anchor" id="var-insert-or-replace.21"><h3>insert-or-replace!</h3><div class="usage"><code>(insert-or-replace! connectable table key-map)</code><code>(insert-or-replace! connectable table key-map opts)</code></div><div class="doc"><div class="markdown"><p>Syntactic sugar over <code>execute-one!</code> to make inserting hash maps easier. Given a connectable object, a table name, and a data hash map, inserts the data as a single row in the database and attempts to return a map of generated keys.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L781">view source</a></div></div><div class="public anchor" id="var-insert-or-replace-multi.21"><h3>insert-or-replace-multi!</h3><div class="usage"><code>(insert-or-replace-multi! connectable table cols rows)</code><code>(insert-or-replace-multi! connectable table cols rows opts)</code></div><div class="doc"><div class="markdown"><p>Syntactic sugar over <code>execute!</code> to make inserting columns/rows easier. Same as insert-multi! but supports :alt-clause option key.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L765">view source</a></div></div><div class="public anchor" id="var-invalidate.21"><h3>invalidate!</h3><div class="usage"><code>(invalidate! f)</code><code>(invalidate! f key-params)</code></div><div class="doc"><div class="markdown"><p>Invalidates cache associated with memoized function <code>f</code>. If <code>key-params</code> are given it should be a cache key sequence or other structure (usually function arguments). If only function is given, it clears the whole cache.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L161">view source</a></div></div><div class="public anchor" id="var-invalidate.2B.21"><h3>invalidate+!</h3><div class="usage"><code>(invalidate+! f)</code><code>(invalidate+! f key-params)</code></div><div class="doc"><div class="markdown"><p>Invalidates cache associated with memoized function <code>f</code>. If <code>key-params</code> are given it should be a cache key sequence or other structure (usually function arguments), internally transformed to vector. If only function is given, it clears the whole cache. Supports functions memoized with <code>memoize+</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L174">view source</a></div></div><div class="public anchor" id="var-invalidator"><h3>invalidator</h3><div class="usage"><code>(invalidator f)</code></div><div class="doc"><div class="markdown"><p>Generates invalidation function for the given memoized function <code>f</code>. The invalidation function takes arguments in the same way as memoized function. If they match a value in the associated cache, the entry is evicted. Supports functions memoized with <code>memoize</code> and <code>memoize+</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L195">view source</a></div></div><div class="public anchor" id="var-join-.3F"><h3>join-?</h3><div class="usage"><code>(join-? ids)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L379">view source</a></div></div><div class="public anchor" id="var-join-col-names"><h3>join-col-names</h3><div class="usage"><code>(join-col-names cols)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L367">view source</a></div></div><div class="public anchor" id="var-join-v.3D.3F"><h3>join-v=?</h3><div class="usage"><code>(join-v=? ids)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L387">view source</a></div></div><div class="public anchor" id="var-listed-nil"><h3>listed-nil</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L827">view source</a></div></div><div class="public anchor" id="var-make-deleter"><h3>make-deleter</h3><div class="usage"><code>(make-deleter id-col)</code><code>(make-deleter table id-col)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L500">view source</a></div></div><div class="public anchor" id="var-make-getter"><h3>make-getter</h3><div class="usage"><code>(make-getter id-col cols)</code><code>(make-getter table id-col cols)</code><code>(make-getter table id-col cols getter-coll-fn)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L454">view source</a></div></div><div class="public anchor" id="var-make-getter-coll"><h3>make-getter-coll</h3><div class="usage"><code>(make-getter-coll id-col)</code><code>(make-getter-coll id-col cols)</code><code>(make-getter-coll table id-col cols)</code></div><div class="doc"><div class="markdown"><p>Creates a database getter suitable for use with <code>get-cached-coll-</code> family of functions. The returned function should accept an argument containing multiple identifiers.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L418">view source</a></div></div><div class="public anchor" id="var-make-setter"><h3>make-setter</h3><div class="usage"><code>(make-setter id-col)</code><code>(make-setter table id-col)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L487">view source</a></div></div><div class="public anchor" id="var-make-setting-deleter"><h3>make-setting-deleter</h3><div class="usage"><code>(make-setting-deleter table entity-column)</code></div><div class="doc"><div class="markdown"><p>Creates a setting deleter on a basis of the given table and entity column.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L942">view source</a></div></div><div class="public anchor" id="var-make-setting-getter"><h3>make-setting-getter</h3><div class="usage"><code>(make-setting-getter table entity-column)</code></div><div class="doc"><div class="markdown"><p>Returns a function which gets a setting for the given entity and de-serializes it to a Clojure data structure. Table name and entity column name must be quoted if needed before passing to this function.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L845">view source</a></div></div><div class="public anchor" id="var-make-setting-setter"><h3>make-setting-setter</h3><div class="usage"><code>(make-setting-setter table entity-column)</code></div><div class="doc"><div class="markdown"><p>Returns a function which stores one or more settings for a given entity in a database. Max. object size is 32 KB. Table name and entity column name must be quoted if needed before passing to this function.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L898">view source</a></div></div><div class="public anchor" id="var-memoize"><h3>memoize</h3><div class="usage"><code>(memoize f)</code><code>(memoize f queue-size)</code><code>(memoize f queue-size ttl)</code></div><div class="doc"><div class="markdown"><p>Creates memoized version of a database accessing or other function. With only 1 argument defaults to a FIFO cache with length of 256 and TTL cache with expiration of 150 seconds. When 2 arguments are given it only creates FIFO cache of the given length, without TTL. When <code>queue-size</code> is <code>nil</code> or <= 0, the FIFO cache will not be created. When <code>ttl</code> is <code>nil</code> or <= 0, the TTL cache will not be created.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L132">view source</a></div></div><div class="public anchor" id="var-memoize.2B"><h3>memoize+</h3><div class="usage"><code>(memoize+ f)</code><code>(memoize+ f size)</code><code>(memoize+ f level1-size level2-size)</code></div><div class="doc"><div class="markdown"><p>Wrapper around <code>clojure.core.memoize/fifo</code> which uses fast, map-based memoization for cache size up to <code>level1-size</code> size, and then switches to slower memoization based on FIFO cache of <code>level2-size</code> size. The first level of cache is never purged automatically; once an element is there, it stays.</p>
<p>If only one size is given (<code>size</code>), the level-1 cache size will be set to 70% of it, and level-2 cache to 30% of it.</p>
<p>If no size is given, the level-1 cache will have a size of 89000 elements and level-2 cache will have a size of 39000 elements; both having a size of 128000 elements in total.</p>
<p>Be aware that caching key in level-1 cache is a vector of all arguments unless the argument count is greater than 8. In such case all extra arguments (expressed with native Clojure structure used for variadic function arguments) are grouped as 9th element of this vector.</p>
<p>To control caches associated with original function, use a metadata of the returned function object.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L207">view source</a></div></div><div class="public anchor" id="var-memoized.2B.3F"><h3>memoized+?</h3><div class="usage"><code>(memoized+? f)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> if the given function <code>f</code> is memoized using <code>memoize+</code>. If not, returns <code>false</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L189">view source</a></div></div><div class="public anchor" id="var-memoizer"><h3>memoizer</h3><div class="usage"><code>(memoizer config)</code><code>(memoizer f config)</code></div><div class="doc"><div class="markdown"><p>Creates a memoized functions with predefined TTL and queue size taken from config. If the function is not given it will try to dereference symbol present in the config under the <code>:memoizer</code> key. Uses <code>io.randomseed.utils.db/memoize</code> to initialize caches.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L145">view source</a></div></div><div class="public anchor" id="var-not-found"><h3>not-found</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L93">view source</a></div></div><div class="public anchor" id="var-not-found.3F"><h3>not-found?</h3><div class="usage"><code>(not-found? e)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> when the given value equals to <code>:io.randomseed.utils.db/not-found</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L101">view source</a></div></div><div class="public anchor" id="var-opts-map"><h3>opts-map</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L319">view source</a></div></div><div class="public anchor" id="var-opts-simple-map"><h3>opts-simple-map</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L327">view source</a></div></div><div class="public anchor" id="var-opts-simple-vec"><h3>opts-simple-vec</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L351">view source</a></div></div><div class="public anchor" id="var-opts-slashed-map"><h3>opts-slashed-map</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L335">view source</a></div></div><div class="public anchor" id="var-opts-slashed-vec"><h3>opts-slashed-vec</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L359">view source</a></div></div><div class="public anchor" id="var-opts-vec"><h3>opts-vec</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L343">view source</a></div></div><div class="public anchor" id="var-print-caches"><h3>print-caches</h3><div class="usage"><code>(print-caches caches)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L1070">view source</a></div></div><div class="public anchor" id="var-remove-caches"><h3>remove-caches</h3><div class="usage"><code>(remove-caches config)</code></div><div class="doc"><div class="markdown"><p>Removes cache structures.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L1061">view source</a></div></div><div class="public anchor" id="var-replace.21"><h3>replace!</h3><div class="usage"><code>(replace! connectable table key-map)</code><code>(replace! connectable table key-map opts)</code></div><div class="doc"><div class="markdown"><p>Syntactic sugar over <code>execute-one!</code> to make inserting hash maps easier. Given a connectable object, a table name, and a data hash map, inserts the data as a single row in the database and attempts to return a map of generated keys. By default it uses <code>REPLACE</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L799">view source</a></div></div><div class="public anchor" id="var-replace-multi.21"><h3>replace-multi!</h3><div class="usage"><code>(replace-multi! connectable table cols rows)</code><code>(replace-multi! connectable table cols rows opts)</code></div><div class="doc"><div class="markdown"><p>Syntactic sugar over <code>execute!</code> to make inserting columns/rows easier. Same as replace! but supports multiple rows to be inserted at once.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L812">view source</a></div></div><div class="public anchor" id="var-to-lisp"><h3>to-lisp</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L312">view source</a></div></div><div class="public anchor" id="var-to-lisp-simple"><h3>to-lisp-simple</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L313">view source</a></div></div><div class="public anchor" id="var-to-lisp-slashed"><h3>to-lisp-slashed</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L314">view source</a></div></div><div class="public anchor" id="var-to-snake"><h3>to-snake</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L315">view source</a></div></div><div class="public anchor" id="var-to-snake-simple"><h3>to-snake-simple</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L316">view source</a></div></div><div class="public anchor" id="var-to-snake-slashed"><h3>to-snake-slashed</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L317">view source</a></div></div><div class="public anchor" id="var-underscore"><h3>underscore</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L31">view source</a></div></div><div class="public anchor" id="var-values-.3F"><h3>values-?</h3><div class="usage"><code>(values-? coll)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/1.2.34/src/io/randomseed/utils/db.clj#L391">view source</a></div></div></div></body></html>