use GameEventStoreInPostgresql instead of InMemory
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
package eventDemo.adapter.infrastructureLayer.event
|
||||
|
||||
import eventDemo.business.entity.GameId
|
||||
import eventDemo.business.event.GameEventStore
|
||||
import eventDemo.business.event.event.GameEvent
|
||||
import eventDemo.libs.event.EventStore
|
||||
import eventDemo.libs.event.EventStoreInPostgresql
|
||||
import kotlinx.serialization.json.Json
|
||||
import javax.sql.DataSource
|
||||
|
||||
/**
|
||||
* A stream to publish and read the played card event.
|
||||
*/
|
||||
class GameEventStoreInPostgresql(
|
||||
dataSource: DataSource,
|
||||
) : GameEventStore,
|
||||
EventStore<GameEvent, GameId> by EventStoreInPostgresql(
|
||||
dataSource,
|
||||
{ Json.encodeToString(it) },
|
||||
{ Json.decodeFromString(it) },
|
||||
)
|
||||
Reference in New Issue
Block a user