Initializes an aliaser from a given partial function.
Initializes an aliaser from a given partial function.
ColumnAliaser({ case (1, cn) => "my_id" case (_, ColumnName(".foo", _)) => "prefix.foo" })
the column positions (>= 1)
function to determine the alias for the matching columns
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: ""
)
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
ColumnAliaser.withPattern((2 to 3).toSet, "prefix.")