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.
19 lines
506 B
19 lines
506 B
2 years ago
|
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>
|
||
|
|
||
|
}
|