</p></div><dlclass="paramcmts block"><dtclass="param">t</dt><ddclass="cmt"><p>- the record to be deleted</p></dd><dt>returns</dt><ddclass="cmt"><p>int - the number of rows affected by the deletion</p></dd></dl><dlclass="attributes block"><dt>Definition Classes</dt><dd><ahref="../../db/CRUD.html"name="org.bitcoins.db.CRUD"id="org.bitcoins.db.CRUD"class="extype">CRUD</a></dd></dl></div></li><liclass="indented0 "name="org.bitcoins.db.CRUDAction#deleteAction"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="pub"><aid="deleteAction(t:T):CRUDAction.this.profile.api.DBIOAction[Int,CRUDAction.this.profile.api.NoStream,CRUDAction.this.profile.api.Effect.Write]"class="anchorToMember"></a><aid="deleteAction(TestDb):slick.jdbc.JdbcProfile.API.DBIOAction[Int,slick.jdbc.JdbcProfile.API.NoStream,Write]"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../../org/bitcoins/testkit/db/TestDAO.html#deleteAction(t:T):CRUDAction.this.profile.api.DBIOAction[Int,CRUDAction.this.profile.api.NoStream,CRUDAction.this.profile.api.Effect.Write]"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">def</span></span><spanclass="symbol"><spanclass="name">deleteAction</span><spanclass="params">(<spanname="t">t: <ahref="TestDb.html"name="org.bitcoins.testkit.db.TestDb"id="org.bitcoins.testkit.db.TestDb"class="extype">TestDb</a></span>)</span><spanclass="result">: <spanname="slick.lifted.Aliases.DBIOAction"class="extype">slick.jdbc.JdbcProfile.API.DBIOAction</span>[<ahref="https://www.scala-lang.org/api/2.13.8/scala/Int.html#scala.Int"name="scala.Int"id="scala.Int"class="extype">Int</a>, <spanname="slick.lifted.Aliases.NoStream"class="extype">slick.jdbc.JdbcProfile.API.NoStream</span>, <spanname="slick.dbio.Effect.Write"class="extype">Write</span>]</span></span><divclass="fullcomment"><dlclass="attributes block"><dt>Definition Classes</dt><dd><ahref="../../db/CRUDAction.html"name="org.bitcoins.db.CRUDAction"id="org.bitcoins.db.CRUDAction"class="extype">CRUDAction</a></dd></dl></div></li><liclass="indented0 "name="org.bitcoins.db.CRUD#deleteAll"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="pub"><aid="deleteAll():scala.concurrent.Future[Int]"class="anchorToMember"></a><aid="deleteAll():Future[Int]"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../../org/bitcoins/testkit/db/TestDAO.html#deleteAll():scala.concurrent.Future[Int]"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">def</span></span><spanclass="symbol"><spanclass="name">deleteAll</span><spanclass="params">()</span><spanclass="result">: <ahref="https://www.scala-lang.org/api/2.13.8/scala/concurrent/Future.html#scala.concurrent.Future"name="scala.concurrent.Future"id="scala.concurrent.Future"class="extype">Future</a>[<ahref="https://www.scala-lang.org/api/2.13.8/scala/Int.html#scala.Int"name="scala.Int"id="scala.Int"class="extype">Int</a>]</span></span><pclass="shortcomment cmt">delete all records from the table
</p></div><dlclass="attributes block"><dt>Definition Classes</dt><dd><ahref="../../db/CRUD.html"name="org.bitcoins.db.CRUD"id="org.bitcoins.db.CRUD"class="extype">CRUD</a></dd></dl></div></li><liclass="indented0 "name="org.bitcoins.db.CRUD#deleteAll"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="pub"><aid="deleteAll(ts:Vector[T]):scala.concurrent.Future[Int]"class="anchorToMember"></a><aid="deleteAll(Vector[TestDb]):Future[Int]"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../../org/bitcoins/testkit/db/TestDAO.html#deleteAll(ts:Vector[T]):scala.concurrent.Future[Int]"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">def</span></span><spanclass="symbol"><spanclass="name">deleteAll</span><spanclass="params">(<spanname="ts">ts: <ahref="../../../../scala/index.html#Vector[+A]=scala.collection.immutable.Vector[A]"name="scala.Vector"id="scala.Vector"class="extmbr">Vector</a>[<ahref="TestDb.html"name="org.bitcoins.testkit.db.TestDb"id="org.bitcoins.testkit.db.TestDb"class="extype">TestDb</a>]</span>)</span><spanclass="result">: <ahref="https://www.scala-lang.org/api/2.13.8/scala/concurrent/Future.html#scala.concurrent.Future"name="scala.concurrent.Future"id="scala.concurrent.Future"class="extype">Future</a>[<ahref="https://www.scala-lang.org/api/2.13.8/scala/Int.html#scala.Int"name="scala.Int"id="scala.Int"class="extype">Int</a>]</span></span><divclass="fullcomment"><dlclass="attributes block"><dt>Definition Classes</dt><dd><ahref="../../db/CRUD.html"name="org.bitcoins.db.CRUD"id="org.bitcoins.db.CRUD"class="extype">CRUD</a></dd></dl></div></li><liclass="indented0 "name="org.bitcoins.db.CRUDAction#deleteAllAction"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="pub"><aid="deleteAllAction():CRUDAction.this.profile.api.DBIOAction[Int,CRUDAction.this.profile.api.NoStream,CRUDAction.this.profile.api.Effect.WritewithCRUDAction.this.profile.api.Effect.Transactional]"class="anchorToMember"></a><aid="deleteAllAction():slick.jdbc.JdbcProfile.API.DBIOAction[Int,slick.jdbc.JdbcProfile.API.NoStream,WritewithTransactional]"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../../org/bitcoins/testkit/db/TestDAO.html#deleteAllAction():CRUDAction.this.profile.api.DBIOAction[Int,CRUDAction.this.profile.api.NoStream,CRUDAction.this.profile.api.Effect.WritewithCRUDAction.this.profile.api.Effect.Transactional]"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">def</span></span><spanclass="symbol"><spanclass="name">deleteAllAction</span><spanclass="params">()</span><spanclass="result">: <spanname="slick.lifted.Aliases.DBIOAction"class="extype">slick.jdbc.JdbcProfile.API.DBIOAction</span>[<ahref="https://www.scala-lang.org/api/2.13.8/scala/Int.html#scala.Int"name="scala.Int"id="scala.Int"class="extype">Int</a>, <spanname="slick.lifted.Aliases.NoStream"class="extype">slick.jdbc.JdbcProfile.API.NoStream</span>, <spanname="slick.dbio.Effect.Write"class="extype">Write</span> with <spanname="slick.dbio.Effect.Transactional"class="extype">Transactional</span>]</span></span><pclass="shortcomment cmt">WARNING: Deletes all rows in table, use with care</p><divclass="fullcomment"><divclass="comment cmt"><p>WARNING: Deletes all rows in table, use with care</p></div><dlclass="attributes block"><dt>Definition Classes</dt><dd><ahref="../../db/CRUDAction.html"name="org.bitcoins.db.CRUDAction"id="org.bitcoins.db.CRUDAction"class="extype">CRUDAction</a></dd></dl></div></li><liclass="indented0 "name="org.bitcoins.db.CRUDAction#deleteAllAction"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="pub"><aid="deleteAllAction(ts:Vector[T]):CRUDAction.this.profile.api.DBIOAction[Int,CRUDAction.this.profile.api.NoStream,CRUDAction.this.profile.api.Effect.Write]"class="anchorToMember"></a><aid="deleteAllAction(Vector[TestDb]):slick.jdbc.JdbcProfi
</p></div><dlclass="paramcmts block"><dtclass="param">id</dt><ddclass="cmt"><p>- the id of the record to be read</p></dd><dt>returns</dt><ddclass="cmt"><p>Option[T] - the record if found, else none</p></dd></dl><dlclass="attributes block"><dt>Definition Classes</dt><dd><ahref="../../db/CRUD.html"name="org.bitcoins.db.CRUD"id="org.bitcoins.db.CRUD"class="extype">CRUD</a></dd></dl></div></li><liclass="indented0 "name="org.bitcoins.db.CRUD#safeDatabase"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="pub"><aid="safeDatabase:org.bitcoins.db.SafeDatabase"class="anchorToMember"></a><aid="safeDatabase:SafeDatabase"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../../org/bitcoins/testkit/db/TestDAO.html#safeDatabase:org.bitcoins.db.SafeDatabase"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">def</span></span><spanclass="symbol"><spanclass="name">safeDatabase</span><spanclass="result">: <ahref="../../db/SafeDatabase.html"name="org.bitcoins.db.SafeDatabase"id="org.bitcoins.db.SafeDatabase"class="extype">SafeDatabase</a></span></span><pclass="shortcomment cmt">Binding to the actual database itself, this is what is used to run querys</p><divclass="fullcomment"><divclass="comment cmt"><p>Binding to the actual database itself, this is what is used to run querys</p></div><dlclass="attributes block"><dt>Definition Classes</dt><dd><ahref="../../db/CRUD.html"name="org.bitcoins.db.CRUD"id="org.bitcoins.db.CRUD"class="extype">CRUD</a></dd></dl></div></li><liclass="indented0 "name="org.bitcoins.db.CRUD#schemaName"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="pub"><aid="schemaName:Option[String]"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../../org/bitcoins/testkit/db/TestDAO.html#schemaName:Option[String]"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">val</span></span><spanclass="symbol"><spanclass="name">schemaName</span><spanclass="result">: <ahref="https://www.scala-lang.org/api/2.13.8/scala/Option.html#scala.Option"name="scala.Option"id="scala.Option"class="extype">Option</a>[<spanname="scala.Predef.String"class="extype">String</span>]</span></span><divclass="fullcomment"><dlclass="attributes block"><dt>Definition Classes</dt><dd><ahref="../../db/CRUD.html"name="org.bitcoins.db.CRUD"id="org.bitcoins.db.CRUD"class="extype">CRUD</a></dd></dl></div></li><liclass="indented0 "name="org.bitcoins.db.JdbcProfileComponent#startHikariLogger"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="prt"><aid="startHikariLogger(interval:scala.concurrent.duration.Duration):org.bitcoins.db.HikariLogging"class="anchorToMember"></a><aid="startHikariLogger(Duration):HikariLogging"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../../org/bitcoins/testkit/db/TestDAO.html#startHikariLogger(interval:scala.concurrent.duration.Duration):org.bitcoins.db.HikariLogging"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">def</span></span><spanclass="symbol"><spanclass="name">startHikariLogger</span><spanclass="params">(<spanname="interval">interval: <ahref="https://www.scala-lang.org/api/2.13.8/scala/concurrent/duration/Duration.html#scala.concurrent.duration.Duration"name="scala.concurrent.duration.Duration"id="scala.concurrent.duration.Duration"class="extype">Duration</a></span>)</span><spanclass="result">: <ahref="../../db/HikariLogging.html"name="org.bitcoins.db.HikariLogging"id="org.bitcoins.db.HikariLogging"class="extype">HikariLogging</a></span></span><pclass="shortcomment cmt">Starts the background logger for hikari</p><divclass="fullcomment"><divclass="comment cmt"><p>Starts the background logger for hikari</p></div><dlclass="paramcmts block"><dtclass="param">interval</dt><ddclass="cmt"><p>- how often hikari
versions of them (e.g. AddressDAO().table). You'll notice that although the latter is a subtype
of the first, this requires a cast since TableQuery is not covariant in its type parameter.</p><p>However, since Query is covariant in its first type parameter, I believe the cast from
TableQuery[T1] to TableQuery[T2] will always be safe so long as T1 is a subtype of T2
AND T1#TableElementType is equal to T2#TableElementType.</p><p>The above conditions are always the case when this is called within DAOs as it is only
ever used for things of the form TableQuery[XDAO().table] -> TableQuery[XDAO#XTable].
</p></div><dlclass="attributes block"><dt>Definition Classes</dt><dd><ahref="../../db/CRUDAction.html"name="org.bitcoins.db.CRUDAction"id="org.bitcoins.db.CRUDAction"class="extype">CRUDAction</a></dd></dl></div></li><liclass="indented0 "name="org.bitcoins.db.CRUD#upsert"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="pub"><aid="upsert(t:T):scala.concurrent.Future[T]"class="anchorToMember"></a><aid="upsert(TestDb):Future[TestDb]"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../../org/bitcoins/testkit/db/TestDAO.html#upsert(t:T):scala.concurrent.Future[T]"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">def</span></span><spanclass="symbol"><spanclass="name">upsert</span><spanclass="params">(<spanname="t">t: <ahref="TestDb.html"name="org.bitcoins.testkit.db.TestDb"id="org.bitcoins.testkit.db.TestDb"class="extype">TestDb</a></span>)</span><spanclass="result">: <ahref="https://www.scala-lang.org/api/2.13.8/scala/concurrent/Future.html#scala.concurrent.Future"name="scala.concurrent.Future"id="scala.concurrent.Future"class="extype">Future</a>[<ahref="TestDb.html"name="org.bitcoins.testkit.db.TestDb"id="org.bitcoins.testkit.db.TestDb"class="extype">TestDb</a>]</span></span><pclass="shortcomment cmt">insert the record if it does not exist, update it if it does
</p></div><dlclass="paramcmts block"><dtclass="param">t</dt><ddclass="cmt"><p>- the record to inserted / updated</p></dd><dt>returns</dt><ddclass="cmt"><p>t - the record that has been inserted / updated</p></dd></dl><dlclass="attributes block"><dt>Definition Classes</dt><dd><ahref="../../db/CRUD.html"name="org.bitcoins.db.CRUD"id="org.bitcoins.db.CRUD"class="extype">CRUD</a></dd></dl></div></li><liclass="indented0 "name="org.bitcoins.db.CRUDAction#upsertAction"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="pub"><aid="upsertAction(t:T):CRUDAction.this.profile.api.DBIOAction[T,CRUDAction.this.profile.api.NoStream,CRUDAction.this.profile.api.Effect.WritewithCRUDAction.this.profile.api.Effect.Read]"class="anchorToMember"></a><aid="upsertAction(TestDb):slick.jdbc.JdbcProfile.API.DBIOAction[TestDb,slick.jdbc.JdbcProfile.API.NoStream,WritewithRead]"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../../org/bitcoins/testkit/db/TestDAO.html#upsertAction(t:T):CRUDAction.this.profile.api.DBIOAction[T,CRUDAction.this.profile.api.NoStream,CRUDAction.this.profile.api.Effect.WritewithCRUDAction.this.profile.api.Effect.Read]"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">def</span></span><spanclass="symbol"><spanclass="name">upsertAction</span><spanclass="params">(<spanname="t">t: <ahref="TestDb.html"name="org.bitcoins.testkit.db.TestDb"id="org.bitcoins.testkit.db.TestDb"class="extype">TestDb</a></span>)</span><spanclass="result">: <spanname="slick.lifted.Aliases.DBIOAction"class="extype">slick.jdbc.JdbcProfile.API.DBIOAction</span>[<ahref="TestDb.html"name="org.bitcoins.testkit.db.TestDb"id="org.bitcoins.testkit.db.TestDb"class="extype">TestDb</a>, <spanname="slick.lifted.Aliases.NoStream"class="extype">slick.jdbc.JdbcProfile.API.NoStream</span>, <spanname="slick.dbio.Effect.Write"class="extype">Write</span> with <spanname="slick.dbio.Effect.Read"class="extype">Read</span>]</span></span><divclass="fullcomment"><dlclass="attributes block"><dt>Definition Classes</dt><dd><ahref="../../db/CRUDAction.html"name="org.bitcoins.db.CRUDAction"id="org.bitcoins.db.CRUDAction"class="extype">CRUDAction</a></dd></dl></div></li><liclass="indented0 "name="org.bitcoins.db.CRUD#upsertAll"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="pub"><aid="upsertAll(ts:Vector[T]):scala.concurrent.Future[Vector[T]]"class="anchorToMember"></a><aid="upsertAll(Vector[TestDb]):Future[Vector[TestDb]]"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../../org/bitcoins/testkit/db/TestDAO.html#upsertAll(ts:Vector[T]):scala.concurrent.Future[Vector[T]]"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">def</span></span><spanclass="symbol"><spanclass="name">upsertAll</span><spanclass="params">(<spanname="ts">ts: <ahref="../../../../scala/index.html#Vector[+A]=scala.collection.immutable.Vector[A]"name="scala.Vector"id="scala.Vector"class="extmbr">Vector</a>[<ahref="TestDb.html"name="org.bitcoins.testkit.db.TestDb"id="org.bitcoins.testkit.db.TestDb"class="extype">TestDb</a>]</span>)</span><spanclass="result">: <ahref="https://www.scala-lang.org/api/2.13.8/scala/concurrent/Future.html#scala.concurrent.Future"name="scala.concurrent.Future"id="scala.concurrent.Future"class="extype">Future</a>[<ahref="../../../../scala/index.html#Vector[+A]=scala.collection.immutable.Vector[A]"name="scala.Vector"id="scala.Vector"class="extmbr">Vector</a>[<ahref="TestDb.html"name="org.bitcoins.testkit.db.TestDb"id="org.bitcoins.testkit.db.TestDb"class="extype">TestDb</a>]]</span></span><pclass="shortcomment cmt">Upserts all of the given ts in the database, then returns the upserted values</p><divclass="fullcomment"><divclass="comment cmt"><p>Upserts all of the given ts in the database, then returns the upserted values</p></div><dlclass="attributes block"><dt>Definition Cla