From 00b1c85e65a0b512fd7eda9ec78c1fea49150f15 Mon Sep 17 00:00:00 2001 From: Chris Stewart Date: Tue, 15 Oct 2024 07:31:26 -0500 Subject: [PATCH] Remove TableAutoInc[T] type parameter, its unnecessary and causes issues (#5711) --- .../src/main/scala/org/bitcoins/db/CRUDAutoInc.scala | 8 ++++---- .../dlc/wallet/models/OracleAnnouncementDataDAO.scala | 2 +- .../org/bitcoins/wallet/models/ScriptPubKeyDAO.scala | 2 +- .../org/bitcoins/wallet/models/SpendingInfoDAO.scala | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/db-commons/src/main/scala/org/bitcoins/db/CRUDAutoInc.scala b/db-commons/src/main/scala/org/bitcoins/db/CRUDAutoInc.scala index 4787366557..4be374b63b 100644 --- a/db-commons/src/main/scala/org/bitcoins/db/CRUDAutoInc.scala +++ b/db-commons/src/main/scala/org/bitcoins/db/CRUDAutoInc.scala @@ -12,7 +12,7 @@ abstract class CRUDAutoInc[T <: DbRowAutoInc[T]](implicit import profile.api._ /** The table inside our database we are inserting into */ - override val table: profile.api.TableQuery[_ <: TableAutoInc[T]] + override val table: profile.api.TableQuery[? <: TableAutoInc] override def createAllAction( ts: Vector[T] @@ -33,12 +33,12 @@ abstract class CRUDAutoInc[T <: DbRowAutoInc[T]](implicit override protected def findByPrimaryKey( id: Long - ): Query[TableAutoInc[T], T, Seq] = + ): Query[TableAutoInc, T, Seq] = table.filter(_.id === id) override def findByPrimaryKeys( ids: Vector[Long] - ): Query[TableAutoInc[T], T, Seq] = { + ): Query[TableAutoInc, T, Seq] = { table.filter { t => t.id.inSet(ids) } @@ -60,7 +60,7 @@ abstract class CRUDAutoInc[T <: DbRowAutoInc[T]](implicit trait TableAutoIncComponent[T <: DbRowAutoInc[T]] { self: CRUDAutoInc[T] => import profile.api._ - abstract class TableAutoInc[T]( + abstract class TableAutoInc( tag: profile.api.Tag, schemaName: Option[String], tableName: String diff --git a/dlc-wallet/src/main/scala/org/bitcoins/dlc/wallet/models/OracleAnnouncementDataDAO.scala b/dlc-wallet/src/main/scala/org/bitcoins/dlc/wallet/models/OracleAnnouncementDataDAO.scala index ad4cfd8c8d..a4ef88356b 100644 --- a/dlc-wallet/src/main/scala/org/bitcoins/dlc/wallet/models/OracleAnnouncementDataDAO.scala +++ b/dlc-wallet/src/main/scala/org/bitcoins/dlc/wallet/models/OracleAnnouncementDataDAO.scala @@ -52,7 +52,7 @@ case class OracleAnnouncementDataDAO()(implicit } class OracleAnnouncementsTable(tag: Tag) - extends TableAutoInc[OracleAnnouncementDataDb]( + extends TableAutoInc( tag, schemaName, "oracle_announcement_data" diff --git a/wallet/src/main/scala/org/bitcoins/wallet/models/ScriptPubKeyDAO.scala b/wallet/src/main/scala/org/bitcoins/wallet/models/ScriptPubKeyDAO.scala index 68bc645aea..4aba2c39ba 100644 --- a/wallet/src/main/scala/org/bitcoins/wallet/models/ScriptPubKeyDAO.scala +++ b/wallet/src/main/scala/org/bitcoins/wallet/models/ScriptPubKeyDAO.scala @@ -72,7 +72,7 @@ case class ScriptPubKeyDAO()(implicit } case class ScriptPubKeyTable(tag: Tag) - extends TableAutoInc[ScriptPubKeyDb](tag, schemaName, "pub_key_scripts") { + extends TableAutoInc(tag, schemaName, "pub_key_scripts") { def scriptPubKey: Rep[ScriptPubKey] = column("script_pub_key") diff --git a/wallet/src/main/scala/org/bitcoins/wallet/models/SpendingInfoDAO.scala b/wallet/src/main/scala/org/bitcoins/wallet/models/SpendingInfoDAO.scala index 610c9952e0..5741eaa866 100644 --- a/wallet/src/main/scala/org/bitcoins/wallet/models/SpendingInfoDAO.scala +++ b/wallet/src/main/scala/org/bitcoins/wallet/models/SpendingInfoDAO.scala @@ -774,7 +774,7 @@ case class SpendingInfoDAO()(implicit * of the transaction that created this output. */ case class SpendingInfoTable(tag: Tag) - extends TableAutoInc[UTXORecord](tag, schemaName, "txo_spending_info") { + extends TableAutoInc(tag, schemaName, "txo_spending_info") { def outPoint: Rep[TransactionOutPoint] = column("tx_outpoint", O.Unique)