cfmongodb
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:MongoDB client wrapper for ColdFusion
h1. CFMongoDB

CFMongoDB is both partial wrapper for the MongoDB Java driver and a document-struct mapper for ColdFusion. It attempts to remove the need for constant javacasting in your CFML when working with MongoDB. Additionally, there's a simple DSL which provides ColdFusion developers the ability to easily search MongoDB document collections.

CFMongoDB works with Adobe ColdFusion 9.0.1+ and Railo 3.2+

h2. Some Code

One of the most appealing aspects is that data can be created as a ColdFusion structure and persisted almost verbatim. Example:



//save
col = 'my_collection':
my_struct = {
  name = 'Orc #getTickCount()#'
  foo = 'bar'
  bar = 123
  'tags'=[ 'cool', 'distributed', 'fast' ]
};

mongo.save(my_struct, col);

//query
result = mongo.query(col).startsWith('name','Orc').search(limit=20);
writeOutput("Found #results.size()# of #results.totalCount()# Orcs");

//use the native mongo cursor. it is case sensitive!
cursor = result.asCursor();
while( cursor.hasNext() ){
  thisOrc = cursor.next();
  writeOutput(" name = #thisOrc['name'] 
"); } //use a ColdFusion array of structs. this is not case sensitive orcs = result.asArray(); for(orc in orcs){ writeOutput(" name = #orc.name#
"); }
h2. More Examples See examples/gettingstarted.cfm to start. Additional examples are in the various subdirectories in examples/ h2. The Wiki Check out the wiki for additional info: "http://wiki.github.com/marcesher/cfmongodb/":http://wiki.github.com/marcesher/cfmongodb/ h2. Getting Help We have a Google group: "http://groups.google.com/group/cfmongodb":http://groups.google.com/group/cfmongodb Please limit conversations to MongoDB and ColdFusion. General MongoDB questions are best asked on the MongoDB group at "http://groups.google.com/group/mongodb-user":http://groups.google.com/group/mongodb-user h2. Posting Issues Post issues to the github issue tracker for the project. Better: post fixes. Best: post fixes with unit tests. h2. Getting Involved Collaboration is welcome. Fork -- Commit -- Request a pull. For bug fixes and feature additions, commits with unit tests are much more likely to be accepted. Code well.

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。