Initializes an aliaser from a given partial function.
Initializes an aliaser from a given partial function.
import anorm.{ ColumnAliaser, ColumnName } ColumnAliaser({ case (1, _) => "my_id" case (_, ColumnName(".foo", _)) => "prefix.foo" })
the column positions (>= 1)
function to determine the alias for the matching columns
import anorm.ColumnAliaser ColumnAliaser.perPositions((2 to 3).toSet) { case (2, _) => "prefix.foo" case _ => "bar" }
the column positions (>= 1)
the prefix to be prepended to the aliases of the matching columns
the suffix to be appended to the aliases (default: ""
)
anorm.ColumnAliaser.withPattern((2 to 3).toSet, "prefix.")
the prefix to be prepended to the aliases of the matching columns
the suffix to be appended to the aliases (default: ""
)
the column positions (>= 1); duplicate are merged
anorm.ColumnAliaser.withPattern((2 to 3).toSet, "prefix.")