ostafen / clover

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

Added example for updating a single document #14

Closed jsgm closed 2 years ago

ostafen commented 2 years ago

Hi, its seems that in the example the docId variable isn't defined

jsgm commented 2 years ago

Hi, its seems that in the example the docId variable isn't defined

Great, let's see if now it's better.

Added a more detailed example, using the new Limit() parameter as well. Thanks for noticing the detail!

ostafen commented 2 years ago

Hi, jsgm. It looks nice now. Before I merge your changes, could you please squash your commit into one in order to keep a clean history?

EDIT: since I added the FindFirst() method, we could use it in the example you inserted (instead of the Limit(1).FindAll() sequence).

jsgm commented 2 years ago

Hi, jsgm. It looks nice now. Before I merge your changes, could you please squash your commit into one in order to keep a clean history?

EDIT: since I added the FindFirst() method, we could use it in the example you inserted (instead of the Limit(1).FindAll() sequence).

Added FindFirst() example

ostafen commented 2 years ago

Thank you :=)