Skip to content

Commit

Permalink
fix: fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nichenqin committed Sep 8, 2024
1 parent a5100c1 commit 2986c7b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions packages/persistence/src/record/record.filter-visitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,13 @@ export class RecordFilterVisitor extends AbstractQBVisitor<RecordDO> implements
}
}
percentageEqual(spec: PercentageEqual): void {
const cond = this.eb.eb(this.getFieldId(spec), "=", spec.value)
this.addCond(cond)
}
percentageEqual(spec: PercentageEqual): void {
const cond = this.eb.eb(this.getFieldId(spec), "=", spec.value)
this.addCond(cond)
if (!spec.value) {
const cond = this.eb.eb(this.getFieldId(spec), "is", null).or(this.getFieldId(spec), "=", 0)
this.addCond(cond)
} else {
const cond = this.eb.eb(this.getFieldId(spec), "=", spec.value)
this.addCond(cond)
}
}
stringMin(spec: StringMin): void {
const cond = this.eb.eb(this.eb.fn("LENGTH", [this.getFieldId(spec)]), ">=", spec.min)
Expand Down

0 comments on commit 2986c7b

Please sign in to comment.