Remove TableAutoInc[T] type parameter, its unnecessary and causes issues (#5711)

This commit is contained in:
Chris Stewart 2024-10-15 07:31:26 -05:00 committed by GitHub
parent 3ef88ecdc2
commit 00b1c85e65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -52,7 +52,7 @@ case class OracleAnnouncementDataDAO()(implicit
}
class OracleAnnouncementsTable(tag: Tag)
extends TableAutoInc[OracleAnnouncementDataDb](
extends TableAutoInc(
tag,
schemaName,
"oracle_announcement_data"

View File

@ -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")

View File

@ -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)