Skip to content

Commit

Permalink
deploy: 8153389
Browse files Browse the repository at this point in the history
  • Loading branch information
clairemcginty committed Jan 12, 2024
1 parent 58af5de commit 4443ec2
Show file tree
Hide file tree
Showing 197 changed files with 401 additions and 266 deletions.
2 changes: 1 addition & 1 deletion api/magnolify/avro/AvroField$$Aux.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/avro/AvroField$$FromWord.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/avro/AvroField$$LogicalTypeWord.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/avro/AvroField$$Record.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/avro/AvroField$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/avro/AvroField.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/avro/AvroType$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/avro/AvroType.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/avro/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/avro/logical/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/avro/logical/package$$bigquery$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/avro/logical/package$$micros$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/avro/logical/package$$millis$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/bigquery/TableRowField$$Aux.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/bigquery/TableRowField$$FromWord.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/bigquery/TableRowField$$Generic.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/bigquery/TableRowField$$Record.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/bigquery/TableRowField$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/bigquery/TableRowField.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/bigquery/TableRowType$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/bigquery/TableRowType.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/bigquery/description.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/bigtable/BigtableField$$FromWord.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/bigtable/BigtableField$$Primitive.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/bigtable/BigtableField$$Record.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/bigtable/BigtableField$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/bigtable/BigtableField.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/bigtable/BigtableType$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/bigtable/BigtableType.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/cats/LowPriority0Implicits.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/cats/LowPriority2Implicits.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/cats/LowPriority3Implicits.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/cats/LowPriority4Implicits.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/cats/LowPriority5Implicits.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/cats/LowPriority6Implicits.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/cats/semiauto/BandDerivation$.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/cats/semiauto/EqDerivation$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/cats/semiauto/GroupDerivation$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/cats/semiauto/HashDerivation$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/cats/semiauto/MonoidDerivation$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/cats/semiauto/SemigroupDerivation$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/cats/semiauto/ShowDerivation$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/datastore/EntityField$$FromWord.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/datastore/EntityField$$Record.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/datastore/EntityField$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/datastore/EntityField.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/datastore/EntityType$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/datastore/EntityType.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/datastore/KeyField$$FromWord.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/datastore/KeyField$$NotSupported.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/datastore/KeyField$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/datastore/KeyField.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/datastore/TimestampConverter$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/datastore/excludeFromIndexes.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/datastore/key.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/guava/semiauto/FunnelDerivation$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/guava/semiauto/FunnelImplicits.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/guava/semiauto/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/neo4j/ValueField$$FromWord.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/neo4j/ValueField$$Record.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/neo4j/ValueField$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/neo4j/ValueField.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/neo4j/ValueType$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/neo4j/ValueType.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/ParquetArray$$AvroCompat$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/ParquetArray$$default$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/ParquetArray$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/ParquetArray.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/ParquetField$$FromWord.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/ParquetField$$LogicalTypeWord.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/ParquetField$$Primitive.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/ParquetField$$Record.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/ParquetField$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/ParquetField.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/ParquetType$$ReadBuilder.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/ParquetType$$ReadSupport.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/ParquetType$$WriteBuilder.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/ParquetType$$WriteSupport.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/ParquetType$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/ParquetType.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/Predicate$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/SchemaUtil$$Array$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/SchemaUtil$$Record$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/SchemaUtil$$Union$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/SchemaUtil$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/TypeConverter.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/logical/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/logical/package$$micros$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/logical/package$$millis$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/parquet/logical/package$$nanos$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/protobuf/ProtobufField$$Aux.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/protobuf/ProtobufField$$FromWord.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/protobuf/ProtobufField$$Record.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/protobuf/ProtobufField$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/protobuf/ProtobufField.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/protobuf/ProtobufType$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/protobuf/ProtobufType.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/refined/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/refined/package$$avro$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/refined/package$$bigquery$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/refined/package$$bigtable$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/refined/package$$datastore$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/refined/package$$guava$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/refined/package$$protobuf$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/refined/package$$tensorflow$.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/scalacheck/semiauto/CogenDerivation$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/AnnotationType$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/AnnotationType.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/AnnotationTypeCompanionMacros.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/AnnotationTypeMacros$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/CaseMapper$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/CaseMapper.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/Converter.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/Decimal$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/EnumType$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/EnumType.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/EnumTypeCompanionLowPrioMacros.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/EnumTypeCompanionMacros.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/EnumTypeDerivation$EnumValue.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/EnumTypeDerivation.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/EnumTypeMacros$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/ReflectionUtils$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/UnsafeEnum$$Known.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/UnsafeEnum$$Unknown.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/UnsafeEnum$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/UnsafeEnum.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shared/doc.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shims/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/shims/package$$MurmurHash3Compat$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tensorflow/ExampleField$$FromWord.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tensorflow/ExampleField$$Primitive.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tensorflow/ExampleField$$Record.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tensorflow/ExampleField$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tensorflow/ExampleField.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tensorflow/ExampleType$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tensorflow/ExampleType.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tensorflow/doc.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/AvroParser$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/BigQueryParser$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Composite.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Mapped.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Optional.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/ParquetParser$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$BigDecimal$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$BigInt$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$Boolean$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$Byte$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$Bytes$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$Char$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$Double$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$Enum.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$Float$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$Instant$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$Int$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$LocalDate$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$LocalDateTime$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$LocalTime$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$Long$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$Null$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$OffsetTime$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$Short$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$String$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$$UUID$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Primitive.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Record$$Field.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Record$.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Record.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Repeated.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/Schema.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/SchemaParser.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/magnolify/tools/SchemaPrinter$.html

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions avro.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
<ul style="display: none">
<li class="md-nav__item md-version" id="project.version">
<label class="md-nav__link" for="__version">
<i class="md-icon" title="Version">label_outline</i> 0.7-ed96b4a*
<i class="md-icon" title="Version">label_outline</i> 0.7-8153389*
</label>
</li>
</ul>
Expand All @@ -173,7 +173,7 @@
<div class="md-content__searchable">
<h1><a href="#avro" name="avro" class="anchor"><span class="anchor-link"></span></a>Avro</h1>
<p><code>AvroType[T]</code> provides conversion between Scala type <code>T</code> and Avro <code>GenericRecord</code>. Custom support for type <code>T</code> can be added with an implicit instance of <code>AvroField[T]</code>.</p>
<pre class="prettyprint"><code class="language-scala mdoc:compile-only">import java.net.URI
<pre class="prettyprint"><code class="language-scala">import java.net.URI

case class CountryCode(code: String)
case class Inner(long: Long, str: String, uri: URI, cc: CountryCode)
Expand All @@ -199,12 +199,12 @@ <h1><a href="#avro" name="avro" class="anchor"><span class="anchor-link"></span>
</code></pre>
<p>Enum-like types map to Avro enums. See <a href="enums.html">EnumType</a> for more details. Additional <code>AvroField[T]</code> instances for <code>Byte</code>, <code>Char</code>, <code>Short</code>, and <code>UnsafeEnum[T]</code> are available from <code>import magnolify.avro.unsafe._</code>. These conversions are unsafe due to potential overflow.</p>
<p>Achieving backward compatibility when adding new fields to the case class: new fields must have a default parameter value in order to generate backward compatible Avro schema <code>avroType.schema</code>.</p>
<pre class="prettyprint"><code class="language-scala mdoc:compile-only">case class Record(oldField: String, newField: String = &quot;&quot;)
<pre class="prettyprint"><code class="language-scala">case class Record(oldField: String, newField: String = &quot;&quot;)
// OR
case class Record2(oldField: String, newField: Option[String] = None)
</code></pre>
<p>To populate Avro type and field <code>doc</code>s, annotate the case class and its fields with the <code>@doc</code> annotation.</p>
<pre class="prettyprint"><code class="language-scala mdoc:compile-only">import magnolify.avro._
<pre class="prettyprint"><code class="language-scala">import magnolify.avro._

@doc(&quot;My record&quot;)
case class Record(@doc(&quot;int field&quot;) i: Int, @doc(&quot;string field&quot;) s: String)
Expand All @@ -216,15 +216,15 @@ <h1><a href="#avro" name="avro" class="anchor"><span class="anchor-link"></span>
}
</code></pre>
<p>The <code>@doc</code> annotation can also be extended to support custom format.</p>
<pre class="prettyprint"><code class="language-scala mdoc:compile-only">import magnolify.avro._
<pre class="prettyprint"><code class="language-scala">import magnolify.avro._

class myDoc(doc: String, version: Int) extends doc(s&quot;doc: $doc, version: $version&quot;)

@myDoc(&quot;My record&quot;, 2)
case class Record(@myDoc(&quot;int field&quot;, 1) i: Int, @myDoc(&quot;string field&quot;, 2) s: String)
</code></pre>
<p>To use a different field case format in target records, add an optional <code>CaseMapper</code> argument to <code>AvroType</code>. The following example maps <code>firstName</code> &amp; <code>lastName</code> to <code>first_name</code> &amp; <code>last_name</code>.</p>
<pre class="prettyprint"><code class="language-scala mdoc:compile-only">import magnolify.avro._
<pre class="prettyprint"><code class="language-scala">import magnolify.avro._
import magnolify.shared.CaseMapper
import com.google.common.base.CaseFormat

Expand All @@ -235,21 +235,21 @@ <h1><a href="#avro" name="avro" class="anchor"><span class="anchor-link"></span>
avroType.to(LowerCamel(&quot;John&quot;, &quot;Doe&quot;))
</code></pre>
<p>Avro <code>decimal</code> and <code>uuid</code> logical types map to <code>BigDecimal</code> and <code>java.util.UUID</code>. Additionally <code>decimal</code> requires <code>precision</code> and optional <code>scale</code> parameter.</p>
<pre class="prettyprint"><code class="language-scala mdoc:compile-only">import magnolify.avro._
<pre class="prettyprint"><code class="language-scala">import magnolify.avro._

implicit val afBigDecimal: AvroField[BigDecimal] = AvroField.bigDecimal(20, 4)
</code></pre>
<p>Among the date/time types, <code>date</code> maps to <code>java.time.LocalDate</code>. The other types, <code>timestamp</code>, <code>time</code> and <code>local-timestamp</code>, map to <code>Instant</code>, <code>LocalTime</code> and <code>LocalDateTime</code> in either micro or milliseconds precision with <code>import magnolify.avro.logical.micros._</code> or <code>import magnolify.avro.logical.millis._</code>.</p>
<p>Map logical types to BigQuery compatible Avro with <code>import magnolify.avro.logical.bigquery._</code>.</p>
</div>
<div>
<a href="https://github.com/spotify/magnolify/tree/master/site/src/main/paradox/avro.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/spotify/magnolify/tree/master/site/target/mdoc/avro.md" title="Edit this page" class="md-source-file md-edit">
Edit this page
</a>
</div>
<div class="print-only">
<span class="md-source-file md-version">
0.7-ed96b4a*
0.7-8153389*
</span>
</div>
</article>
Expand Down
14 changes: 7 additions & 7 deletions bigquery.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
<ul style="display: none">
<li class="md-nav__item md-version" id="project.version">
<label class="md-nav__link" for="__version">
<i class="md-icon" title="Version">label_outline</i> 0.7-ed96b4a*
<i class="md-icon" title="Version">label_outline</i> 0.7-8153389*
</label>
</li>
</ul>
Expand All @@ -173,7 +173,7 @@
<div class="md-content__searchable">
<h1><a href="#bigquery" name="bigquery" class="anchor"><span class="anchor-link"></span></a>BigQuery</h1>
<p><code>TableRowType[T]</code> provides conversion between Scala type <code>T</code> and BigQuery <code>TableRow</code>. Custom support for type <code>T</code> can be added with an implicit instance of <code>TableRowField[T]</code>.</p>
<pre class="prettyprint"><code class="language-scala mdoc:compile-only">import java.net.URI
<pre class="prettyprint"><code class="language-scala">import java.net.URI
case class Inner(long: Long, str: String, uri: URI)
case class Outer(inner: Inner)
val record = Outer(Inner(1L, &quot;hello&quot;, URI.create(&quot;https://www.spotify.com&quot;)))
Expand All @@ -193,13 +193,13 @@ <h1><a href="#bigquery" name="bigquery" class="anchor"><span class="anchor-link"
</code></pre>
<p>Additional <code>TableRowField[T]</code> instances for <code>Byte</code>, <code>Char</code>, <code>Short</code>, <code>Int</code>, <code>Float</code>, and enum-like types are available from <code>import magnolify.bigquery.unsafe._</code>. These conversions are unsafe due to potential overflow or encoding errors. See <a href="enums.html">EnumType</a> for more details.</p>
<p>To populate BigQuery table and field <code>description</code>s, annotate the case class and its fields with the <code>@description</code> annotation.</p>
<pre class="prettyprint"><code class="language-scala mdoc:compile-only">import magnolify.bigquery._
<pre class="prettyprint"><code class="language-scala">import magnolify.bigquery._

@description(&quot;My record&quot;)
case class Record(@description(&quot;int field&quot;) i: Int, @description(&quot;string field&quot;) s: String)
</code></pre>
<p>The <code>@description</code> annotation can also be extended to support custom format.</p>
<pre class="prettyprint"><code class="language-scala mdoc:compile-only">import magnolify.bigquery._
<pre class="prettyprint"><code class="language-scala">import magnolify.bigquery._

class myDesc(description: String, version: Int)
extends description(s&quot;description: $description, version: $version&quot;)
Expand All @@ -208,7 +208,7 @@ <h1><a href="#bigquery" name="bigquery" class="anchor"><span class="anchor-link"
case class Record(@myDesc(&quot;int field&quot;, 1) i: Int, @myDesc(&quot;string field&quot;, 2) s: String)
</code></pre>
<p>To use a different field case format in target records, add an optional <code>CaseMapper</code> argument to <code>TableRowType</code>. The following example maps <code>firstName</code> &amp; <code>lastName</code> to <code>first_name</code> &amp; <code>last_name</code>.</p>
<pre class="prettyprint"><code class="language-scala mdoc:compile-only">import magnolify.bigquery._
<pre class="prettyprint"><code class="language-scala">import magnolify.bigquery._
import magnolify.shared.CaseMapper
import com.google.common.base.CaseFormat

Expand All @@ -220,13 +220,13 @@ <h1><a href="#bigquery" name="bigquery" class="anchor"><span class="anchor-link"
</code></pre>
</div>
<div>
<a href="https://github.com/spotify/magnolify/tree/master/site/src/main/paradox/bigquery.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/spotify/magnolify/tree/master/site/target/mdoc/bigquery.md" title="Edit this page" class="md-source-file md-edit">
Edit this page
</a>
</div>
<div class="print-only">
<span class="md-source-file md-version">
0.7-ed96b4a*
0.7-8153389*
</span>
</div>
</article>
Expand Down
10 changes: 5 additions & 5 deletions bigtable.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
<ul style="display: none">
<li class="md-nav__item md-version" id="project.version">
<label class="md-nav__link" for="__version">
<i class="md-icon" title="Version">label_outline</i> 0.7-ed96b4a*
<i class="md-icon" title="Version">label_outline</i> 0.7-8153389*
</label>
</li>
</ul>
Expand All @@ -173,7 +173,7 @@
<div class="md-content__searchable">
<h1><a href="#bigtable" name="bigtable" class="anchor"><span class="anchor-link"></span></a>Bigtable</h1>
<p><code>BigtableType[T]</code> provides conversion between Scala type <code>T</code> and Bigtable <code>Row</code>/<code>Seq[Mutation]</code> for read/write. Custom support for type <code>T</code> can be added with an implicit instance of <code>BigtableField[T]</code>.</p>
<pre class="prettyprint"><code class="language-scala mdoc:compile-only">import java.net.URI
<pre class="prettyprint"><code class="language-scala">import java.net.URI
case class Inner(long: Long, str: String, uri: URI)
case class Outer(inner: Inner)
val record = Outer(Inner(1L, &quot;hello&quot;, URI.create(&quot;https://www.spotify.com&quot;)))
Expand All @@ -192,7 +192,7 @@ <h1><a href="#bigtable" name="bigtable" class="anchor"><span class="anchor-link"
</code></pre>
<p><code>BigtableType</code> encodes each field in a separate column qualifier of the same name. It encodes nested fields by joining field names as <code>field_a.field_b.field_c</code>. Repeated types are not supported. Enum-like types map to strings. See <a href="enums.html">EnumType</a> for more details.</p>
<p>To use a different field case format in target records, add an optional <code>CaseMapper</code> argument to <code>BigtableType</code>. The following example maps <code>firstName</code> &amp; <code>lastName</code> to <code>first_name</code> &amp; <code>last_name</code>.</p>
<pre class="prettyprint"><code class="language-scala mdoc:compile-only">import magnolify.bigtable._
<pre class="prettyprint"><code class="language-scala">import magnolify.bigtable._
import magnolify.shared.CaseMapper
import com.google.common.base.CaseFormat

Expand All @@ -204,13 +204,13 @@ <h1><a href="#bigtable" name="bigtable" class="anchor"><span class="anchor-link"
</code></pre>
</div>
<div>
<a href="https://github.com/spotify/magnolify/tree/master/site/src/main/paradox/bigtable.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/spotify/magnolify/tree/master/site/target/mdoc/bigtable.md" title="Edit this page" class="md-source-file md-edit">
Edit this page
</a>
</div>
<div class="print-only">
<span class="md-source-file md-version">
0.7-ed96b4a*
0.7-8153389*
</span>
</div>
</article>
Expand Down
33 changes: 27 additions & 6 deletions cats.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
<ul style="display: none">
<li class="md-nav__item md-version" id="project.version">
<label class="md-nav__link" for="__version">
<i class="md-icon" title="Version">label_outline</i> 0.7-ed96b4a*
<i class="md-icon" title="Version">label_outline</i> 0.7-8153389*
</label>
</li>
</ul>
Expand All @@ -174,7 +174,7 @@
<h1><a href="#cats" name="cats" class="anchor"><span class="anchor-link"></span></a>Cats</h1>
<p>Type class derivation for Cats can be performed both automatically and semi-automatically.</p>
<p>Automatic derivation are provided as implicits through <code>import magnolify.cats.auto._</code>.</p>
<pre class="prettyprint"><code class="language-scala mdoc:compile-only">case class Inner(int: Int, str: String)
<pre class="prettyprint"><code class="language-scala">case class Inner(int: Int, str: String)
case class Outer(inner: Inner)

// Cats Semigroup
Expand All @@ -185,7 +185,7 @@ <h1><a href="#cats" name="cats" class="anchor"><span class="anchor-link"></span>
sg.combine(Outer(Inner(1, &quot;hello, &quot;)), Outer(Inner(100, &quot;world!&quot;))) // = Outer(Inner(101,hello, world!))
</code></pre>
<p>Some <a href="https://github.com/twitter/algebird">Algebird</a> instances extend those from Cats and can be derived as well.</p>
<pre class="prettyprint"><code class="language-scala mdoc:compile-only">import magnolify.cats.auto._
<pre class="prettyprint"><code class="language-scala">import magnolify.cats.auto._
import com.twitter.{algebird =&gt; a}

case class Record(i: Int, o: Option[Int], l: List[Int], s: Set[Int], m: Map[String, Int])
Expand All @@ -195,7 +195,7 @@ <h1><a href="#cats" name="cats" class="anchor"><span class="anchor-link"></span>
val mon: a.Monoid[Record] = implicitly[a.Monoid[Record]]
</code></pre>
<p>Semi-automatic derivation needs to be called explicitly.</p>
<pre class="prettyprint"><code class="language-scala mdoc:fail">import magnolify.cats.semiauto._
<pre class="prettyprint"><code class="language-scala">import magnolify.cats.semiauto._
import cats._

case class Inner(int: Int, str: String)
Expand All @@ -208,16 +208,37 @@ <h1><a href="#cats" name="cats" class="anchor"><span class="anchor-link"></span>

// this fails due to missing `Group[String]` instance
val group: Group[Outer] = GroupDerivation[Outer]
// error: sg is already defined as value sg
// val sg: a.Semigroup[Record] = implicitly[a.Semigroup[Record]]
// ^^
// error: Inner is already defined as case class Inner
// case class Inner(int: Int, str: String)
// ^^^^^
// error: Outer is already defined as case class Outer
// case class Outer(inner: Inner)
// ^^^^^
// error: sg is already defined as value sg
// val sg: Semigroup[Outer] = SemigroupDerivation[Outer]
// ^^
// error: mon is already defined as value mon
// val mon: Monoid[Outer] = MonoidDerivation[Outer]
// ^^^
// error: magnolia: could not find Group.Typeclass for type String
// in parameter &#39;str&#39; of product type repl.MdocSession.MdocApp.Inner
// in parameter &#39;inner&#39; of product type repl.MdocSession.MdocApp.Outer
//
// val group: Group[Outer] = GroupDerivation[Outer]
// ^^^^^^^^^^^^^^^^^^^^^^
</code></pre>
</div>
<div>
<a href="https://github.com/spotify/magnolify/tree/master/site/src/main/paradox/cats.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/spotify/magnolify/tree/master/site/target/mdoc/cats.md" title="Edit this page" class="md-source-file md-edit">
Edit this page
</a>
</div>
<div class="print-only">
<span class="md-source-file md-version">
0.7-ed96b4a*
0.7-8153389*
</span>
</div>
</article>
Expand Down
14 changes: 7 additions & 7 deletions datastore.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
<ul style="display: none">
<li class="md-nav__item md-version" id="project.version">
<label class="md-nav__link" for="__version">
<i class="md-icon" title="Version">label_outline</i> 0.7-ed96b4a*
<i class="md-icon" title="Version">label_outline</i> 0.7-8153389*
</label>
</li>
</ul>
Expand All @@ -173,7 +173,7 @@
<div class="md-content__searchable">
<h1><a href="#datastore" name="datastore" class="anchor"><span class="anchor-link"></span></a>Datastore</h1>
<p><code>EntityType[T]</code> provides conversion between Scala type <code>T</code> and Datastore <code>Entity</code>. Custom support for type <code>T</code> can be added with an implicit instance of <code>EntityField[T]</code>.</p>
<pre class="prettyprint"><code class="language-scala mdoc:compile-only">import java.net.URI
<pre class="prettyprint"><code class="language-scala">import java.net.URI

case class Inner(long: Long, str: String, uri: URI)
case class Outer(inner: Inner)
Expand All @@ -191,7 +191,7 @@ <h1><a href="#datastore" name="datastore" class="anchor"><span class="anchor-lin
</code></pre>
<p>Additional <code>EntityField[T]</code> instances for <code>Byte</code>, <code>Char</code>, <code>Short</code>, <code>Int</code>, <code>Float</code>, and enum-like types are available from <code>import magnolify.datastore.unsafe._</code>. These conversions are unsafe due to potential overflow or encoding errors. Enum like types map to strings. See <a href="enums.html">EnumType</a> for more details.</p>
<p>To set a field as key, annotate the field with <code>key</code> annotation.</p>
<pre class="prettyprint"><code class="language-scala mdoc:compile-only">import magnolify.datastore._
<pre class="prettyprint"><code class="language-scala">import magnolify.datastore._
import com.google.protobuf.ByteString

// Leave projectId as empty, use current package as namespaceId and class name &quot;Record&quot; as kind
Expand All @@ -210,11 +210,11 @@ <h1><a href="#datastore" name="datastore" class="anchor"><span class="anchor-lin
implicit val kfRecord: KeyField[RecordKey] = KeyField.at[RecordKey](r =&gt; r.s + r.l)
</code></pre>
<p>To exclude a property from indexes, annotate the field with <code>excludeFromIndexes</code> annotation.</p>
<pre class="prettyprint"><code class="language-scala mdoc:compile-only">import magnolify.datastore._
<pre class="prettyprint"><code class="language-scala">import magnolify.datastore._
case class Record(@excludeFromIndexes i: Int, @excludeFromIndexes(true) s: String)
</code></pre>
<p>To use a different field case format in target records, add an optional <code>CaseMapper</code> argument to <code>EntityType</code>. The following example maps <code>firstName</code> &amp; <code>lastName</code> to <code>first_name</code> &amp; <code>last_name</code>.</p>
<pre class="prettyprint"><code class="language-scala mdoc:compile-only">import magnolify.datastore._
<pre class="prettyprint"><code class="language-scala">import magnolify.datastore._
import magnolify.shared.CaseMapper
import com.google.common.base.CaseFormat

Expand All @@ -226,13 +226,13 @@ <h1><a href="#datastore" name="datastore" class="anchor"><span class="anchor-lin
</code></pre>
</div>
<div>
<a href="https://github.com/spotify/magnolify/tree/master/site/src/main/paradox/datastore.md" title="Edit this page" class="md-source-file md-edit">
<a href="https://github.com/spotify/magnolify/tree/master/site/target/mdoc/datastore.md" title="Edit this page" class="md-source-file md-edit">
Edit this page
</a>
</div>
<div class="print-only">
<span class="md-source-file md-version">
0.7-ed96b4a*
0.7-8153389*
</span>
</div>
</article>
Expand Down
Loading

0 comments on commit 4443ec2

Please sign in to comment.