diff --git a/cookbooks/jq/index.html b/cookbooks/jq/index.html index 8eca3207..dfb25c67 100644 --- a/cookbooks/jq/index.html +++ b/cookbooks/jq/index.html @@ -256,7 +256,7 @@

import fs2.data.json.jq.Compiler val queryCompiler = Compiler[IO] -// queryCompiler: Compiler[IO] = fs2.data.json.jq.internal.ESPJqCompiler@79b7579f +// queryCompiler: Compiler[IO] = fs2.data.json.jq.internal.ESPJqCompiler@51a00d2d val queryPipe = queryCompiler.compile(query).unsafeRunSync() // queryPipe: fs2.package.Pipe[IO, json.Token, json.Token] = <function1> diff --git a/documentation/cbor-json/index.html b/documentation/cbor-json/index.html index 97d8c8da..8ea9e67a 100644 --- a/documentation/cbor-json/index.html +++ b/documentation/cbor-json/index.html @@ -264,7 +264,7 @@

implicit val stateDecoder = deriveCellDecoder[State] -// stateDecoder: CellDecoder[State] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$coproductDecoder$3@6b689340 +// stateDecoder: CellDecoder[State] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$coproductDecoder$3@3663a7f1 // use stateDecoder to derive decoders for rows...or just test: stateDecoder("On") // res1: DecoderResult[State] = Right(value = On) @@ -199,7 +199,7 @@

// same goes for the encoder implicit val stateEncoder = deriveCellEncoder[State] -// stateEncoder: CellEncoder[State] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$coproductEncoder$3@272f65a1 +// stateEncoder: CellEncoder[State] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$coproductEncoder$3@4bcbd0af stateEncoder(State.On) // res3: String = "On"

The generic derivation for cell decoders also supports renaming and deriving instances for unary product types (case classes with one field):

@@ -213,9 +213,9 @@

// works as we have an implicit CellDecoder[String] implicit val unknownDecoder = deriveCellDecoder[Advanced.Unknown] -// unknownDecoder: CellDecoder[Advanced.Unknown] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$unaryProductDecoder$3@7cbba1f1 +// unknownDecoder: CellDecoder[Advanced.Unknown] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$unaryProductDecoder$3@30789b8a implicit val advancedDecoder = deriveCellDecoder[Advanced] -// advancedDecoder: CellDecoder[Advanced] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$coproductDecoder$3@67dc3a1a +// advancedDecoder: CellDecoder[Advanced] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$coproductDecoder$3@7ffca382 advancedDecoder("Active") // res4: DecoderResult[Advanced] = Right(value = On) @@ -223,9 +223,9 @@

// res5: DecoderResult[Advanced] = Right(value = Unknown(name = "Off")) implicit val unknownEncoder = deriveCellEncoder[Advanced.Unknown] -// unknownEncoder: CellEncoder[Advanced.Unknown] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$unaryProductEncoder$3@48014732 +// unknownEncoder: CellEncoder[Advanced.Unknown] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$unaryProductEncoder$3@540bdfa3 implicit val advancedEncoder = deriveCellEncoder[Advanced] -// advancedEncoder: CellEncoder[Advanced] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$coproductEncoder$3@14df31fe +// advancedEncoder: CellEncoder[Advanced] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$coproductEncoder$3@41502325 advancedEncoder(Advanced.On) // res6: String = "Active" @@ -269,7 +269,7 @@

import fs2.data.csv.generic.semiauto._ implicit val MyRowDecoder: CsvRowDecoder[MyRow, String] = deriveCsvRowDecoder[MyRow] -// MyRowDecoder: CsvRowDecoder[MyRow, String] = fs2.data.csv.generic.internal.DerivedCsvRowDecoder$$anon$1@7cd8d21a +// MyRowDecoder: CsvRowDecoder[MyRow, String] = fs2.data.csv.generic.internal.DerivedCsvRowDecoder$$anon$1@529ae911 val decoded = stream.through(decodeUsingHeaders[MyRow]()) // decoded: Stream[[x]Fallible[x], MyRow] = Stream(..) diff --git a/documentation/csv/index.html b/documentation/csv/index.html index ca5e4ff8..5154bc1a 100644 --- a/documentation/csv/index.html +++ b/documentation/csv/index.html @@ -200,9 +200,9 @@

val textStream = Stream.emit(input).covary[Fallible] // textStream: Stream[Fallible, String] = Stream(..) implicit val myRowDecoder: CsvRowDecoder[MyRow, String] = deriveCsvRowDecoder -// myRowDecoder: CsvRowDecoder[MyRow, String] = fs2.data.csv.generic.internal.DerivedCsvRowDecoder$$anon$1@198e96d3 +// myRowDecoder: CsvRowDecoder[MyRow, String] = fs2.data.csv.generic.internal.DerivedCsvRowDecoder$$anon$1@2f7cede7 implicit val myRowEncoder: CsvRowEncoder[MyRow, String] = deriveCsvRowEncoder -// myRowEncoder: CsvRowEncoder[MyRow, String] = fs2.data.csv.generic.internal.DerivedCsvRowEncoder$$anonfun$productWriter$2@47c74343 +// myRowEncoder: CsvRowEncoder[MyRow, String] = fs2.data.csv.generic.internal.DerivedCsvRowEncoder$$anonfun$productWriter$2@35878123 // decodeUsingHeaders can take a `Char` indicating the separator to use // for example `decodeUsingHeaders[MyRow](';') for a semi-colon separated csv @@ -453,7 +453,7 @@

implicit val parseableMyHeaders: ParseableHeader[MyHeaders] = ParseableHeader.instance[MyHeaders] { name => MyHeaders.withNameInsensitiveOption(name).toRight(new HeaderError(s"Unknown header $name")) } -// parseableMyHeaders: ParseableHeader[MyHeaders] = fs2.data.csv.ParseableHeader$$$Lambda$13144/0x00000008035a3c40@16f07a81 +// parseableMyHeaders: ParseableHeader[MyHeaders] = fs2.data.csv.ParseableHeader$$$Lambda$14601/0x00000008038db840@63cfad10 val withMyHeaders = stream.through(lowlevel.headers[Fallible, MyHeaders]) // withMyHeaders: Stream[[x]Fallible[x], CsvRow[MyHeaders]] = Stream(..) @@ -559,10 +559,10 @@

For CellEncoder, it is even easier to define your own as encoding can't fail, so basically it's just a function A => String. The easiest ways to roll your own are using Scala's single abstract method sugar:

case class Wrapper(content: String)
 implicit val wrapperCellEncoder: CellEncoder[Wrapper] = (w: Wrapper) => w.content
-// wrapperCellEncoder: CellEncoder[Wrapper] = repl.MdocSession$MdocApp$$anonfun$9@7b254e82
+// wrapperCellEncoder: CellEncoder[Wrapper] = repl.MdocSession$MdocApp$$anonfun$9@2b14675b

or using contramap on an existing encoder:

implicit val wrapperCellEncoder2: CellEncoder[Wrapper] = CellEncoder[String].contramap(_.content)
-// wrapperCellEncoder2: CellEncoder[Wrapper] = fs2.data.csv.CellEncoder$$anonfun$contramap$2@605d7fe
+// wrapperCellEncoder2: CellEncoder[Wrapper] = fs2.data.csv.CellEncoder$$anonfun$contramap$2@22936583

RowDecoder & RowEncoder

RowDecoders can be used to decode an entire CSV row based on field positions. For instance if you want to decode the CSV data into shapeless HList:

diff --git a/documentation/json/jq/index.html b/documentation/json/jq/index.html index ca3d6fbc..fc8e70ca 100644 --- a/documentation/json/jq/index.html +++ b/documentation/json/jq/index.html @@ -325,7 +325,7 @@

val qCompiler = jq.Compiler[SyncIO] -// qCompiler: jq.Compiler[SyncIO] = fs2.data.json.jq.internal.ESPJqCompiler@70c2675d +// qCompiler: jq.Compiler[SyncIO] = fs2.data.json.jq.internal.ESPJqCompiler@5d1b12e5 val compiled = qCompiler.compile(query).unsafeRunSync() // compiled: Pipe[SyncIO, Token, Token] = <function1> diff --git a/pagefind/fragment/en_14ef3af.pf_fragment b/pagefind/fragment/en_14ef3af.pf_fragment new file mode 100644 index 00000000..18a24d61 Binary files /dev/null and b/pagefind/fragment/en_14ef3af.pf_fragment differ diff --git a/pagefind/fragment/en_1de31ed.pf_fragment b/pagefind/fragment/en_1de31ed.pf_fragment new file mode 100644 index 00000000..ead4d9b7 Binary files /dev/null and b/pagefind/fragment/en_1de31ed.pf_fragment differ diff --git a/pagefind/fragment/en_2fc15bd.pf_fragment b/pagefind/fragment/en_2fc15bd.pf_fragment new file mode 100644 index 00000000..a3ba3c44 Binary files /dev/null and b/pagefind/fragment/en_2fc15bd.pf_fragment differ diff --git a/pagefind/fragment/en_34368da.pf_fragment b/pagefind/fragment/en_34368da.pf_fragment new file mode 100644 index 00000000..af69d606 Binary files /dev/null and b/pagefind/fragment/en_34368da.pf_fragment differ diff --git a/pagefind/fragment/en_38d922a.pf_fragment b/pagefind/fragment/en_38d922a.pf_fragment new file mode 100644 index 00000000..e62e7f1e Binary files /dev/null and b/pagefind/fragment/en_38d922a.pf_fragment differ diff --git a/pagefind/fragment/en_58b7943.pf_fragment b/pagefind/fragment/en_58b7943.pf_fragment new file mode 100644 index 00000000..e245344b Binary files /dev/null and b/pagefind/fragment/en_58b7943.pf_fragment differ diff --git a/pagefind/fragment/en_5caf8de.pf_fragment b/pagefind/fragment/en_5caf8de.pf_fragment new file mode 100644 index 00000000..b0006fd3 Binary files /dev/null and b/pagefind/fragment/en_5caf8de.pf_fragment differ diff --git a/pagefind/fragment/en_6b72f38.pf_fragment b/pagefind/fragment/en_6b72f38.pf_fragment new file mode 100644 index 00000000..aab42aa5 Binary files /dev/null and b/pagefind/fragment/en_6b72f38.pf_fragment differ diff --git a/pagefind/fragment/en_7f7a67e.pf_fragment b/pagefind/fragment/en_7f7a67e.pf_fragment new file mode 100644 index 00000000..dc9ab564 Binary files /dev/null and b/pagefind/fragment/en_7f7a67e.pf_fragment differ diff --git a/pagefind/fragment/en_96c54ae.pf_fragment b/pagefind/fragment/en_96c54ae.pf_fragment new file mode 100644 index 00000000..234ade82 Binary files /dev/null and b/pagefind/fragment/en_96c54ae.pf_fragment differ diff --git a/pagefind/fragment/en_98f7fb8.pf_fragment b/pagefind/fragment/en_98f7fb8.pf_fragment new file mode 100644 index 00000000..bba37bf7 Binary files /dev/null and b/pagefind/fragment/en_98f7fb8.pf_fragment differ diff --git a/pagefind/fragment/en_cdb7b6b.pf_fragment b/pagefind/fragment/en_cdb7b6b.pf_fragment new file mode 100644 index 00000000..98d2e985 Binary files /dev/null and b/pagefind/fragment/en_cdb7b6b.pf_fragment differ diff --git a/pagefind/fragment/en_d475983.pf_fragment b/pagefind/fragment/en_d475983.pf_fragment new file mode 100644 index 00000000..df8c1c25 Binary files /dev/null and b/pagefind/fragment/en_d475983.pf_fragment differ diff --git a/pagefind/fragment/en_dbd3799.pf_fragment b/pagefind/fragment/en_dbd3799.pf_fragment new file mode 100644 index 00000000..3a1eb360 Binary files /dev/null and b/pagefind/fragment/en_dbd3799.pf_fragment differ diff --git a/pagefind/fragment/en_dd6e36b.pf_fragment b/pagefind/fragment/en_dd6e36b.pf_fragment new file mode 100644 index 00000000..afa3d07a Binary files /dev/null and b/pagefind/fragment/en_dd6e36b.pf_fragment differ diff --git a/pagefind/index/en_74a4c4c.pf_index b/pagefind/index/en_74a4c4c.pf_index new file mode 100644 index 00000000..c6ce89c8 Binary files /dev/null and b/pagefind/index/en_74a4c4c.pf_index differ diff --git a/pagefind/index/en_cb13749.pf_index b/pagefind/index/en_cb13749.pf_index new file mode 100644 index 00000000..cac2e659 Binary files /dev/null and b/pagefind/index/en_cb13749.pf_index differ diff --git a/pagefind/pagefind-entry.json b/pagefind/pagefind-entry.json index 87a7ba70..a72db5ea 100644 --- a/pagefind/pagefind-entry.json +++ b/pagefind/pagefind-entry.json @@ -1 +1 @@ -{"version":"1.1.0","languages":{"en":{"hash":"en_2e14b1fd66","wasm":"en","page_count":17}}} \ No newline at end of file +{"version":"1.1.0","languages":{"en":{"hash":"en_f9b256ca5f","wasm":"en","page_count":17}}} \ No newline at end of file diff --git a/pagefind/pagefind.en_f9b256ca5f.pf_meta b/pagefind/pagefind.en_f9b256ca5f.pf_meta new file mode 100644 index 00000000..b357a2ec Binary files /dev/null and b/pagefind/pagefind.en_f9b256ca5f.pf_meta differ