WhereGroupBuilder

조건 그룹의 논리 관계(AND/OR)를 설정하는 Where 그룹 빌더입니다

메서드

constructor

정의:

constructor(yMap: Y.Map<any>)

매개변수:

매개변수타입설명
yMapY.Map-

getConditions

정의:

getConditions(): Y.Array<any>

반환: Y.Array<any>

getId

그룹 ID 가져오기

정의:

getId(): string

반환: string

getOperator

논리 연산자 가져오기

정의:

getOperator(): 'and' | 'or'

반환: 'and' \| 'or'

setOperator

논리 연산자 설정

정의:

setOperator(op: 'and' | 'or'): this

반환: this

매개변수:

매개변수타입설명
op'and' | 'or'- 논리 연산자

add

Where 필터 조건을 그룹에 추가

정의:

add(field: string, callback: (node: WhereFilterNodeBuilder) => void): this

반환: this

매개변수:

매개변수타입설명
fieldstring- 필드명
callback(node: WhereFilterNodeBuilder) => void- 콜백 함수

addGroup

중첩 그룹을 현재 그룹에 추가

정의:

addGroup(op: 'and' | 'or', callback: (group: WhereGroupBuilder) => void): this

반환: this

매개변수:

매개변수타입설명
op'and' | 'or'- 논리 연산자
callback(group: WhereGroupBuilder) => void- 콜백 함수

remove

지정한 ID의 조건 또는 지정한 인덱스의 항목 삭제

정의:

remove(idOrIndex: string | number): this

반환: this

매개변수:

매개변수타입설명
idOrIndexstring | number- ID 또는 인덱스

clear

그룹 내 모든 조건 비우기

정의:

clear(): this

반환: this

toJSON

JSON으로 내보내기

정의:

toJSON(): VBIWhereGroup

반환: VBIWhereGroup