mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-11 23:31:03 +00:00
validate existence
This commit is contained in:
parent
784c78e313
commit
ac7a8c3dd5
1 changed files with 13 additions and 11 deletions
24
executor.go
24
executor.go
|
|
@ -8412,18 +8412,20 @@ func (e *executor) executeDeleteRecordFromShard(ctx context.Context, qcx *Qcx, i
|
|||
}
|
||||
}
|
||||
}
|
||||
for _, view := range idx.existenceFld.views() {
|
||||
frag, ok := view.fragments[shard]
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
for _, bit := range columns.Slice() {
|
||||
c, err := frag.clearBit(tx, 0, bit)
|
||||
if err != nil {
|
||||
return false, nil
|
||||
if idx.trackExistence {
|
||||
for _, view := range idx.existenceFld.views() {
|
||||
frag, ok := view.fragments[shard]
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
if c {
|
||||
changed = true
|
||||
for _, bit := range columns.Slice() {
|
||||
c, err := frag.clearBit(tx, 0, bit)
|
||||
if err != nil {
|
||||
return false, nil
|
||||
}
|
||||
if c {
|
||||
changed = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue