The SqlNameMapper object provides predefined strategies for transforming field names into SQL column naming conventions.
This object defines several SqlNameMapper implementations:
SnakeCase: Transforms strings to snake_case (default for SQL). For example, "firstName" → "first_name", "userID" → "user_id".Identity: Returns the input string as-is, performing no transformation.Custom: Allows for user-defined transformations by applying a given function to the input column name.
Attributes
- Companion
- trait
- Source
- SqlNameMapper.scala
- Graph
-
- Supertypes
- Self type
-
SqlNameMapper.type
Members list
Type members
Classlikes
A case class that provides a custom implementation of the SqlNameMapper trait.
A case class that provides a custom implementation of the SqlNameMapper trait.
The Custom class allows for the transformation of field names using a user-defined function. This transformation logic is encapsulated in the function f provided at instantiation.
Value parameters
- f
-
A function that defines how to transform a field name. The function takes a string as input and returns the transformed column name as output.
Attributes
- Source
- SqlNameMapper.scala
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait SqlNameMappertrait String => Stringclass Objecttrait Matchableclass AnyShow all
An implementation of the SqlNameMapper trait that performs no transformation on the provided field name. The identity operation is applied, where the input string is returned unchanged.
An implementation of the SqlNameMapper trait that performs no transformation on the provided field name. The identity operation is applied, where the input string is returned unchanged.
Attributes
- Source
- SqlNameMapper.scala
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait SqlNameMappertrait String => Stringclass Objecttrait Matchableclass AnyShow all
- Self type
-
Identity.type
A predefined implementation of the SqlNameMapper trait that converts a given field name into snake_case format by replacing transitions between uppercase and lowercase letters with underscores (_) and converting all characters to lowercase.
A predefined implementation of the SqlNameMapper trait that converts a given field name into snake_case format by replacing transitions between uppercase and lowercase letters with underscores (_) and converting all characters to lowercase.
For example, "firstName" is transformed into "first_name", and "userID" is transformed into "user_id".
Attributes
- Source
- SqlNameMapper.scala
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait SqlNameMappertrait String => Stringclass Objecttrait Matchableclass AnyShow all
- Self type
-
SnakeCase.type
Inherited and Abstract types
The names of the product elements.
The name of the type.