# README
ProtoActor Persistence SQL
An implementation of the ProtoActor persistence plugin APIs using RDBMS. It writes journal and snapshot to a configured SQL datastore. At the moment the following data stores are supported out of the box:
The events and state snapshots are protocol buffer bytes array persisted respectively in the journal and snapshot tables.
Note: The developer does not need to create the database tables. They are created by default by the library. One can have a look at them in the constants.go code.
# Functions
NewDBConfig creates an instance of DBConfig.
NewDialect creates a new instance of SQLDialect.
NewJournal creates a new instance of Snapshot.
NewMySQLDialect creates a new instance of SQLDialect.
NewMySQLProvider creates an instance postgres base SQLProvider.
NewPostgresDialect creates a new instance of SQLDialect.
NewPostgresProvider creates an instance postgres base SQLProvider.
NewSnapshot creates a new instance of Snapshot.
NewSQLProvider creates a new instance of the SQLProvider.
WithConnectionMaxLife sets the database connection max life.
WithLogicalDeletion enables logical deletion.
WithMaxIdleConnections sets the max idle connections.
WithMaxOpenConnections sets the max open connections.
WithSnapshotInterval sets the snapshot interval.
# Structs
DBConfig represents the database configuration.
Journal defines the journal row.
Snapshot defines the snapshot row.
SQLProvider defines a generic persistence provider.
SQLProviderState is an implementation of the proto-actor ProviderState interface.
# Interfaces
SQLDialect will be implemented any database dialect.