Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturMarekNowak committed Oct 10, 2024
1 parent 5b3dc4b commit 434af60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>` 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`.

Expand Down

0 comments on commit 434af60

Please sign in to comment.