You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
469 B

import {Select} from '../../builder/type/Select.ts'
export class ModelSelect<T> extends Select<T> {
protected _withs: string[] = []
public with(related: string) {
this._withs.push(related)
return this
}
public get eager_relations(): string[] {
return [...this._withs]
}
clone(): ModelSelect<T> {
const select = super.clone() as ModelSelect<T>
select._withs = this._withs
return select
}
}