ostafen / clover

A lightweight document-oriented NoSQL database written in pure Golang.
MIT License
666 stars 55 forks source link

Feature slice indexing #61

Closed DaniloMarques1 closed 1 year ago

DaniloMarques1 commented 2 years ago

I had to change the way the loop was done so that I could "advance" the fields whenever we hit a slice field (not sure if that was the best approach though, I was trying not to change the function so much).

Basically, every time we find a slice field, we step into lookupSliceField and do the indexing, returning the value found (after indexing) and the correct number of increments the control loop variable should do (aka skip the indexing fields in the current loop).

I also needed to add a books.json file so that I could cover indexing.

ostafen commented 1 year ago

Sorry for not answering for a lot of time. However, since the PR was submitted, many changes have been done to the structure, and actually the v2 branch is the only supported one. If you would like to re-submit this targeting the v2 branch, I'll really appreciate it. Otherwise, I'll have to close this.