mjpearson / Pandra

Cassandra abstraction layer and keyspace scaffolder for PHP developers --- ABANDONED.
GNU Lesser General Public License v3.0
93 stars 11 forks source link

@todo validator extensions, consolidate oql against column containers #38

Open mjpearson opened 14 years ago

mjpearson commented 14 years ago

rewrite validator as event listeners via filter_var (FILTER_CALLBACK) to be added to keys, (super) column names and value set mutators. Add validators automatically in the model based on container types (utf8, long, uuid).

key and value validators will be superceded by enumerated validator scopes (VALIDATOR_KEY, VALIDATOR_NAME, VALIDATOR_VALUE) and enforced by the ColumnPathable interface.

Can probably drop /query or related clauses entirely and use validators for filtering results out from ranging queries in the column containers (dynamically added ranging or enumerating validators). This will significantly simplify the predicate graph and validation scheme in general. Query can just handle relations and hydration of containers over key ranges (ie: become an in-memory memcachable view)

also need to support ip filters (used in conjunction with ip2long callbacks for classful/subnet range queries), eg :

filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE);