mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2024-11-19 01:40:55 +01:00
Remove TableAutoInc[T] type parameter, its unnecessary and causes issues (#5711)
This commit is contained in:
parent
3ef88ecdc2
commit
00b1c85e65
@ -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
|
||||
|
@ -52,7 +52,7 @@ case class OracleAnnouncementDataDAO()(implicit
|
||||
}
|
||||
|
||||
class OracleAnnouncementsTable(tag: Tag)
|
||||
extends TableAutoInc[OracleAnnouncementDataDb](
|
||||
extends TableAutoInc(
|
||||
tag,
|
||||
schemaName,
|
||||
"oracle_announcement_data"
|
||||
|
@ -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")
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user