You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* FileDao basic implementation
* pca/data/dao refactorization, split into a package
* pca/utils/serialization refactorization, split into a package and some
additional coverage
Ok, being rightful to Liskov Substitution Principle (LSP), we shouldn't make FileDao a subclass of InMemoryDao in spite of all the similarities between them. If FileDao is to represent immutable contents of a config file, all the mutating methods of IDao/IQueryChain are becoming fruitless and should be turned into raise NotImplementedError. On the other hand, this solution makes subclassing breaking the LSP -- you can't use any method that would update the DAO contents, which as a result would force the developer of the Repository to know what type of DAO will be used and that is contrary to the DI pattern.
One can conclude that either FileDao entries as mutable, or we have to make IReadOnlyDao/IReadOnlyQueryChain and to make sure that DI pattern recognizes subclassing between fields:
dao: IReadOnlyDao==TinyDbDao() # or sth like that
Acceptance criteria for this issue are to be described later.
Create a simple DAO, which can be a little enhancement to
InMemoryDao
:yaml, json, ini
The text was updated successfully, but these errors were encountered: