I've been writing a library for not a very long time and still
satisfied by results.
It's just a bit higher level of abstraction from Mongo php library.
Please, if you have some free time, test it and tell me, what do you
think and what will be cool to add/improve. Or even add/improve it by
yourself :-)
I hope no one is against it to be here in groups?
http://code.google.com/p/mongodloid/ here is a link.
http://code.google.com/p/mongodloid/downloads/list - downloads
http://code.google.com/p/mongodloid/wiki/Using - not much
documentation
Some parts:
== Atomic operations ==
$entity->inc('a')->inc('a', 3) // chaining!
->set('b', 'hi')
->push('c', 1221)
->pushAll('d', array(8, 5, 9, 6))
->pop('e')
->pop('f', Mongodloid_Entity::POPFIRST)
->shift('f')
->pull('g', 2)
->pullAll('h', array(1, 3));
== Queries ==
$query = $collection->query('a', 12); // a == 12
$query = $collection->query();
$query->equals('a', 13)->greaterEq('b', 8)->mod('c', 3, 4);
// or even
$query->query('a == 13 AND b >= 8 && c % 3 == 4'); // wow!
foreach($query as $entity) {}
== Getters and setters ==
$entity = new Mongodloid_Entity(array(
'hi' => 'there',
'i' => array(
'am' => array(
'an' => array('ar', 'ray')
)
)
);
$entity->get('hi'); // there
$entity->get('i.am.an[1]'); // ray
$entity->set('i.am.an[2]', ':-)');
"Roadmap":
Triggers:
http://code.google.com/p/mongodloid/issues/detail?id=12
Guessing indexes to ensure:
http://code.google.com/p/mongodloid/issues/detail?id=7
http://code.google.com/p/mongodloid/issues/list?q=type:feature
Anything else?