|
CFMongoDB | ||||
FRAMES |
WEB-INF.cftags.componentcfmongodb.core.Mongo
public class Mongo
Constructor Summary | |
---|---|
init([any MongoConfig='[runtime expression]'])
You can init CFMongoDB in two ways: 1) drop the included jars into your CF's lib path (restart CF) 2) use Mark Mandel's javaloader (included) |
Method Summary | |
---|---|
any |
GETMONGOFACTORY()
|
any |
GETMONGOUTIL()
|
void |
SETMONGOCONFIG(any mongoConfig)
|
void |
SETMONGOFACTORY(any mongoFactory)
|
void |
SETMONGOUTIL(any mongoUtil)
|
any |
addUser([string username], [string password])
Adds a user to the database |
void |
authenticate([string username], [string password])
Authenticates connection/db with given name and password Typical usage: mongoConfig |
any |
close()
Closes the underlying mongodb object |
any |
distinct([string key], [string collectionName])
Deprecated |
any |
dropDatabase()
Drops the database currently specified in MongoConfig |
array |
dropIndexes([any collectionName], [any mongoConfig=''])
Deprecated |
array |
ensureGeoIndex([any field], [any collectionName], [any min=''], [any max=''])
Deprecated |
array |
ensureIndex([array fields], [any collectionName], [any unique='false'])
Deprecated |
any |
findAndModify([struct query], [struct fields], [any sort], [boolean remove='false'], [struct update], [boolean returnNew='true'], [boolean upsert='false'], [boolean overwriteExisting='false'], [string collectionName])
Deprecated |
any |
findById([any id], [string collectionName])
Deprecated |
any |
getDBCollection([any collectionName])
Gets a CFMongoDB DBCollection object, which wraps the java DBCollection |
array |
getIndexes([any collectionName])
Deprecated |
any |
getLastError()
Returns the last error for the current connection |
any |
getMongo()
Get the underlying Java driver's Mongo object |
any |
getMongoConfig([any mongoConfig=''])
Decide whether to use the MongoConfig in the variables scope, the one being passed around as arguments, or create a new one |
any |
getMongoDB([any mongoConfig=''])
Get the underlying Java driver's DB object |
any |
getMongoDBCollection([any collectionName=''])
Deprecated |
any |
group([any collectionName], [any keys], [any initial], [any reduce], [any query], [any keyf=''], [any finalize=''])
Deprecated |
private any |
initCollections()
|
any |
mapReduce([any collectionName], [any map], [any reduce], [any outputTarget], [any outputType='REPLACE'], [any query], [any options])
Deprecated |
any |
query([string collectionName], [any mongoConfig=''])
Deprecated |
any |
remove([any doc], [any collectionName])
Deprecated |
any |
removeById([any id], [any collectionName])
Deprecated |
any |
save([struct doc], [string collectionName])
Deprecated |
any |
saveAll([array docs], [string collectionName])
Deprecated |
any |
update([any doc], [any collectionName], [any query], [any upsert='false'], [any multi='false'], [any overwriteExisting='false'])
Deprecated |
Methods inherited from class WEB-INF.cftags.component |
---|
|
Constructor Detail |
---|
public init([any MongoConfig='[runtime expression]'])
MongoConfig
Method Detail |
---|
public any GETMONGOFACTORY()
public any GETMONGOUTIL()
public void SETMONGOCONFIG(any mongoConfig)
mongoConfig
public void SETMONGOFACTORY(any mongoFactory)
mongoFactory
public void SETMONGOUTIL(any mongoUtil)
mongoUtil
public any addUser([string username], [string password])
username
password
public void authenticate([string username], [string password])
username
password
public any close()
public any distinct([string key], [string collectionName])
key
collectionName
public any dropDatabase()
public array dropIndexes([any collectionName], [any mongoConfig=''])
collectionName
mongoConfig
public array ensureGeoIndex([any field], [any collectionName], [any min=''], [any max=''])
field
collectionName
min
max
public array ensureIndex([array fields], [any collectionName], [any unique='false'])
fields
collectionName
unique
public any findAndModify([struct query], [struct fields], [any sort], [boolean remove='false'], [struct update], [boolean returnNew='true'], [boolean upsert='false'], [boolean overwriteExisting='false'], [string collectionName])
query
fields
sort
remove
update
returnNew
upsert
overwriteExisting
collectionName
public any findById([any id], [string collectionName])
id
collectionName
public any getDBCollection([any collectionName])
collectionName
public array getIndexes([any collectionName])
collectionName
public any getLastError()
public any getMongo()
public any getMongoConfig([any mongoConfig=''])
mongoConfig
public any getMongoDB([any mongoConfig=''])
mongoConfig
public any getMongoDBCollection([any collectionName=''])
collectionName
public any group([any collectionName], [any keys], [any initial], [any reduce], [any query], [any keyf=''], [any finalize=''])
collectionName
keys
initial
reduce
query
keyf
finalize
private any initCollections()
public any mapReduce([any collectionName], [any map], [any reduce], [any outputTarget], [any outputType='REPLACE'], [any query], [any options])
collectionName
map
reduce
outputTarget
outputType
query
options
public any query([string collectionName], [any mongoConfig=''])
collectionName
mongoConfig
public any remove([any doc], [any collectionName])
doc
collectionName
public any removeById([any id], [any collectionName])
id
collectionName
public any save([struct doc], [string collectionName])
doc
collectionName
public any saveAll([array docs], [string collectionName])
docs
collectionName
public any update([any doc], [any collectionName], [any query], [any upsert='false'], [any multi='false'], [any overwriteExisting='false'])
doc
collectionName
query
upsert
multi
overwriteExisting
|
CFMongoDB | ||||
FRAMES |