| | |
| | | this.addCondition('andEqualTo', col.name, col.value); |
| | | return this; |
| | | } |
| | | public andNotEqualTo(col: { name: string, value: any}): Criteria { |
| | | this.addCondition('andNotEqualTo', col.name, col.value); |
| | | return this; |
| | | } |
| | | public andGreaterThanOrEqualTo(col: { name: string, value: any}): Criteria { |
| | | this.addCondition('andGreaterThanOrEqualTo', col.name, col.value); |
| | | return this; |
| | | } |
| | | } |
| | | |
| | | @Injectable() |
| | |
| | | private static OR_SPLIT = 'or|'; |
| | | private static CRITERIA_SPLIT = '|||'; |
| | | private criterion: Criteria[] = []; |
| | | |
| | | public clear(): void { |
| | | this.criterion = []; |
| | | } |
| | | public getSqlParam(): string { |
| | | let whereSql = ''; |
| | | for (const cri of this.criterion) { |