Closed eugeis closed 1 week ago
Hi Eugen and thanks for your interest.
It should be somewhat straight forward to create a new event store for pocketbase. I have a collection that is supported sql/bbolt/esdb and there is one external for dynamo db: https://github.com/fd1az/dynamo-es.
I'm willing to help you if you want to create an event store for pockebase that you support and maintain in your GitHub account.
BR Morgan
I had a look at https://pocketbase.io/docs/go-database/ and it seams close to the sql event store as there is a sql database behind pocketbase.
Hi Morgan,
thanks, I will try out to implement it, based on your sql event store.
Hi,
I had a look into pockebase and I think it will work out of the box together with the sql event store.
import (
"github.com/pocketbase/dbx"
_ "github.com/go-sql-driver/mysql"
"github.com/hallgren/eventsourcing/eventstore/sql"
)
db, _ := dbx.Open("mysql", "user:pass@/example")
sqlDB := db.DB() // returns the sql.DB struct from the database/sql package. The same struct that is used in the sql event store.
sqlES := sql.Open(sqlDB) // You now should have an sql event store that you can read and write events to.
I have no idea if bypassing the pockebase DB struct will affect features in pocketbase.
@eugeis I close this issue. Please reach out if you have any more questions or if it just works :)
Hello,
thanks for great design.
I am using pocketbase and looking for an eventsourcing framework to use with it.
Ehat do you think about addidng support for Pocketbase, to use it as base for event and projection stores and to have REST endpoints for events etc.