All checks were successful
continuous-integration/drone/push Build is passing
12 lines
295 B
TypeScript
12 lines
295 B
TypeScript
import {Scope} from './Scope'
|
|
import {AbstractBuilder} from '../../builder/AbstractBuilder'
|
|
|
|
/**
|
|
* A basic scope to limit results where `active` = true.
|
|
*/
|
|
export class ActiveScope extends Scope {
|
|
apply(query: AbstractBuilder<any>): void {
|
|
query.where('active', '=', true)
|
|
}
|
|
}
|