-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
45 lines (33 loc) · 1.4 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
NAME
AnyMongo - Asynchronous non-blocking MongoDB driver for AnyEvent
applications
VERSION
version 0.03
SYNOPSIS
use AnyMongo;
my $connection = AnyMongo::new_connection(host => 'mongodb://localhost:27017');
my $database = $connection->get_database('foo');
my $collection = $database->get_collection('bar');
my $id = $collection->insert({ some => 'data' });
my $data = $collection->find_one({ _id => $id });
# AnyMongo also can run in official MongoDB compatible mode,
# Then you can run your old code depends on mongoDB quickly
use AnyMongo::Compat;
# now AnyMongo will mock most MongoDB package
my $con = MongoDB::Connection->new(host => 'mongodb://localhost');
my $db = $con->get_database('foo');
MongoDB compatiblity
You can try AnyMongo::Compat, this wrapper package try to make
compatible with MongoDB as possible.
INSTALLATION
See INSTALL.
SEE ALSO
You must check MongoDB, because most code of AnyMongo just stolen from
it.
AUTHORS
* Pan Fan(nightsailer) <nightsailer at gmail.com>
* Kristina Chodorow <kristina at 10gen.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Pan Fan(nightsailer).
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.