Comments (2)
Hi!
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 :|
from redisco.
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.
Ex:
m = Model()
m.query() # is ModelSet
example patch: https://github.com/uhbif19/redisco/commit/612682efe09e7c7b2566100c612404d3fb5808dc
That are you thinking about it ?
from redisco.
Related Issues (20)
- Default port ?
- Dumping pickled data HOT 2
- Indexing for DateTimeField and auto_now_add
- Saving twice causes model to become non-unique.
- DateTimeField getting corrupted on save if microsecond part has less then 6 positions
- Add a `unique_together` option
- Missing "zrevrangebyscore" function on SortedSet
- Is a ListField of ReferenceFields possible? HOT 5
- Redisco should be TimeZone Aware
- Operations like ZADD and PUSH should return redis returned value
- filter and chained zfilter prevent filter to be applied
- get_by_id should be aware of previous filters
- Pipelining or Bulk_Create? HOT 1
- ImportError HOT 2
- Recursion issue with ListField of ReferenceField
- Using Mixins to add common fields to a model doesn't work HOT 1
- Self-reference (recursive) ManyToOne/OneToMany relationships available?
- Storing utc datetime values for auto_now_add HOT 2
- DateTimeField save wrong value
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redisco.