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
{{ message }}
This repository has been archived by the owner on Jul 20, 2018. It is now read-only.
When queries are made through a class, a Manager is the one that handles that query. It allows for chaining several methods to a single ModelSet - this will give you some kindDSL. This was the plan, but I don't think it's finished.
The key class is for generating the keys to be used when storing stuff in Redis.
Example:
k = Key('Person')
k['1']['name'] # => 'Person:1:name'
Validation is supposed to handle validations - but I think I baked it in somewhere in the attributes.py - I opted to follow how appengine does it, passing validator functions when defining attributes to a model.
utils.py should contain just a bunch of helper functions. _encode_key encodes strings to base64. Strings that are stored in keys are base64 encoded.
ModelBase is the metaclass of the Model. I can't remember why I used functions :|
When queries are made through a class, a Manager is the one that handles that query. > It allows for chaining several methods to a single ModelSet - this will give you some
kindDSL. This was the plan, but I don't think it's finished.
If object is field (not method) it means that object is constant at every call. In a reality every object geting prodce new ModelSet instance.
IMHO SQLAlchemy-style will be more clear and simple.
I was looking at redisco models code, to adapt my patch to Models. I become many questions about its architecture.
What is doing Manager class ? It is just a alias to ModelSet ?
What is doing key.py, validation.py, utils.py ?
For what is need ModelBase ? Why ModelBase init was splited to many functions ? Why not methods ?
Uhm. Thanks :)
The text was updated successfully, but these errors were encountered: