fireproof-storage / fireproof

Realtime database, runs anywhere. Install Fireproof in your front-end app or edge function, and sync data via any backend.
https://fireproof.storage
Other
220 stars 16 forks source link

feature: logical clock history and logical snapshots #21

Closed jchris closed 9 months ago

jchris commented 9 months ago

The changes api should return the resulting clock head of each change in the history. User agents can use this to load the database at any snapshot.

Keep in mind:

jchris commented 9 months ago

here is a code tour: https://chat.openai.com/share/c1f74595-5538-4d6d-91ca-3c1753732be8

jchris commented 9 months ago

here is GPT generated code from the tour https://gist.github.com/jchris/0fcb5c65031a8f75085e4287a5d28e12

jchris commented 9 months ago
jchris commented 9 months ago

It didn't write tests. Maybe next step is paste the source of this describe block in and have it add to the changes one here: https://github.com/fireproof-storage/fireproof/blob/38c4e050e350edc6df58870ca6777c8428f0b007/packages/fireproof/test/database.test.js#L82

valorant-dhruv commented 9 months ago

0001-Issue-21-Updates-to-changes-API.patch