RowCodec
Provides useful methods for RowCodec instance creation.
Attributes
- Graph
-
- Supertypes
- Self type
-
RowCodec.type
Members list
Value members
Inherited methods
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int, i19: Int, i20: Int, i21: Int, i22: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22)) res21: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22")) res22: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int, i19: Int, i20: Int, i21: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21)) res20: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21")) res21: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int, i19: Int, i20: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)) res19: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20")) res20: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int, i19: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19)) res18: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19")) res19: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)) res17: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18")) res18: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)) res16: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17")) res17: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)) res15: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16")) res16: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)) res14: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15")) res15: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)) res13: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14")) res14: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)) res12: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13")) res13: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)) res11: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12")) res12: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)) res10: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11")) res11: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) res9: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")) res10: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3, 4, 5, 6, 7, 8)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9)) res8: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9")) res9: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3, 4, 5, 6, 7)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8)) res7: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8")) res8: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3, 4, 5, 6)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7)) res6: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7")) res7: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3, 4, 5)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6)) res5: Seq[String] = Vector(1, 2, 3, 4, 5, 6) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6")) res6: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3, 4)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5)) res4: Seq[String] = Vector(1, 2, 3, 4, 5) scala> codec.decode(Seq("1", "2", "3", "4", "5")) res5: DecodeResult[Ints] = Right(Ints(1,2,3,4,5))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2, 3)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4)) res3: Seq[String] = Vector(1, 2, 3, 4) scala> codec.decode(Seq("1", "2", "3", "4")) res4: DecodeResult[Ints] = Right(Ints(1,2,3,4))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int) scala> val codec = RowCodec.caseCodec(0, 1, 2)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3)) res2: Seq[String] = Vector(1, 2, 3) scala> codec.decode(Seq("1", "2", "3")) res3: DecodeResult[Ints] = Right(Ints(1,2,3))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int) scala> val codec = RowCodec.caseCodec(0, 1)(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2)) res1: Seq[String] = Vector(1, 2) scala> codec.decode(Seq("1", "2")) res2: DecodeResult[Ints] = Right(Ints(1,2))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int) scala> val codec = RowCodec.caseCodec(Ints.apply)(x => Some(x.i1)) scala> codec.encode(Ints(1)) res0: Seq[String] = List(1) scala> codec.decode(Seq("1")) res1: DecodeResult[Ints] = Right(Ints(1))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int, i19: Int, i20: Int, i21: Int, i22: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22)) res21: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22")) res22: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int, i19: Int, i20: Int, i21: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21)) res20: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21")) res21: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int, i19: Int, i20: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)) res19: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20")) res20: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int, i19: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19)) res18: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19")) res19: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)) res17: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18")) res18: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)) res16: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17")) res17: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)) res15: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16")) res16: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)) res14: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15")) res15: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)) res13: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14")) res14: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)) res12: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13")) res13: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)) res11: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12")) res12: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)) res10: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11")) res11: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) res9: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")) res10: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9)) res8: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9")) res9: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8)) res7: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8")) res8: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7)) res6: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7")) res7: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6)) res5: Seq[String] = Vector(1, 2, 3, 4, 5, 6) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6")) res6: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4, 5)) res4: Seq[String] = Vector(1, 2, 3, 4, 5) scala> codec.decode(Seq("1", "2", "3", "4", "5")) res5: DecodeResult[Ints] = Right(Ints(1,2,3,4,5))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3, 4)) res3: Seq[String] = Vector(1, 2, 3, 4) scala> codec.decode(Seq("1", "2", "3", "4")) res4: DecodeResult[Ints] = Right(Ints(1,2,3,4))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2, 3)) res2: Seq[String] = Vector(1, 2, 3) scala> codec.decode(Seq("1", "2", "3")) res3: DecodeResult[Ints] = Right(Ints(1,2,3))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(Tuple.fromProductTyped(x))) scala> codec.encode(Ints(1, 2)) res1: Seq[String] = Vector(1, 2) scala> codec.decode(Seq("1", "2")) res2: DecodeResult[Ints] = Right(Ints(1,2))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance for the specified encoding and decoding functions.
Creates a new RowCodec instance for the specified encoding and decoding functions.
This is meant for case classes and is unsafe for any other type: a case class' unapply
method never returns Some
, which allows caseCodec
to call get
on the return value.
Attributes
- Example
-
scala> case class Ints(i1: Int) scala> val codec = RowCodec.caseOrdered(Ints.apply)(x => Some(x.i1)) scala> codec.encode(Ints(1)) res0: Seq[String] = List(1) scala> codec.decode(Seq("1")) res1: DecodeResult[Ints] = Right(Ints(1))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i10
-
index of the cell that should be passed as parameter number 10 of
f
and will be at index 10 of the value returned byg
- i11
-
index of the cell that should be passed as parameter number 11 of
f
and will be at index 11 of the value returned byg
- i12
-
index of the cell that should be passed as parameter number 12 of
f
and will be at index 12 of the value returned byg
- i13
-
index of the cell that should be passed as parameter number 13 of
f
and will be at index 13 of the value returned byg
- i14
-
index of the cell that should be passed as parameter number 14 of
f
and will be at index 14 of the value returned byg
- i15
-
index of the cell that should be passed as parameter number 15 of
f
and will be at index 15 of the value returned byg
- i16
-
index of the cell that should be passed as parameter number 16 of
f
and will be at index 16 of the value returned byg
- i17
-
index of the cell that should be passed as parameter number 17 of
f
and will be at index 17 of the value returned byg
- i18
-
index of the cell that should be passed as parameter number 18 of
f
and will be at index 18 of the value returned byg
- i19
-
index of the cell that should be passed as parameter number 19 of
f
and will be at index 19 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i20
-
index of the cell that should be passed as parameter number 20 of
f
and will be at index 20 of the value returned byg
- i21
-
index of the cell that should be passed as parameter number 21 of
f
and will be at index 21 of the value returned byg
- i22
-
index of the cell that should be passed as parameter number 22 of
f
and will be at index 22 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
- i5
-
index of the cell that should be passed as parameter number 5 of
f
and will be at index 5 of the value returned byg
- i6
-
index of the cell that should be passed as parameter number 6 of
f
and will be at index 6 of the value returned byg
- i7
-
index of the cell that should be passed as parameter number 7 of
f
and will be at index 7 of the value returned byg
- i8
-
index of the cell that should be passed as parameter number 8 of
f
and will be at index 8 of the value returned byg
- i9
-
index of the cell that should be passed as parameter number 9 of
f
and will be at index 9 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int, i19: Int, i20: Int, i21: Int, i22: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13, is.i14, is.i15, is.i16, is.i17, is.i18, is.i19, is.i20, is.i21, is.i22)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22)) res21: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22")) res22: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i10
-
index of the cell that should be passed as parameter number 10 of
f
and will be at index 10 of the value returned byg
- i11
-
index of the cell that should be passed as parameter number 11 of
f
and will be at index 11 of the value returned byg
- i12
-
index of the cell that should be passed as parameter number 12 of
f
and will be at index 12 of the value returned byg
- i13
-
index of the cell that should be passed as parameter number 13 of
f
and will be at index 13 of the value returned byg
- i14
-
index of the cell that should be passed as parameter number 14 of
f
and will be at index 14 of the value returned byg
- i15
-
index of the cell that should be passed as parameter number 15 of
f
and will be at index 15 of the value returned byg
- i16
-
index of the cell that should be passed as parameter number 16 of
f
and will be at index 16 of the value returned byg
- i17
-
index of the cell that should be passed as parameter number 17 of
f
and will be at index 17 of the value returned byg
- i18
-
index of the cell that should be passed as parameter number 18 of
f
and will be at index 18 of the value returned byg
- i19
-
index of the cell that should be passed as parameter number 19 of
f
and will be at index 19 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i20
-
index of the cell that should be passed as parameter number 20 of
f
and will be at index 20 of the value returned byg
- i21
-
index of the cell that should be passed as parameter number 21 of
f
and will be at index 21 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
- i5
-
index of the cell that should be passed as parameter number 5 of
f
and will be at index 5 of the value returned byg
- i6
-
index of the cell that should be passed as parameter number 6 of
f
and will be at index 6 of the value returned byg
- i7
-
index of the cell that should be passed as parameter number 7 of
f
and will be at index 7 of the value returned byg
- i8
-
index of the cell that should be passed as parameter number 8 of
f
and will be at index 8 of the value returned byg
- i9
-
index of the cell that should be passed as parameter number 9 of
f
and will be at index 9 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int, i19: Int, i20: Int, i21: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13, is.i14, is.i15, is.i16, is.i17, is.i18, is.i19, is.i20, is.i21)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21)) res20: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21")) res21: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i10
-
index of the cell that should be passed as parameter number 10 of
f
and will be at index 10 of the value returned byg
- i11
-
index of the cell that should be passed as parameter number 11 of
f
and will be at index 11 of the value returned byg
- i12
-
index of the cell that should be passed as parameter number 12 of
f
and will be at index 12 of the value returned byg
- i13
-
index of the cell that should be passed as parameter number 13 of
f
and will be at index 13 of the value returned byg
- i14
-
index of the cell that should be passed as parameter number 14 of
f
and will be at index 14 of the value returned byg
- i15
-
index of the cell that should be passed as parameter number 15 of
f
and will be at index 15 of the value returned byg
- i16
-
index of the cell that should be passed as parameter number 16 of
f
and will be at index 16 of the value returned byg
- i17
-
index of the cell that should be passed as parameter number 17 of
f
and will be at index 17 of the value returned byg
- i18
-
index of the cell that should be passed as parameter number 18 of
f
and will be at index 18 of the value returned byg
- i19
-
index of the cell that should be passed as parameter number 19 of
f
and will be at index 19 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i20
-
index of the cell that should be passed as parameter number 20 of
f
and will be at index 20 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
- i5
-
index of the cell that should be passed as parameter number 5 of
f
and will be at index 5 of the value returned byg
- i6
-
index of the cell that should be passed as parameter number 6 of
f
and will be at index 6 of the value returned byg
- i7
-
index of the cell that should be passed as parameter number 7 of
f
and will be at index 7 of the value returned byg
- i8
-
index of the cell that should be passed as parameter number 8 of
f
and will be at index 8 of the value returned byg
- i9
-
index of the cell that should be passed as parameter number 9 of
f
and will be at index 9 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int, i19: Int, i20: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13, is.i14, is.i15, is.i16, is.i17, is.i18, is.i19, is.i20)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)) res19: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20")) res20: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i10
-
index of the cell that should be passed as parameter number 10 of
f
and will be at index 10 of the value returned byg
- i11
-
index of the cell that should be passed as parameter number 11 of
f
and will be at index 11 of the value returned byg
- i12
-
index of the cell that should be passed as parameter number 12 of
f
and will be at index 12 of the value returned byg
- i13
-
index of the cell that should be passed as parameter number 13 of
f
and will be at index 13 of the value returned byg
- i14
-
index of the cell that should be passed as parameter number 14 of
f
and will be at index 14 of the value returned byg
- i15
-
index of the cell that should be passed as parameter number 15 of
f
and will be at index 15 of the value returned byg
- i16
-
index of the cell that should be passed as parameter number 16 of
f
and will be at index 16 of the value returned byg
- i17
-
index of the cell that should be passed as parameter number 17 of
f
and will be at index 17 of the value returned byg
- i18
-
index of the cell that should be passed as parameter number 18 of
f
and will be at index 18 of the value returned byg
- i19
-
index of the cell that should be passed as parameter number 19 of
f
and will be at index 19 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
- i5
-
index of the cell that should be passed as parameter number 5 of
f
and will be at index 5 of the value returned byg
- i6
-
index of the cell that should be passed as parameter number 6 of
f
and will be at index 6 of the value returned byg
- i7
-
index of the cell that should be passed as parameter number 7 of
f
and will be at index 7 of the value returned byg
- i8
-
index of the cell that should be passed as parameter number 8 of
f
and will be at index 8 of the value returned byg
- i9
-
index of the cell that should be passed as parameter number 9 of
f
and will be at index 9 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int, i19: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13, is.i14, is.i15, is.i16, is.i17, is.i18, is.i19)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19)) res18: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19")) res19: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i10
-
index of the cell that should be passed as parameter number 10 of
f
and will be at index 10 of the value returned byg
- i11
-
index of the cell that should be passed as parameter number 11 of
f
and will be at index 11 of the value returned byg
- i12
-
index of the cell that should be passed as parameter number 12 of
f
and will be at index 12 of the value returned byg
- i13
-
index of the cell that should be passed as parameter number 13 of
f
and will be at index 13 of the value returned byg
- i14
-
index of the cell that should be passed as parameter number 14 of
f
and will be at index 14 of the value returned byg
- i15
-
index of the cell that should be passed as parameter number 15 of
f
and will be at index 15 of the value returned byg
- i16
-
index of the cell that should be passed as parameter number 16 of
f
and will be at index 16 of the value returned byg
- i17
-
index of the cell that should be passed as parameter number 17 of
f
and will be at index 17 of the value returned byg
- i18
-
index of the cell that should be passed as parameter number 18 of
f
and will be at index 18 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
- i5
-
index of the cell that should be passed as parameter number 5 of
f
and will be at index 5 of the value returned byg
- i6
-
index of the cell that should be passed as parameter number 6 of
f
and will be at index 6 of the value returned byg
- i7
-
index of the cell that should be passed as parameter number 7 of
f
and will be at index 7 of the value returned byg
- i8
-
index of the cell that should be passed as parameter number 8 of
f
and will be at index 8 of the value returned byg
- i9
-
index of the cell that should be passed as parameter number 9 of
f
and will be at index 9 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13, is.i14, is.i15, is.i16, is.i17, is.i18)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)) res17: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18")) res18: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i10
-
index of the cell that should be passed as parameter number 10 of
f
and will be at index 10 of the value returned byg
- i11
-
index of the cell that should be passed as parameter number 11 of
f
and will be at index 11 of the value returned byg
- i12
-
index of the cell that should be passed as parameter number 12 of
f
and will be at index 12 of the value returned byg
- i13
-
index of the cell that should be passed as parameter number 13 of
f
and will be at index 13 of the value returned byg
- i14
-
index of the cell that should be passed as parameter number 14 of
f
and will be at index 14 of the value returned byg
- i15
-
index of the cell that should be passed as parameter number 15 of
f
and will be at index 15 of the value returned byg
- i16
-
index of the cell that should be passed as parameter number 16 of
f
and will be at index 16 of the value returned byg
- i17
-
index of the cell that should be passed as parameter number 17 of
f
and will be at index 17 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
- i5
-
index of the cell that should be passed as parameter number 5 of
f
and will be at index 5 of the value returned byg
- i6
-
index of the cell that should be passed as parameter number 6 of
f
and will be at index 6 of the value returned byg
- i7
-
index of the cell that should be passed as parameter number 7 of
f
and will be at index 7 of the value returned byg
- i8
-
index of the cell that should be passed as parameter number 8 of
f
and will be at index 8 of the value returned byg
- i9
-
index of the cell that should be passed as parameter number 9 of
f
and will be at index 9 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13, is.i14, is.i15, is.i16, is.i17)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)) res16: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17")) res17: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i10
-
index of the cell that should be passed as parameter number 10 of
f
and will be at index 10 of the value returned byg
- i11
-
index of the cell that should be passed as parameter number 11 of
f
and will be at index 11 of the value returned byg
- i12
-
index of the cell that should be passed as parameter number 12 of
f
and will be at index 12 of the value returned byg
- i13
-
index of the cell that should be passed as parameter number 13 of
f
and will be at index 13 of the value returned byg
- i14
-
index of the cell that should be passed as parameter number 14 of
f
and will be at index 14 of the value returned byg
- i15
-
index of the cell that should be passed as parameter number 15 of
f
and will be at index 15 of the value returned byg
- i16
-
index of the cell that should be passed as parameter number 16 of
f
and will be at index 16 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
- i5
-
index of the cell that should be passed as parameter number 5 of
f
and will be at index 5 of the value returned byg
- i6
-
index of the cell that should be passed as parameter number 6 of
f
and will be at index 6 of the value returned byg
- i7
-
index of the cell that should be passed as parameter number 7 of
f
and will be at index 7 of the value returned byg
- i8
-
index of the cell that should be passed as parameter number 8 of
f
and will be at index 8 of the value returned byg
- i9
-
index of the cell that should be passed as parameter number 9 of
f
and will be at index 9 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13, is.i14, is.i15, is.i16)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)) res15: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16")) res16: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i10
-
index of the cell that should be passed as parameter number 10 of
f
and will be at index 10 of the value returned byg
- i11
-
index of the cell that should be passed as parameter number 11 of
f
and will be at index 11 of the value returned byg
- i12
-
index of the cell that should be passed as parameter number 12 of
f
and will be at index 12 of the value returned byg
- i13
-
index of the cell that should be passed as parameter number 13 of
f
and will be at index 13 of the value returned byg
- i14
-
index of the cell that should be passed as parameter number 14 of
f
and will be at index 14 of the value returned byg
- i15
-
index of the cell that should be passed as parameter number 15 of
f
and will be at index 15 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
- i5
-
index of the cell that should be passed as parameter number 5 of
f
and will be at index 5 of the value returned byg
- i6
-
index of the cell that should be passed as parameter number 6 of
f
and will be at index 6 of the value returned byg
- i7
-
index of the cell that should be passed as parameter number 7 of
f
and will be at index 7 of the value returned byg
- i8
-
index of the cell that should be passed as parameter number 8 of
f
and will be at index 8 of the value returned byg
- i9
-
index of the cell that should be passed as parameter number 9 of
f
and will be at index 9 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13, is.i14, is.i15)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)) res14: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15")) res15: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i10
-
index of the cell that should be passed as parameter number 10 of
f
and will be at index 10 of the value returned byg
- i11
-
index of the cell that should be passed as parameter number 11 of
f
and will be at index 11 of the value returned byg
- i12
-
index of the cell that should be passed as parameter number 12 of
f
and will be at index 12 of the value returned byg
- i13
-
index of the cell that should be passed as parameter number 13 of
f
and will be at index 13 of the value returned byg
- i14
-
index of the cell that should be passed as parameter number 14 of
f
and will be at index 14 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
- i5
-
index of the cell that should be passed as parameter number 5 of
f
and will be at index 5 of the value returned byg
- i6
-
index of the cell that should be passed as parameter number 6 of
f
and will be at index 6 of the value returned byg
- i7
-
index of the cell that should be passed as parameter number 7 of
f
and will be at index 7 of the value returned byg
- i8
-
index of the cell that should be passed as parameter number 8 of
f
and will be at index 8 of the value returned byg
- i9
-
index of the cell that should be passed as parameter number 9 of
f
and will be at index 9 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13, is.i14)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)) res13: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14")) res14: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i10
-
index of the cell that should be passed as parameter number 10 of
f
and will be at index 10 of the value returned byg
- i11
-
index of the cell that should be passed as parameter number 11 of
f
and will be at index 11 of the value returned byg
- i12
-
index of the cell that should be passed as parameter number 12 of
f
and will be at index 12 of the value returned byg
- i13
-
index of the cell that should be passed as parameter number 13 of
f
and will be at index 13 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
- i5
-
index of the cell that should be passed as parameter number 5 of
f
and will be at index 5 of the value returned byg
- i6
-
index of the cell that should be passed as parameter number 6 of
f
and will be at index 6 of the value returned byg
- i7
-
index of the cell that should be passed as parameter number 7 of
f
and will be at index 7 of the value returned byg
- i8
-
index of the cell that should be passed as parameter number 8 of
f
and will be at index 8 of the value returned byg
- i9
-
index of the cell that should be passed as parameter number 9 of
f
and will be at index 9 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)) res12: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13")) res13: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i10
-
index of the cell that should be passed as parameter number 10 of
f
and will be at index 10 of the value returned byg
- i11
-
index of the cell that should be passed as parameter number 11 of
f
and will be at index 11 of the value returned byg
- i12
-
index of the cell that should be passed as parameter number 12 of
f
and will be at index 12 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
- i5
-
index of the cell that should be passed as parameter number 5 of
f
and will be at index 5 of the value returned byg
- i6
-
index of the cell that should be passed as parameter number 6 of
f
and will be at index 6 of the value returned byg
- i7
-
index of the cell that should be passed as parameter number 7 of
f
and will be at index 7 of the value returned byg
- i8
-
index of the cell that should be passed as parameter number 8 of
f
and will be at index 8 of the value returned byg
- i9
-
index of the cell that should be passed as parameter number 9 of
f
and will be at index 9 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)) res11: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12")) res12: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i10
-
index of the cell that should be passed as parameter number 10 of
f
and will be at index 10 of the value returned byg
- i11
-
index of the cell that should be passed as parameter number 11 of
f
and will be at index 11 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
- i5
-
index of the cell that should be passed as parameter number 5 of
f
and will be at index 5 of the value returned byg
- i6
-
index of the cell that should be passed as parameter number 6 of
f
and will be at index 6 of the value returned byg
- i7
-
index of the cell that should be passed as parameter number 7 of
f
and will be at index 7 of the value returned byg
- i8
-
index of the cell that should be passed as parameter number 8 of
f
and will be at index 8 of the value returned byg
- i9
-
index of the cell that should be passed as parameter number 9 of
f
and will be at index 9 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)) res10: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11")) res11: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i10
-
index of the cell that should be passed as parameter number 10 of
f
and will be at index 10 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
- i5
-
index of the cell that should be passed as parameter number 5 of
f
and will be at index 5 of the value returned byg
- i6
-
index of the cell that should be passed as parameter number 6 of
f
and will be at index 6 of the value returned byg
- i7
-
index of the cell that should be passed as parameter number 7 of
f
and will be at index 7 of the value returned byg
- i8
-
index of the cell that should be passed as parameter number 8 of
f
and will be at index 8 of the value returned byg
- i9
-
index of the cell that should be passed as parameter number 9 of
f
and will be at index 9 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) res9: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")) res10: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
- i5
-
index of the cell that should be passed as parameter number 5 of
f
and will be at index 5 of the value returned byg
- i6
-
index of the cell that should be passed as parameter number 6 of
f
and will be at index 6 of the value returned byg
- i7
-
index of the cell that should be passed as parameter number 7 of
f
and will be at index 7 of the value returned byg
- i8
-
index of the cell that should be passed as parameter number 8 of
f
and will be at index 8 of the value returned byg
- i9
-
index of the cell that should be passed as parameter number 9 of
f
and will be at index 9 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3, 4, 5, 6, 7, 8)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9)) res8: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9")) res9: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
- i5
-
index of the cell that should be passed as parameter number 5 of
f
and will be at index 5 of the value returned byg
- i6
-
index of the cell that should be passed as parameter number 6 of
f
and will be at index 6 of the value returned byg
- i7
-
index of the cell that should be passed as parameter number 7 of
f
and will be at index 7 of the value returned byg
- i8
-
index of the cell that should be passed as parameter number 8 of
f
and will be at index 8 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3, 4, 5, 6, 7)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8)) res7: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8")) res8: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
- i5
-
index of the cell that should be passed as parameter number 5 of
f
and will be at index 5 of the value returned byg
- i6
-
index of the cell that should be passed as parameter number 6 of
f
and will be at index 6 of the value returned byg
- i7
-
index of the cell that should be passed as parameter number 7 of
f
and will be at index 7 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3, 4, 5, 6)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7)) res6: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7")) res7: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
- i5
-
index of the cell that should be passed as parameter number 5 of
f
and will be at index 5 of the value returned byg
- i6
-
index of the cell that should be passed as parameter number 6 of
f
and will be at index 6 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3, 4, 5)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6)) res5: Seq[String] = Vector(1, 2, 3, 4, 5, 6) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6")) res6: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
- i5
-
index of the cell that should be passed as parameter number 5 of
f
and will be at index 5 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3, 4)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5)) scala> codec.encode(Ints(1, 2, 3, 4, 5)) res4: Seq[String] = Vector(1, 2, 3, 4, 5) scala> codec.decode(Seq("1", "2", "3", "4", "5")) res5: DecodeResult[Ints] = Right(Ints(1,2,3,4,5))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
- i4
-
index of the cell that should be passed as parameter number 4 of
f
and will be at index 4 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int) scala> val codec = RowCodec.codec(0, 1, 2, 3)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4)) scala> codec.encode(Ints(1, 2, 3, 4)) res3: Seq[String] = Vector(1, 2, 3, 4) scala> codec.decode(Seq("1", "2", "3", "4")) res4: DecodeResult[Ints] = Right(Ints(1,2,3,4))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
- i3
-
index of the cell that should be passed as parameter number 3 of
f
and will be at index 3 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int) scala> val codec = RowCodec.codec(0, 1, 2)(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3)) scala> codec.encode(Ints(1, 2, 3)) res2: Seq[String] = Vector(1, 2, 3) scala> codec.decode(Seq("1", "2", "3")) res3: DecodeResult[Ints] = Right(Ints(1,2,3))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
- i1
-
index of the cell that should be passed as parameter number 1 of
f
and will be at index 1 of the value returned byg
- i2
-
index of the cell that should be passed as parameter number 2 of
f
and will be at index 2 of the value returned byg
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int) scala> val codec = RowCodec.codec(0, 1)(Ints.apply)((is: Ints) => (is.i1, is.i2)) scala> codec.encode(Ints(1, 2)) res1: Seq[String] = Vector(1, 2) scala> codec.decode(Seq("1", "2")) res2: DecodeResult[Ints] = Right(Ints(1,2))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Attributes
- Example
-
scala> case class Ints(i1: Int) scala> val codec = RowCodec.codec(Ints.apply)((is: Ints) => (is.i1)) scala> codec.encode(Ints(1)) res0: Seq[String] = List(1) scala> codec.decode(Seq("1")) res1: DecodeResult[Ints] = Right(Ints(1))
- Inherited from:
- GeneratedRowCodecs
Attributes
- Inherited from:
- CodecCompanion
Attributes
- Inherited from:
- CodecCompanion
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int, i19: Int, i20: Int, i21: Int, i22: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13, is.i14, is.i15, is.i16, is.i17, is.i18, is.i19, is.i20, is.i21, is.i22)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22)) res21: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22")) res22: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int, i19: Int, i20: Int, i21: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13, is.i14, is.i15, is.i16, is.i17, is.i18, is.i19, is.i20, is.i21)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21)) res20: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21")) res21: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int, i19: Int, i20: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13, is.i14, is.i15, is.i16, is.i17, is.i18, is.i19, is.i20)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)) res19: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20")) res20: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int, i19: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13, is.i14, is.i15, is.i16, is.i17, is.i18, is.i19)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19)) res18: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19")) res19: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int, i18: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13, is.i14, is.i15, is.i16, is.i17, is.i18)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)) res17: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18")) res18: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int, i17: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13, is.i14, is.i15, is.i16, is.i17)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)) res16: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17")) res17: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int, i16: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13, is.i14, is.i15, is.i16)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)) res15: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16")) res16: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int, i15: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13, is.i14, is.i15)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)) res14: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15")) res15: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int, i14: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13, is.i14)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)) res13: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14")) res14: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13,14))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int, i13: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12, is.i13)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)) res12: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13")) res13: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12,13))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int, i12: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11, is.i12)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)) res11: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12")) res12: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11,12))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int, i11: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10, is.i11)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)) res10: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11")) res11: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10,11))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int, i10: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9, is.i10)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) res9: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")) res10: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9,10))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int, i9: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8, is.i9)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8, 9)) res8: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8", "9")) res9: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8,9))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int, i8: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7, is.i8)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7, 8)) res7: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7, 8) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7", "8")) res8: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7,8))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int, i7: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6, is.i7)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6, 7)) res6: Seq[String] = Vector(1, 2, 3, 4, 5, 6, 7) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6", "7")) res7: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6,7))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int, i6: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5, is.i6)) scala> codec.encode(Ints(1, 2, 3, 4, 5, 6)) res5: Seq[String] = Vector(1, 2, 3, 4, 5, 6) scala> codec.decode(Seq("1", "2", "3", "4", "5", "6")) res6: DecodeResult[Ints] = Right(Ints(1,2,3,4,5,6))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int, i5: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4, is.i5)) scala> codec.encode(Ints(1, 2, 3, 4, 5)) res4: Seq[String] = Vector(1, 2, 3, 4, 5) scala> codec.decode(Seq("1", "2", "3", "4", "5")) res5: DecodeResult[Ints] = Right(Ints(1,2,3,4,5))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int, i4: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3, is.i4)) scala> codec.encode(Ints(1, 2, 3, 4)) res3: Seq[String] = Vector(1, 2, 3, 4) scala> codec.decode(Seq("1", "2", "3", "4")) res4: DecodeResult[Ints] = Right(Ints(1,2,3,4))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int, i3: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2, is.i3)) scala> codec.encode(Ints(1, 2, 3)) res2: Seq[String] = Vector(1, 2, 3) scala> codec.decode(Seq("1", "2", "3")) res3: DecodeResult[Ints] = Right(Ints(1,2,3))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function. ]
Attributes
- Example
-
scala> case class Ints(i1: Int, i2: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1, is.i2)) scala> codec.encode(Ints(1, 2)) res1: Seq[String] = Vector(1, 2) scala> codec.decode(Seq("1", "2")) res2: DecodeResult[Ints] = Right(Ints(1,2))
- Inherited from:
- GeneratedRowCodecs
Creates a new RowCodec instance from the specified encoding and decoding functions.
Creates a new RowCodec instance from the specified encoding and decoding functions.
Value parameters
- f
-
encoding function.
- g
-
decoding function.
Attributes
- Example
-
scala> case class Ints(i1: Int) scala> val codec = RowCodec.ordered(Ints.apply)((is: Ints) => (is.i1)) scala> codec.encode(Ints(1)) res0: Seq[String] = List(1) scala> codec.decode(Seq("1")) res1: DecodeResult[Ints] = Right(Ints(1))
- Inherited from:
- GeneratedRowCodecs