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
To retrieve items from a data source, Backend abstract class implements the method fetch. This method creates a generator that will get data calling to fetch_items. By default, this method is not implemented because the logic to fetch data is specific for each data source.
Backends also have to override fetch method to add specific parameters. This method also needs to call to the parent fetch that will all the job. This is a problem because any change in Backend.fetch() needs to be spread around all the classes (e.g move archive from __init__ to fetch).
In my opinion, fetch shouldn't be overiden. The only method backends should implement to add the retrieval logic is fetch_items.
The text was updated successfully, but these errors were encountered:
To retrieve items from a data source,
Backend
abstract class implements the methodfetch
. This method creates a generator that will get data calling tofetch_items
. By default, this method is not implemented because the logic to fetch data is specific for each data source.Backends also have to override
fetch
method to add specific parameters. This method also needs to call to the parentfetch
that will all the job. This is a problem because any change inBackend.fetch()
needs to be spread around all the classes (e.g movearchive
from__init__
tofetch
).In my opinion,
fetch
shouldn't be overiden. The only method backends should implement to add the retrieval logic isfetch_items
.The text was updated successfully, but these errors were encountered: