diff --git a/cookbooks/jq/index.html b/cookbooks/jq/index.html index 0eb38855..8eca3207 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@270ee63b +// queryCompiler: Compiler[IO] = fs2.data.json.jq.internal.ESPJqCompiler@79b7579f 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 3d9252fd..97d8c8da 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@144eff47 +// stateDecoder: CellDecoder[State] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$coproductDecoder$3@6b689340 // 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@4559aa3a +// stateEncoder: CellEncoder[State] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$coproductEncoder$3@272f65a1 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@1b42462c +// unknownDecoder: CellDecoder[Advanced.Unknown] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$unaryProductDecoder$3@7cbba1f1 implicit val advancedDecoder = deriveCellDecoder[Advanced] -// advancedDecoder: CellDecoder[Advanced] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$coproductDecoder$3@510dd9a7 +// advancedDecoder: CellDecoder[Advanced] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$coproductDecoder$3@67dc3a1a 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@32daa006 +// unknownEncoder: CellEncoder[Advanced.Unknown] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$unaryProductEncoder$3@48014732 implicit val advancedEncoder = deriveCellEncoder[Advanced] -// advancedEncoder: CellEncoder[Advanced] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$coproductEncoder$3@3adad41d +// advancedEncoder: CellEncoder[Advanced] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$coproductEncoder$3@14df31fe 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@3051c57a +// MyRowDecoder: CsvRowDecoder[MyRow, String] = fs2.data.csv.generic.internal.DerivedCsvRowDecoder$$anon$1@7cd8d21a 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 5e6cc3e8..ca5e4ff8 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@5de0d4a6 +// myRowDecoder: CsvRowDecoder[MyRow, String] = fs2.data.csv.generic.internal.DerivedCsvRowDecoder$$anon$1@198e96d3 implicit val myRowEncoder: CsvRowEncoder[MyRow, String] = deriveCsvRowEncoder -// myRowEncoder: CsvRowEncoder[MyRow, String] = fs2.data.csv.generic.internal.DerivedCsvRowEncoder$$anonfun$productWriter$2@ad8a496 +// myRowEncoder: CsvRowEncoder[MyRow, String] = fs2.data.csv.generic.internal.DerivedCsvRowEncoder$$anonfun$productWriter$2@47c74343 // 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$14408/0x00000008038bdc40@5c49fdaa +// parseableMyHeaders: ParseableHeader[MyHeaders] = fs2.data.csv.ParseableHeader$$$Lambda$13144/0x00000008035a3c40@16f07a81 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@7d74761
+// wrapperCellEncoder: CellEncoder[Wrapper] = repl.MdocSession$MdocApp$$anonfun$9@7b254e82

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@48e4af19
+// wrapperCellEncoder2: CellEncoder[Wrapper] = fs2.data.csv.CellEncoder$$anonfun$contramap$2@605d7fe

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 d729c83d..ca3d6fbc 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@2d4c7838 +// qCompiler: jq.Compiler[SyncIO] = fs2.data.json.jq.internal.ESPJqCompiler@70c2675d val compiled = qCompiler.compile(query).unsafeRunSync() // compiled: Pipe[SyncIO, Token, Token] = <function1> diff --git a/pagefind/fragment/en_4c5acc2.pf_fragment b/pagefind/fragment/en_4c5acc2.pf_fragment new file mode 100644 index 00000000..fed9e469 Binary files /dev/null and b/pagefind/fragment/en_4c5acc2.pf_fragment differ diff --git a/pagefind/fragment/en_787baab.pf_fragment b/pagefind/fragment/en_787baab.pf_fragment new file mode 100644 index 00000000..9bc609ba Binary files /dev/null and b/pagefind/fragment/en_787baab.pf_fragment differ diff --git a/pagefind/fragment/en_7c1e776.pf_fragment b/pagefind/fragment/en_7c1e776.pf_fragment new file mode 100644 index 00000000..99c033af Binary files /dev/null and b/pagefind/fragment/en_7c1e776.pf_fragment differ diff --git a/pagefind/fragment/en_c5334ff.pf_fragment b/pagefind/fragment/en_c5334ff.pf_fragment new file mode 100644 index 00000000..5711fc04 Binary files /dev/null and b/pagefind/fragment/en_c5334ff.pf_fragment differ diff --git a/pagefind/fragment/en_e1b4f22.pf_fragment b/pagefind/fragment/en_e1b4f22.pf_fragment new file mode 100644 index 00000000..aea17e99 Binary files /dev/null and b/pagefind/fragment/en_e1b4f22.pf_fragment differ diff --git a/pagefind/fragment/en_f0766dd.pf_fragment b/pagefind/fragment/en_f0766dd.pf_fragment new file mode 100644 index 00000000..96279988 Binary files /dev/null and b/pagefind/fragment/en_f0766dd.pf_fragment differ diff --git a/pagefind/index/en_2a28bb4.pf_index b/pagefind/index/en_2a28bb4.pf_index new file mode 100644 index 00000000..ce912b32 Binary files /dev/null and b/pagefind/index/en_2a28bb4.pf_index differ diff --git a/pagefind/index/en_fb6ca57.pf_index b/pagefind/index/en_fb6ca57.pf_index new file mode 100644 index 00000000..4e7ebb2d Binary files /dev/null and b/pagefind/index/en_fb6ca57.pf_index differ diff --git a/pagefind/pagefind-entry.json b/pagefind/pagefind-entry.json index ff40c8fa..87a7ba70 100644 --- a/pagefind/pagefind-entry.json +++ b/pagefind/pagefind-entry.json @@ -1 +1 @@ -{"version":"1.1.0","languages":{"en":{"hash":"en_8a45102e57","wasm":"en","page_count":17}}} \ No newline at end of file +{"version":"1.1.0","languages":{"en":{"hash":"en_2e14b1fd66","wasm":"en","page_count":17}}} \ No newline at end of file diff --git a/pagefind/pagefind.en_2e14b1fd66.pf_meta b/pagefind/pagefind.en_2e14b1fd66.pf_meta new file mode 100644 index 00000000..05c6f4a6 Binary files /dev/null and b/pagefind/pagefind.en_2e14b1fd66.pf_meta differ