A type that holds an expression and an alias for it.
AliasedExpression<T, A> can be used in places where, in addition to the value type T, you
also need a name A for that value. For example anything you can pass into the select method
needs to implement an AliasedExpression<T, A>. A becomes the name of the selected expression
in the result and T becomes its type.
Example
classSomeAliasedExpression<T, Aextendsstring> implementsAliasedExpression<T, A> { #expression: Expression<T> #alias: A
constructor(expression: Expression<T>, alias: A) { this.#expression = expression this.#alias = alias }
A type that holds an expression and an alias for it.
AliasedExpression<T, A>
can be used in places where, in addition to the value typeT
, you also need a nameA
for that value. For example anything you can pass into theselect
method needs to implement anAliasedExpression<T, A>
.A
becomes the name of the selected expression in the result andT
becomes its type.Example