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.
15 lines
355 B
15 lines
355 B
import {Scope} from '../Scope.ts'
|
|
import {WhereBuilder} from '../type/WhereBuilder.ts'
|
|
|
|
export type ScopeFunction = (query: WhereBuilder) => WhereBuilder
|
|
|
|
export class FunctionScope extends Scope {
|
|
constructor(protected _fn: ScopeFunction) {
|
|
super()
|
|
}
|
|
|
|
apply(query: WhereBuilder): WhereBuilder {
|
|
return this._fn(query)
|
|
}
|
|
}
|