From 434af60799ce68aa2ec7f42643ede1d7a98019e9 Mon Sep 17 00:00:00 2001 From: ArturMarekNowak Date: Thu, 10 Oct 2024 19:26:28 +0200 Subject: [PATCH] Update docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ede8ed2..fc66ffd 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ This project is a PoC of queries distribution between replicas of postgres datab The idea was to split databse contexts into three: 1. _Base_ - base database contexts from which remaining contexts are inheriting `DbSet` properties from 2. _ReadWrite_ - the context that that can run SELECTs, UPDATEs, INSERTs and DELETEs. This database context is utilized by CQRS handlers which take CQRS commands as input -3. _ReadOnly_ - the context that that can run only SELECTs. This database context is utilized by CQRS handlers which take CQRS queries as input. This class overrides `SaveChanges` and `SaveChangesAsync` overload and throws an error in case they are invoked +3. _ReadOnly_ - the context that that can run only SELECTs. This database context is utilized by CQRS handlers which take CQRS queries as input. This class overrides `SaveChanges` and `SaveChangesAsync` methods and throws an error in case they are invoked On the database level seperation is done by creation of replica and usage od dedicated connection string. Replica accepts only read only queries where as primary database accepts all queries. _ReadOnly_ context utilizes connection string with `ro_user` database user where as _ReadWrite_ context utilizes connection string with `rw_user`.