Skip to content

Commit

Permalink
Optimization.
Browse files Browse the repository at this point in the history
  • Loading branch information
ncruces committed Jul 9, 2024
1 parent 5872224 commit 51c325b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ext/bloom/bloom.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ func (b *bloom) Update(arg ...sqlite3.Value) (rowid int64, err error) {
return 0, util.ErrorString("bloom: elements cannot be updated")
}

if arg[2].NoChange() {
return 0, nil
}
blob := arg[2].RawBlob()

f, err := b.db.OpenBlob(b.schema, b.storage, "data", 1, true)
Expand Down Expand Up @@ -303,6 +306,9 @@ func (c *cursor) Filter(idxNum int, idxStr string, arg ...sqlite3.Value) error {
}

func (c *cursor) Column(ctx *sqlite3.Context, n int) error {
if ctx.VTabNoChange() {
return nil
}
switch n {
case 0:
ctx.ResultBool(true)
Expand Down

0 comments on commit 51c325b

Please sign in to comment.