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
I'll see if i can refactor anything in #197. It gets a little complicated since each database uses slightly different syntax that cannot be abstracted to a generic implementation
robacarp
changed the title
refactor needed? import methods in adapterts should not know about models
refactor needed? import methods in adapters should not know about models
Jun 23, 2018
@Blacksmoke16 my thought is that the model#import method can pass a Array(Tuple()) down to the adapters (or something similar). At least I think that would keep the model knowledge away from the adapter#import methods.
While updating for Crystal 0.25, I spent some time in the adapters and noticed that each adapter has too much knowledge about the models.
This seems like it could be refactored for Base&import to pass in an
Array(Array(DB::Any))
instead of anArray(Model)
.I believe that this would keep the separation of concerns more clear. Thoughts @amberframework/granite ?
The text was updated successfully, but these errors were encountered: