|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use MongoException | |
---|---|
com.mongodb | Main package with core files. |
Uses of MongoException in com.mongodb |
---|
Subclasses of MongoException in com.mongodb | |
---|---|
static class |
MongoException.DuplicateKey
|
static class |
MongoException.Network
|
Methods in com.mongodb that throw MongoException | |
---|---|
boolean |
DB.authenticate(String username,
char[] passwd)
Authenticates connection/db with given name and password |
DBMessage |
DBConnector.call(DB db,
DBMessage m,
ByteDecoder decoder)
|
DBMessage |
DBConnector.call(DB db,
DBMessage m,
ByteDecoder decoder,
int retries)
|
DBObject |
DB.command(DBObject cmd)
Execute a database command directly. |
DBObject |
DB.command(String cmd)
|
int |
DBCursor.count()
Counts the number of elements in this cursor. |
void |
DBCollection.createIndex(DBObject keys)
Forces creation of an index on a set of fields, if one does not already exist. |
protected abstract void |
DBCollection.createIndex(DBObject keys,
DBObject options)
|
DBObject |
DB.doEval(String code,
Object... args)
|
void |
DBCollection.drop()
Drops (deletes) this collection |
void |
DB.dropDatabase()
Drops this database. |
void |
Mongo.dropDatabase(String dbName)
Drops the database if it exists. |
void |
DBCollection.dropIndex(DBObject keys)
|
void |
DBCollection.dropIndex(String name)
|
void |
DBCollection.dropIndexes()
Drops all indices from this collection |
void |
DBCollection.dropIndexes(String name)
|
void |
DBCollection.ensureIndex(DBObject keys)
Creates an index on a set of fields, if one does not already exist. |
void |
DBCollection.ensureIndex(DBObject keys,
DBObject optionsIN)
|
void |
DBCollection.ensureIndex(DBObject keys,
String name)
Ensures an index on this collection (that is, the index will be created if it does not exist). |
void |
DBCollection.ensureIndex(DBObject keys,
String name,
boolean unique)
Ensures an optionally unique index on this collection. |
Object |
DB.eval(String code,
Object... args)
|
Iterator<DBObject> |
DBCollection.find(DBObject ref,
DBObject fields,
int numToSkip,
int batchSize)
Finds an object. |
abstract Iterator<DBObject> |
DBCollection.find(DBObject ref,
DBObject fields,
int numToSkip,
int batchSize,
int options)
Finds an object. |
DBObject |
DBCollection.findOne()
Returns a single object from this collection. |
DBObject |
DBCollection.findOne(DBObject o)
Returns a single object from this collection matching the query. |
DBObject |
DBCollection.findOne(Object obj)
Finds an object by its id. |
void |
DB.forceError()
For testing purposes only - this method forces an error to help test error handling |
Set<String> |
DB.getCollectionNames()
Returns a set of the names of collections in this database. |
long |
DBCollection.getCount()
Returns the number of documents in the collection |
long |
DBCollection.getCount(DBObject query)
Returns the number of documents in the collection that match the specified query |
long |
DBCollection.getCount(DBObject query,
DBObject fields)
Returns the number of documents in the collection that match the specified query |
List<String> |
Mongo.getDatabaseNames()
|
DBObject |
DB.getLastError()
Gets the the error (if there is one) from the previous operation. |
DBObject |
DB.getPreviousError()
Returns the last error that occurred since start of database or a call to resetError()
The return object will look like |
DBObject |
DBCollection.group(DBObject key,
DBObject cond,
DBObject initial,
String reduce)
|
abstract void |
DBCollection.insert(DBObject doc)
Saves an document to the database. |
abstract void |
DBCollection.insert(DBObject[] arr)
Saves an array of documents to the database. |
abstract void |
DBCollection.insert(List<DBObject> list)
Saves an array of documents to the database. |
int |
DBCursor.length()
Finds the number of elements in the array. |
MapReduceOutput |
DBCollection.mapReduce(DBObject command)
|
MapReduceOutput |
DBCollection.mapReduce(String map,
String reduce,
String outputCollection,
DBObject query)
performs a map reduce operation |
abstract void |
DBCollection.remove(DBObject o)
Removes objects from the database collection. |
void |
DBCollection.rename(String newName)
does a rename of this collection to newName |
void |
DB.resetError()
Resets the error memory for this database. |
void |
DBCollection.save(DBObject jo)
Saves an object to this collection. |
void |
DBConnector.say(DB db,
DBMessage m,
DB.WriteConcern concern)
|
List<DBObject> |
DBCursor.toArray()
Converts this cursor to an array. |
List<DBObject> |
DBCursor.toArray(int min)
Converts this cursor to an array. |
void |
DBCollection.update(DBObject q,
DBObject o)
|
abstract void |
DBCollection.update(DBObject q,
DBObject o,
boolean upsert,
boolean multi)
Performs an update operation. |
void |
DBCollection.updateMulti(DBObject q,
DBObject o)
|
Constructors in com.mongodb that throw MongoException | |
---|---|
Mongo()
|
|
Mongo(ServerAddress addr)
Connects to Mongo using a given DBAddress |
|
Mongo(ServerAddress addr,
MongoOptions options)
Connects to Mongo using a given DBAddress |
|
Mongo(ServerAddress left,
ServerAddress right)
creates a Mongo connection in paired mode |
|
Mongo(ServerAddress left,
ServerAddress right,
MongoOptions options)
creates a Mongo connection in paired mode |
|
Mongo(String host)
Connects to the local mongo instance on default port. |
|
Mongo(String host,
int port)
Connects to Mongo using a given host, port, and database. |
|
Mongo(String host,
MongoOptions options)
Connects to the local mongo instance on default port. |
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |