reactivemongo.api.bson.FieldNaming
See theFieldNaming companion trait
object FieldNaming
Naming companion
Attributes
- Companion
- trait
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
FieldNaming.type
Members list
Type members
Classlikes
object Identity extends FieldNaming
For each class property, use the name as is for its field (e.g. fooBar -> fooBar).
For each class property, use the name as is for its field (e.g. fooBar -> fooBar).
import reactivemongo.api.bson.{ FieldNaming, MacroConfiguration }
val cfg: MacroConfiguration =
MacroConfiguration(fieldNaming = FieldNaming.Identity)
Attributes
- Supertypes
- Self type
-
Identity.type
object PascalCase extends FieldNaming
For each class property, use the pascal case equivalent to name its field (e.g. fooBar -> FooBar).
For each class property, use the pascal case equivalent to name its field (e.g. fooBar -> FooBar).
import reactivemongo.api.bson.{ FieldNaming, MacroConfiguration }
val cfg: MacroConfiguration =
MacroConfiguration(fieldNaming = FieldNaming.PascalCase)
Attributes
- Supertypes
- Self type
-
PascalCase.type
object SnakeCase extends FieldNaming
For each class property, use the snake case equivalent to name its field (e.g. fooBar -> foo_bar).
For each class property, use the snake case equivalent to name its field (e.g. fooBar -> foo_bar).
import reactivemongo.api.bson.{ FieldNaming, MacroConfiguration }
val cfg: MacroConfiguration =
MacroConfiguration(fieldNaming = FieldNaming.SnakeCase)
Attributes
- Supertypes
- Self type
-
SnakeCase.type
Value members
Concrete methods
Naming using a custom transformation function.
Naming using a custom transformation function.
import reactivemongo.api.bson.{ FieldNaming, MacroConfiguration }
def withNaming(f: String => String): MacroConfiguration =
MacroConfiguration(fieldNaming = FieldNaming(f))
Attributes
In this article