The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MongoDB::Database - A Mongo Database

VERSION

version 0.01

ATTRIBUTES

name

The name of the database.

METHODS

collection_names

    my @collections = $database->collection_names;

Returns the list of collections in this database.

get_collection ($name)

    my $collection = $database->get_collection('foo');

Returns a MongoDB::Collection for the collection called $name within this database.

drop

    $database->drop;

Deletes the database.

run_command ($command)

    my $result = $database->run_command({ some_command => 1 });

Runs a command for this database on the mongo server. Throws an exception with an error message if the command fails. Returns the result of the command on success.

AUTHOR

  Florian Ragwitz <rafl@debian.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2009 by 10Gen.

This is free software, licensed under:

  The Apache License, Version 2.0, January 2004