
scommons.websql.encoding.TupleOptDecoders.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scommons-websql-encoding_sjs0.6_2.13 Show documentation
Show all versions of scommons-websql-encoding_sjs0.6_2.13 Show documentation
Encoders/Decoders for WebSQL/SQLite DB types
The newest version!
// DO NOT EDIT: generated by TupleEncodingSpec.scala
package scommons.websql.encoding
trait TupleOptDecoders extends BaseEncodingDsl {
implicit def tuple2OptDecoder[T1, T2](
implicit d: Decoder[(T1, T2)]
): Decoder[Option[(T1, T2)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(2)
None
}
}
implicit def tuple3OptDecoder[T1, T2, T3](
implicit d: Decoder[(T1, T2, T3)]
): Decoder[Option[(T1, T2, T3)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(3)
None
}
}
implicit def tuple4OptDecoder[T1, T2, T3, T4](
implicit d: Decoder[(T1, T2, T3, T4)]
): Decoder[Option[(T1, T2, T3, T4)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(4)
None
}
}
implicit def tuple5OptDecoder[T1, T2, T3, T4, T5](
implicit d: Decoder[(T1, T2, T3, T4, T5)]
): Decoder[Option[(T1, T2, T3, T4, T5)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(5)
None
}
}
implicit def tuple6OptDecoder[T1, T2, T3, T4, T5, T6](
implicit d: Decoder[(T1, T2, T3, T4, T5, T6)]
): Decoder[Option[(T1, T2, T3, T4, T5, T6)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(6)
None
}
}
implicit def tuple7OptDecoder[T1, T2, T3, T4, T5, T6, T7](
implicit d: Decoder[(T1, T2, T3, T4, T5, T6, T7)]
): Decoder[Option[(T1, T2, T3, T4, T5, T6, T7)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(7)
None
}
}
implicit def tuple8OptDecoder[T1, T2, T3, T4, T5, T6, T7, T8](
implicit d: Decoder[(T1, T2, T3, T4, T5, T6, T7, T8)]
): Decoder[Option[(T1, T2, T3, T4, T5, T6, T7, T8)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(8)
None
}
}
implicit def tuple9OptDecoder[T1, T2, T3, T4, T5, T6, T7, T8, T9](
implicit d: Decoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9)]
): Decoder[Option[(T1, T2, T3, T4, T5, T6, T7, T8, T9)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(9)
None
}
}
implicit def tuple10OptDecoder[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10](
implicit d: Decoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)]
): Decoder[Option[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(10)
None
}
}
implicit def tuple11OptDecoder[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](
implicit d: Decoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)]
): Decoder[Option[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(11)
None
}
}
implicit def tuple12OptDecoder[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](
implicit d: Decoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)]
): Decoder[Option[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(12)
None
}
}
implicit def tuple13OptDecoder[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](
implicit d: Decoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)]
): Decoder[Option[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(13)
None
}
}
implicit def tuple14OptDecoder[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](
implicit d: Decoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)]
): Decoder[Option[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(14)
None
}
}
implicit def tuple15OptDecoder[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](
implicit d: Decoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)]
): Decoder[Option[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(15)
None
}
}
implicit def tuple16OptDecoder[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](
implicit d: Decoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)]
): Decoder[Option[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(16)
None
}
}
implicit def tuple17OptDecoder[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](
implicit d: Decoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)]
): Decoder[Option[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(17)
None
}
}
implicit def tuple18OptDecoder[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](
implicit d: Decoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)]
): Decoder[Option[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(18)
None
}
}
implicit def tuple19OptDecoder[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](
implicit d: Decoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)]
): Decoder[Option[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(19)
None
}
}
implicit def tuple20OptDecoder[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](
implicit d: Decoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)]
): Decoder[Option[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(20)
None
}
}
implicit def tuple21OptDecoder[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](
implicit d: Decoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)]
): Decoder[Option[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(21)
None
}
}
implicit def tuple22OptDecoder[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](
implicit d: Decoder[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)]
): Decoder[Option[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)]] =
WebSqlDecoder { (_: Index, r: ResultRow) =>
if (r.isDefinedAt(r.index)) {
Some(d(r.index, r))
} else {
r.skipIndices(22)
None
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy