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.
lib/src/orm/model/scope/Scope.ts

19 lines
506 B

import {Injectable, InjectionAware} from '../../../di'
import {Awaitable} from '../../../util'
import {AbstractBuilder} from '../../builder/AbstractBuilder'
/**
* A closure that takes a query and applies some scope to it.
*/
export type ScopeClosure = (query: AbstractBuilder<any>) => Awaitable<void>
/**
* Base class for scopes that can be applied to queries.
*/
@Injectable()
export abstract class Scope extends InjectionAware {
abstract apply(query: AbstractBuilder<any>): Awaitable<void>
}