scalikejdbc.OneToManies17SQL.scala Maven / Gradle / Ivy
/*
* Copyright 2013 - 2015 scalikejdbc.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package scalikejdbc
import scala.collection.mutable.LinkedHashMap
import scala.collection.compat._
private[scalikejdbc] trait OneToManies17Extractor[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E <: WithExtractor, Z]
extends SQL[Z, E]
with RelationalSQLResultSetOperations[Z] {
private[scalikejdbc] def extractOne: WrappedResultSet => A
private[scalikejdbc] def extractTo1: WrappedResultSet => Option[B1]
private[scalikejdbc] def extractTo2: WrappedResultSet => Option[B2]
private[scalikejdbc] def extractTo3: WrappedResultSet => Option[B3]
private[scalikejdbc] def extractTo4: WrappedResultSet => Option[B4]
private[scalikejdbc] def extractTo5: WrappedResultSet => Option[B5]
private[scalikejdbc] def extractTo6: WrappedResultSet => Option[B6]
private[scalikejdbc] def extractTo7: WrappedResultSet => Option[B7]
private[scalikejdbc] def extractTo8: WrappedResultSet => Option[B8]
private[scalikejdbc] def extractTo9: WrappedResultSet => Option[B9]
private[scalikejdbc] def extractTo10: WrappedResultSet => Option[B10]
private[scalikejdbc] def extractTo11: WrappedResultSet => Option[B11]
private[scalikejdbc] def extractTo12: WrappedResultSet => Option[B12]
private[scalikejdbc] def extractTo13: WrappedResultSet => Option[B13]
private[scalikejdbc] def extractTo14: WrappedResultSet => Option[B14]
private[scalikejdbc] def extractTo15: WrappedResultSet => Option[B15]
private[scalikejdbc] def extractTo16: WrappedResultSet => Option[B16]
private[scalikejdbc] def extractTo17: WrappedResultSet => Option[B17]
private[scalikejdbc] def transform: (A, scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17]) => Z
private[scalikejdbc] def processResultSet(result: (LinkedHashMap[A, (scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17])]),
rs: WrappedResultSet): LinkedHashMap[A, (scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17])] = {
val o = extractOne(rs)
val (to1, to2, to3, to4, to5, to6, to7, to8, to9, to10, to11, to12, to13, to14, to15, to16, to17) = (extractTo1(rs), extractTo2(rs), extractTo3(rs), extractTo4(rs), extractTo5(rs), extractTo6(rs), extractTo7(rs), extractTo8(rs), extractTo9(rs), extractTo10(rs), extractTo11(rs), extractTo12(rs), extractTo13(rs), extractTo14(rs), extractTo15(rs), extractTo16(rs), extractTo17(rs))
if (result.contains(o)) {
(to1 orElse to2 orElse to3 orElse to4 orElse to5 orElse to6 orElse to7 orElse to8 orElse to9 orElse to10 orElse to11 orElse to12 orElse to13 orElse to14 orElse to15 orElse to16 orElse to17).map { _ =>
val (ts1, ts2, ts3, ts4, ts5, ts6, ts7, ts8, ts9, ts10, ts11, ts12, ts13, ts14, ts15, ts16, ts17) = result.apply(o)
result += (o -> ((
to1.map(t => if (ts1.contains(t)) ts1 else ts1 :+ t).getOrElse(ts1),
to2.map(t => if (ts2.contains(t)) ts2 else ts2 :+ t).getOrElse(ts2),
to3.map(t => if (ts3.contains(t)) ts3 else ts3 :+ t).getOrElse(ts3),
to4.map(t => if (ts4.contains(t)) ts4 else ts4 :+ t).getOrElse(ts4),
to5.map(t => if (ts5.contains(t)) ts5 else ts5 :+ t).getOrElse(ts5),
to6.map(t => if (ts6.contains(t)) ts6 else ts6 :+ t).getOrElse(ts6),
to7.map(t => if (ts7.contains(t)) ts7 else ts7 :+ t).getOrElse(ts7),
to8.map(t => if (ts8.contains(t)) ts8 else ts8 :+ t).getOrElse(ts8),
to9.map(t => if (ts9.contains(t)) ts9 else ts9 :+ t).getOrElse(ts9),
to10.map(t => if (ts10.contains(t)) ts10 else ts10 :+ t).getOrElse(ts10),
to11.map(t => if (ts11.contains(t)) ts11 else ts11 :+ t).getOrElse(ts11),
to12.map(t => if (ts12.contains(t)) ts12 else ts12 :+ t).getOrElse(ts12),
to13.map(t => if (ts13.contains(t)) ts13 else ts13 :+ t).getOrElse(ts13),
to14.map(t => if (ts14.contains(t)) ts14 else ts14 :+ t).getOrElse(ts14),
to15.map(t => if (ts15.contains(t)) ts15 else ts15 :+ t).getOrElse(ts15),
to16.map(t => if (ts16.contains(t)) ts16 else ts16 :+ t).getOrElse(ts16),
to17.map(t => if (ts17.contains(t)) ts17 else ts17 :+ t).getOrElse(ts17)
)))
}.getOrElse(result)
} else {
result += (
o -> ((
to1.map(t => Vector(t)).getOrElse(Vector.empty),
to2.map(t => Vector(t)).getOrElse(Vector.empty),
to3.map(t => Vector(t)).getOrElse(Vector.empty),
to4.map(t => Vector(t)).getOrElse(Vector.empty),
to5.map(t => Vector(t)).getOrElse(Vector.empty),
to6.map(t => Vector(t)).getOrElse(Vector.empty),
to7.map(t => Vector(t)).getOrElse(Vector.empty),
to8.map(t => Vector(t)).getOrElse(Vector.empty),
to9.map(t => Vector(t)).getOrElse(Vector.empty),
to10.map(t => Vector(t)).getOrElse(Vector.empty),
to11.map(t => Vector(t)).getOrElse(Vector.empty),
to12.map(t => Vector(t)).getOrElse(Vector.empty),
to13.map(t => Vector(t)).getOrElse(Vector.empty),
to14.map(t => Vector(t)).getOrElse(Vector.empty),
to15.map(t => Vector(t)).getOrElse(Vector.empty),
to16.map(t => Vector(t)).getOrElse(Vector.empty),
to17.map(t => Vector(t)).getOrElse(Vector.empty)
))
)
}
}
private[scalikejdbc] def toIterable(session: DBSession, sql: String, params: scala.collection.Seq[?], zExtractor: (A, scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17]) => Z): Iterable[Z] = {
val attributesSwitcher = createDBSessionAttributesSwitcher
DBSessionWrapper(session, attributesSwitcher).foldLeft(statement, rawParameters.toSeq*)(LinkedHashMap[A, (scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17])]())(processResultSet).map {
case (one, (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17)) => zExtractor(one, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17)
}
}
}
class OneToManies17SQL[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E <: WithExtractor, Z](
override val statement: String,
override val rawParameters: scala.collection.Seq[Any])(val one: WrappedResultSet => A)(val to1: WrappedResultSet => Option[B1], val to2: WrappedResultSet => Option[B2], val to3: WrappedResultSet => Option[B3], val to4: WrappedResultSet => Option[B4], val to5: WrappedResultSet => Option[B5], val to6: WrappedResultSet => Option[B6], val to7: WrappedResultSet => Option[B7], val to8: WrappedResultSet => Option[B8], val to9: WrappedResultSet => Option[B9], val to10: WrappedResultSet => Option[B10], val to11: WrappedResultSet => Option[B11], val to12: WrappedResultSet => Option[B12], val to13: WrappedResultSet => Option[B13], val to14: WrappedResultSet => Option[B14], val to15: WrappedResultSet => Option[B15], val to16: WrappedResultSet => Option[B16], val to17: WrappedResultSet => Option[B17])(val zExtractor: (A, scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17]) => Z)
extends SQL[Z, E](statement, rawParameters)(SQL.noExtractor[Z]("one-to-many extractor(one(RS => A).toManies(RS => Option[B1]...)) is specified, use #map((A,B) =>Z) instead."))
with AllOutputDecisionsUnsupported[Z, E] {
def map(zExtractor: (A, scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17]) => Z): OneToManies17SQL[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, HasExtractor, Z] = {
val q: OneToManies17SQL[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, HasExtractor, Z] = new OneToManies17SQL(statement, rawParameters)(one)(to1, to2, to3, to4, to5, to6, to7, to8, to9, to10, to11, to12, to13, to14, to15, to16, to17)(zExtractor)
q.queryTimeout(queryTimeout)
q.fetchSize(fetchSize)
q.tags(tags.toSeq*)
q
}
override def toIterable: OneToManies17SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] = {
val q: OneToManies17SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] =new OneToManies17SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z](statement, rawParameters)(one)(to1, to2, to3, to4, to5, to6, to7, to8, to9, to10, to11, to12, to13, to14, to15, to16, to17)(zExtractor)
q.queryTimeout(queryTimeout)
q.fetchSize(fetchSize)
q.tags(tags.toSeq*)
q
}
override def toList: OneToManies17SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] = {
val q: OneToManies17SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] = new OneToManies17SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z](statement, rawParameters)(one)(to1, to2, to3, to4, to5, to6, to7, to8, to9, to10, to11, to12, to13, to14, to15, to16, to17)(zExtractor)
q.queryTimeout(queryTimeout)
q.fetchSize(fetchSize)
q.tags(tags.toSeq*)
q
}
override def toOption: OneToManies17SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] = {
val q: OneToManies17SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] = new OneToManies17SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z](statement, rawParameters)(one)(to1, to2, to3, to4, to5, to6, to7, to8, to9, to10, to11, to12, to13, to14, to15, to16, to17)(zExtractor)(true)
q.queryTimeout(queryTimeout)
q.fetchSize(fetchSize)
q.tags(tags.toSeq*)
q
}
override def headOption: OneToManies17SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] = {
val q: OneToManies17SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] = new OneToManies17SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z](statement, rawParameters)(one)(to1, to2, to3, to4, to5, to6, to7, to8, to9, to10, to11, to12, to13, to14, to15, to16, to17)(zExtractor)(false)
q.queryTimeout(queryTimeout)
q.fetchSize(fetchSize)
q.tags(tags.toSeq*)
q
}
override def toCollection: OneToManies17SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] = {
val q: OneToManies17SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] = new OneToManies17SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z](statement, rawParameters)(one)(to1, to2, to3, to4, to5, to6, to7, to8, to9, to10, to11, to12, to13, to14, to15, to16, to17)(zExtractor)
q.queryTimeout(queryTimeout)
q.fetchSize(fetchSize)
q.tags(tags.toSeq*)
q
}
override def single: OneToManies17SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] = toOption
override def first: OneToManies17SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] = headOption
override def list: OneToManies17SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] = toList
override def iterable: OneToManies17SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] = toIterable
override def collection: OneToManies17SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] = toCollection
}
object OneToManies17SQL {
def unapply[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E <: WithExtractor, Z](sqlObject: OneToManies17SQL[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z]): Some[(String, scala.collection.Seq[Any], WrappedResultSet => A, (WrappedResultSet => Option[B1], WrappedResultSet => Option[B2], WrappedResultSet => Option[B3], WrappedResultSet => Option[B4], WrappedResultSet => Option[B5], WrappedResultSet => Option[B6], WrappedResultSet => Option[B7], WrappedResultSet => Option[B8], WrappedResultSet => Option[B9], WrappedResultSet => Option[B10], WrappedResultSet => Option[B11], WrappedResultSet => Option[B12], WrappedResultSet => Option[B13], WrappedResultSet => Option[B14], WrappedResultSet => Option[B15], WrappedResultSet => Option[B16], WrappedResultSet => Option[B17]), (A, scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17]) => Z)] = {
Some((sqlObject.statement, sqlObject.rawParameters, sqlObject.one, (sqlObject.to1, sqlObject.to2, sqlObject.to3, sqlObject.to4, sqlObject.to5, sqlObject.to6, sqlObject.to7, sqlObject.to8, sqlObject.to9, sqlObject.to10, sqlObject.to11, sqlObject.to12, sqlObject.to13, sqlObject.to14, sqlObject.to15, sqlObject.to16, sqlObject.to17), sqlObject.zExtractor))
}
}
class OneToManies17SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E <: WithExtractor, Z](
override val statement: String,
override val rawParameters: scala.collection.Seq[Any])(val one: WrappedResultSet => A)(val to1: WrappedResultSet => Option[B1], val to2: WrappedResultSet => Option[B2], val to3: WrappedResultSet => Option[B3], val to4: WrappedResultSet => Option[B4], val to5: WrappedResultSet => Option[B5], val to6: WrappedResultSet => Option[B6], val to7: WrappedResultSet => Option[B7], val to8: WrappedResultSet => Option[B8], val to9: WrappedResultSet => Option[B9], val to10: WrappedResultSet => Option[B10], val to11: WrappedResultSet => Option[B11], val to12: WrappedResultSet => Option[B12], val to13: WrappedResultSet => Option[B13], val to14: WrappedResultSet => Option[B14], val to15: WrappedResultSet => Option[B15], val to16: WrappedResultSet => Option[B16], val to17: WrappedResultSet => Option[B17])(val zExtractor: (A, scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17]) => Z)
extends SQL[Z, E](statement, rawParameters)(SQL.noExtractor[Z]("one-to-many extractor(one(RS => A).toManies(RS => Option[B1])) is specified, use #map((A,B) =>Z) instead."))
with SQLToList[Z, E]
with AllOutputDecisionsUnsupported[Z, E]
with OneToManies17Extractor[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] {
import GeneralizedTypeConstraintsForWithExtractor._
override def apply()(implicit session: DBSession, context: ConnectionPoolContext = NoConnectionPoolContext, hasExtractor: ThisSQL =:= SQLWithExtractor): List[Z] = {
executeQuery[List](session, (session: DBSession) => toIterable(session, statement, rawParameters, zExtractor).toList)
}
private[scalikejdbc] def extractOne: WrappedResultSet => A = one
private[scalikejdbc] def extractTo1: WrappedResultSet => Option[B1] = to1
private[scalikejdbc] def extractTo2: WrappedResultSet => Option[B2] = to2
private[scalikejdbc] def extractTo3: WrappedResultSet => Option[B3] = to3
private[scalikejdbc] def extractTo4: WrappedResultSet => Option[B4] = to4
private[scalikejdbc] def extractTo5: WrappedResultSet => Option[B5] = to5
private[scalikejdbc] def extractTo6: WrappedResultSet => Option[B6] = to6
private[scalikejdbc] def extractTo7: WrappedResultSet => Option[B7] = to7
private[scalikejdbc] def extractTo8: WrappedResultSet => Option[B8] = to8
private[scalikejdbc] def extractTo9: WrappedResultSet => Option[B9] = to9
private[scalikejdbc] def extractTo10: WrappedResultSet => Option[B10] = to10
private[scalikejdbc] def extractTo11: WrappedResultSet => Option[B11] = to11
private[scalikejdbc] def extractTo12: WrappedResultSet => Option[B12] = to12
private[scalikejdbc] def extractTo13: WrappedResultSet => Option[B13] = to13
private[scalikejdbc] def extractTo14: WrappedResultSet => Option[B14] = to14
private[scalikejdbc] def extractTo15: WrappedResultSet => Option[B15] = to15
private[scalikejdbc] def extractTo16: WrappedResultSet => Option[B16] = to16
private[scalikejdbc] def extractTo17: WrappedResultSet => Option[B17] = to17
private[scalikejdbc] def transform: (A, scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17]) => Z = zExtractor
}
object OneToManies17SQLToList {
def unapply[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E <: WithExtractor, Z](sqlObject: OneToManies17SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z]): Some[(String, scala.collection.Seq[Any], WrappedResultSet => A, (WrappedResultSet => Option[B1], WrappedResultSet => Option[B2], WrappedResultSet => Option[B3], WrappedResultSet => Option[B4], WrappedResultSet => Option[B5], WrappedResultSet => Option[B6], WrappedResultSet => Option[B7], WrappedResultSet => Option[B8], WrappedResultSet => Option[B9], WrappedResultSet => Option[B10], WrappedResultSet => Option[B11], WrappedResultSet => Option[B12], WrappedResultSet => Option[B13], WrappedResultSet => Option[B14], WrappedResultSet => Option[B15], WrappedResultSet => Option[B16], WrappedResultSet => Option[B17]), (A, scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17]) => Z)] = {
Some((sqlObject.statement, sqlObject.rawParameters, sqlObject.one, (sqlObject.to1, sqlObject.to2, sqlObject.to3, sqlObject.to4, sqlObject.to5, sqlObject.to6, sqlObject.to7, sqlObject.to8, sqlObject.to9, sqlObject.to10, sqlObject.to11, sqlObject.to12, sqlObject.to13, sqlObject.to14, sqlObject.to15, sqlObject.to16, sqlObject.to17), sqlObject.zExtractor))
}
}
final class OneToManies17SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E <: WithExtractor, Z] private[scalikejdbc](
override val statement: String,
override val rawParameters: scala.collection.Seq[Any])(val one: WrappedResultSet => A)(val to1: WrappedResultSet => Option[B1], val to2: WrappedResultSet => Option[B2], val to3: WrappedResultSet => Option[B3], val to4: WrappedResultSet => Option[B4], val to5: WrappedResultSet => Option[B5], val to6: WrappedResultSet => Option[B6], val to7: WrappedResultSet => Option[B7], val to8: WrappedResultSet => Option[B8], val to9: WrappedResultSet => Option[B9], val to10: WrappedResultSet => Option[B10], val to11: WrappedResultSet => Option[B11], val to12: WrappedResultSet => Option[B12], val to13: WrappedResultSet => Option[B13], val to14: WrappedResultSet => Option[B14], val to15: WrappedResultSet => Option[B15], val to16: WrappedResultSet => Option[B16], val to17: WrappedResultSet => Option[B17])(val zExtractor: (A, scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17]) => Z)
extends SQL[Z, E](statement, rawParameters)(SQL.noExtractor[Z]("one-to-many extractor(one(RS => A).toManies(RS => Option[B1])) is specified, use #map((A,B) =>Z) instead."))
with SQLToCollection[Z, E]
with AllOutputDecisionsUnsupported[Z, E]
with OneToManies17Extractor[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] {
import GeneralizedTypeConstraintsForWithExtractor._
override def apply[C[_]]()(implicit session: DBSession, context: ConnectionPoolContext = NoConnectionPoolContext, hasExtractor: ThisSQL =:= SQLWithExtractor, f: Factory[Z, C[Z]]): C[Z] = {
executeQuery(session, (session: DBSession) => f.fromSpecific(toIterable(session, statement, rawParameters, zExtractor)))
}
private[scalikejdbc] def extractOne: WrappedResultSet => A = one
private[scalikejdbc] def extractTo1: WrappedResultSet => Option[B1] = to1
private[scalikejdbc] def extractTo2: WrappedResultSet => Option[B2] = to2
private[scalikejdbc] def extractTo3: WrappedResultSet => Option[B3] = to3
private[scalikejdbc] def extractTo4: WrappedResultSet => Option[B4] = to4
private[scalikejdbc] def extractTo5: WrappedResultSet => Option[B5] = to5
private[scalikejdbc] def extractTo6: WrappedResultSet => Option[B6] = to6
private[scalikejdbc] def extractTo7: WrappedResultSet => Option[B7] = to7
private[scalikejdbc] def extractTo8: WrappedResultSet => Option[B8] = to8
private[scalikejdbc] def extractTo9: WrappedResultSet => Option[B9] = to9
private[scalikejdbc] def extractTo10: WrappedResultSet => Option[B10] = to10
private[scalikejdbc] def extractTo11: WrappedResultSet => Option[B11] = to11
private[scalikejdbc] def extractTo12: WrappedResultSet => Option[B12] = to12
private[scalikejdbc] def extractTo13: WrappedResultSet => Option[B13] = to13
private[scalikejdbc] def extractTo14: WrappedResultSet => Option[B14] = to14
private[scalikejdbc] def extractTo15: WrappedResultSet => Option[B15] = to15
private[scalikejdbc] def extractTo16: WrappedResultSet => Option[B16] = to16
private[scalikejdbc] def extractTo17: WrappedResultSet => Option[B17] = to17
private[scalikejdbc] def transform: (A, scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17]) => Z = zExtractor
}
object OneToManies17SQLToCollection {
def unapply[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E <: WithExtractor, Z](sqlObject: OneToManies17SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z]): Some[(String, scala.collection.Seq[Any], WrappedResultSet => A, (WrappedResultSet => Option[B1], WrappedResultSet => Option[B2], WrappedResultSet => Option[B3], WrappedResultSet => Option[B4], WrappedResultSet => Option[B5], WrappedResultSet => Option[B6], WrappedResultSet => Option[B7], WrappedResultSet => Option[B8], WrappedResultSet => Option[B9], WrappedResultSet => Option[B10], WrappedResultSet => Option[B11], WrappedResultSet => Option[B12], WrappedResultSet => Option[B13], WrappedResultSet => Option[B14], WrappedResultSet => Option[B15], WrappedResultSet => Option[B16], WrappedResultSet => Option[B17]), (A, scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17]) => Z)] = {
Some((sqlObject.statement, sqlObject.rawParameters, sqlObject.one, (sqlObject.to1, sqlObject.to2, sqlObject.to3, sqlObject.to4, sqlObject.to5, sqlObject.to6, sqlObject.to7, sqlObject.to8, sqlObject.to9, sqlObject.to10, sqlObject.to11, sqlObject.to12, sqlObject.to13, sqlObject.to14, sqlObject.to15, sqlObject.to16, sqlObject.to17), sqlObject.zExtractor))
}
}
class OneToManies17SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E <: WithExtractor, Z](
override val statement: String,
override val rawParameters: scala.collection.Seq[Any])(val one: WrappedResultSet => A)(val to1: WrappedResultSet => Option[B1], val to2: WrappedResultSet => Option[B2], val to3: WrappedResultSet => Option[B3], val to4: WrappedResultSet => Option[B4], val to5: WrappedResultSet => Option[B5], val to6: WrappedResultSet => Option[B6], val to7: WrappedResultSet => Option[B7], val to8: WrappedResultSet => Option[B8], val to9: WrappedResultSet => Option[B9], val to10: WrappedResultSet => Option[B10], val to11: WrappedResultSet => Option[B11], val to12: WrappedResultSet => Option[B12], val to13: WrappedResultSet => Option[B13], val to14: WrappedResultSet => Option[B14], val to15: WrappedResultSet => Option[B15], val to16: WrappedResultSet => Option[B16], val to17: WrappedResultSet => Option[B17])(val zExtractor: (A, scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17]) => Z)
extends SQL[Z, E](statement, rawParameters)(SQL.noExtractor[Z]("one-to-many extractor(one(RS => A).toMany(RS => Option[B1])) is specified, use #map((A,B) =>Z) instead."))
with SQLToIterable[Z, E]
with AllOutputDecisionsUnsupported[Z, E]
with OneToManies17Extractor[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] {
import GeneralizedTypeConstraintsForWithExtractor._
override def apply()(implicit session: DBSession, context: ConnectionPoolContext = NoConnectionPoolContext, hasExtractor: ThisSQL =:= SQLWithExtractor): Iterable[Z] = {
executeQuery[Iterable](session, (session: DBSession) => toIterable(session, statement, rawParameters, zExtractor))
}
private[scalikejdbc] def extractOne: WrappedResultSet => A = one
private[scalikejdbc] def extractTo1: WrappedResultSet => Option[B1] = to1
private[scalikejdbc] def extractTo2: WrappedResultSet => Option[B2] = to2
private[scalikejdbc] def extractTo3: WrappedResultSet => Option[B3] = to3
private[scalikejdbc] def extractTo4: WrappedResultSet => Option[B4] = to4
private[scalikejdbc] def extractTo5: WrappedResultSet => Option[B5] = to5
private[scalikejdbc] def extractTo6: WrappedResultSet => Option[B6] = to6
private[scalikejdbc] def extractTo7: WrappedResultSet => Option[B7] = to7
private[scalikejdbc] def extractTo8: WrappedResultSet => Option[B8] = to8
private[scalikejdbc] def extractTo9: WrappedResultSet => Option[B9] = to9
private[scalikejdbc] def extractTo10: WrappedResultSet => Option[B10] = to10
private[scalikejdbc] def extractTo11: WrappedResultSet => Option[B11] = to11
private[scalikejdbc] def extractTo12: WrappedResultSet => Option[B12] = to12
private[scalikejdbc] def extractTo13: WrappedResultSet => Option[B13] = to13
private[scalikejdbc] def extractTo14: WrappedResultSet => Option[B14] = to14
private[scalikejdbc] def extractTo15: WrappedResultSet => Option[B15] = to15
private[scalikejdbc] def extractTo16: WrappedResultSet => Option[B16] = to16
private[scalikejdbc] def extractTo17: WrappedResultSet => Option[B17] = to17
private[scalikejdbc] def transform: (A, scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17]) => Z = zExtractor
}
object OneToManies17SQLToIterable {
def unapply[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E <: WithExtractor, Z](sqlObject: OneToManies17SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z]): Some[(String, scala.collection.Seq[Any], WrappedResultSet => A, (WrappedResultSet => Option[B1], WrappedResultSet => Option[B2], WrappedResultSet => Option[B3], WrappedResultSet => Option[B4], WrappedResultSet => Option[B5], WrappedResultSet => Option[B6], WrappedResultSet => Option[B7], WrappedResultSet => Option[B8], WrappedResultSet => Option[B9], WrappedResultSet => Option[B10], WrappedResultSet => Option[B11], WrappedResultSet => Option[B12], WrappedResultSet => Option[B13], WrappedResultSet => Option[B14], WrappedResultSet => Option[B15], WrappedResultSet => Option[B16], WrappedResultSet => Option[B17]), (A, scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17]) => Z)] = {
Some((sqlObject.statement, sqlObject.rawParameters, sqlObject.one, (sqlObject.to1, sqlObject.to2, sqlObject.to3, sqlObject.to4, sqlObject.to5, sqlObject.to6, sqlObject.to7, sqlObject.to8, sqlObject.to9, sqlObject.to10, sqlObject.to11, sqlObject.to12, sqlObject.to13, sqlObject.to14, sqlObject.to15, sqlObject.to16, sqlObject.to17), sqlObject.zExtractor))
}
}
class OneToManies17SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E <: WithExtractor, Z](
override val statement: String,
override val rawParameters: scala.collection.Seq[Any])(val one: WrappedResultSet => A)(val to1: WrappedResultSet => Option[B1], val to2: WrappedResultSet => Option[B2], val to3: WrappedResultSet => Option[B3], val to4: WrappedResultSet => Option[B4], val to5: WrappedResultSet => Option[B5], val to6: WrappedResultSet => Option[B6], val to7: WrappedResultSet => Option[B7], val to8: WrappedResultSet => Option[B8], val to9: WrappedResultSet => Option[B9], val to10: WrappedResultSet => Option[B10], val to11: WrappedResultSet => Option[B11], val to12: WrappedResultSet => Option[B12], val to13: WrappedResultSet => Option[B13], val to14: WrappedResultSet => Option[B14], val to15: WrappedResultSet => Option[B15], val to16: WrappedResultSet => Option[B16], val to17: WrappedResultSet => Option[B17])(val zExtractor: (A, scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17]) => Z)(val isSingle: Boolean = true)
extends SQL[Z, E](statement, rawParameters)(SQL.noExtractor[Z]("one-to-many extractor(one(RS => A).toMany(RS => Option[B1])) is specified, use #map((A,B) =>Z) instead."))
with SQLToOption[Z, E]
with AllOutputDecisionsUnsupported[Z, E]
with OneToManies17Extractor[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z] {
import GeneralizedTypeConstraintsForWithExtractor._
override def apply()(implicit session: DBSession, context: ConnectionPoolContext = NoConnectionPoolContext, hasExtractor: ThisSQL =:= SQLWithExtractor): Option[Z] = {
executeQuery[Option](session, (session: DBSession) => toSingle(toIterable(session, statement, rawParameters, zExtractor)))
}
private[scalikejdbc] def extractOne: WrappedResultSet => A = one
private[scalikejdbc] def extractTo1: WrappedResultSet => Option[B1] = to1
private[scalikejdbc] def extractTo2: WrappedResultSet => Option[B2] = to2
private[scalikejdbc] def extractTo3: WrappedResultSet => Option[B3] = to3
private[scalikejdbc] def extractTo4: WrappedResultSet => Option[B4] = to4
private[scalikejdbc] def extractTo5: WrappedResultSet => Option[B5] = to5
private[scalikejdbc] def extractTo6: WrappedResultSet => Option[B6] = to6
private[scalikejdbc] def extractTo7: WrappedResultSet => Option[B7] = to7
private[scalikejdbc] def extractTo8: WrappedResultSet => Option[B8] = to8
private[scalikejdbc] def extractTo9: WrappedResultSet => Option[B9] = to9
private[scalikejdbc] def extractTo10: WrappedResultSet => Option[B10] = to10
private[scalikejdbc] def extractTo11: WrappedResultSet => Option[B11] = to11
private[scalikejdbc] def extractTo12: WrappedResultSet => Option[B12] = to12
private[scalikejdbc] def extractTo13: WrappedResultSet => Option[B13] = to13
private[scalikejdbc] def extractTo14: WrappedResultSet => Option[B14] = to14
private[scalikejdbc] def extractTo15: WrappedResultSet => Option[B15] = to15
private[scalikejdbc] def extractTo16: WrappedResultSet => Option[B16] = to16
private[scalikejdbc] def extractTo17: WrappedResultSet => Option[B17] = to17
private[scalikejdbc] def transform: (A, scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17]) => Z = zExtractor
}
object OneToManies17SQLToOption {
def unapply[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E <: WithExtractor, Z](sqlObject: OneToManies17SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z]): Some[(String, scala.collection.Seq[Any], WrappedResultSet => A, (WrappedResultSet => Option[B1], WrappedResultSet => Option[B2], WrappedResultSet => Option[B3], WrappedResultSet => Option[B4], WrappedResultSet => Option[B5], WrappedResultSet => Option[B6], WrappedResultSet => Option[B7], WrappedResultSet => Option[B8], WrappedResultSet => Option[B9], WrappedResultSet => Option[B10], WrappedResultSet => Option[B11], WrappedResultSet => Option[B12], WrappedResultSet => Option[B13], WrappedResultSet => Option[B14], WrappedResultSet => Option[B15], WrappedResultSet => Option[B16], WrappedResultSet => Option[B17]), (A, scala.collection.Seq[B1], scala.collection.Seq[B2], scala.collection.Seq[B3], scala.collection.Seq[B4], scala.collection.Seq[B5], scala.collection.Seq[B6], scala.collection.Seq[B7], scala.collection.Seq[B8], scala.collection.Seq[B9], scala.collection.Seq[B10], scala.collection.Seq[B11], scala.collection.Seq[B12], scala.collection.Seq[B13], scala.collection.Seq[B14], scala.collection.Seq[B15], scala.collection.Seq[B16], scala.collection.Seq[B17]) => Z, Boolean)] = {
Some((sqlObject.statement, sqlObject.rawParameters, sqlObject.one, (sqlObject.to1, sqlObject.to2, sqlObject.to3, sqlObject.to4, sqlObject.to5, sqlObject.to6, sqlObject.to7, sqlObject.to8, sqlObject.to9, sqlObject.to10, sqlObject.to11, sqlObject.to12, sqlObject.to13, sqlObject.to14, sqlObject.to15, sqlObject.to16, sqlObject.to17), sqlObject.zExtractor, sqlObject.isSingle))
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy