io.github.mbannour.mongo.codecs.CodecConfig
Configuration for BSON codec generation behavior.
This configuration object encapsulates all codec generation options, making the API more type-safe and extensible than using boolean flags.
Value parameters
-
discriminatorField
-
Field name used to store type discriminators for sealed hierarchies (default: "_t"). ===Example Usage===
val config = CodecConfig(
noneHandling = NoneHandling.Ignore,
discriminatorField = "_type"
)
-
noneHandling
-
Strategy for handling None values in Option fields.
Attributes
-
Graph
-
-
Supertypes
-
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Members list
Returns true if None values should be encoded as BSON null.
Returns true if None values should be encoded as BSON null.
Attributes
Helper method to set discriminator field - fluent API for functional configuration.
Helper method to set discriminator field - fluent API for functional configuration.
Value parameters
-
field
-
The field name to use for type discriminators
Attributes
-
Example
-
builder.configure(_.withDiscriminator("_type"))
Helper method to set None handling to Encode - fluent API for functional configuration.
Helper method to set None handling to Encode - fluent API for functional configuration.
Attributes
-
Example
-
builder.configure(_.withEncodeNone)
Helper method to set None handling to Ignore - fluent API for functional configuration.
Helper method to set None handling to Ignore - fluent API for functional configuration.
Attributes
-
Example
-
builder.configure(_.withIgnoreNone)
Attributes
-
Inherited from:
-
Product
Attributes
-
Inherited from:
-
Product