Open saracalihan opened 1 year ago
@beyzaerkan This is biggest technical and philosophical major change of metronom. Although we leave an object-based structure and support all types, our forest structure will have to change a little more.
For example, since it does not make sense to use functions such as Model.findAll
in some types, we will have to remove them and add functions related to types, which I think will separate us a little from our initial output.
We can still stick to our core philosophy by adding static functions to models.
I'm curious about your thoughts as this is a big decision.
metronom.define
?
Motivation
When we set out, we had planned to save objects with Redis only with hash type, but now I think that integrating other types of Redis into our system will make our project even stronger.
Currently,
Model
type using embeded hash function and flow. AllModel
functions andModelInstance
should be free from hashing and models should be written to returnModelInstance
for each type.All types has internal
_write
,_read
functions and use it on that's business logic's. All models has to have common metronom datas likeredisClient
so i thing all models should extends onIModel
interface and this interface include that datas.Implementation
IModel
interface(common function like find, getByPk, getAll, destroy ) added andModel
abstructed from hash type~HashModel
implementedStringModel
implementedListModel
implementedSetModel
implementedGeospatialIndexesModel
implementedBitmapModel
implementedBitFieldModel
implementedmore detail for Redis types