Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

add readme

  • Loading branch information...
commit c13263a2b40e0201948ebf90da89a551f2aa92e9 1 parent 80fa080
bill shelton authored
BIN  .README.textile.swp
Binary file not shown
26 README.textile
Source Rendered
... ... @@ -0,0 +1,26 @@
  1 +h1. CFMongoDB
  2 +
  3 +CFMongoDB is both partial wrapper for the MongoDB Java driver and a document-object mapper. Additionally, there's a simple DSL which provides ColdFusion developers the ability to easily Mongo documents.
  4 +
  5 +One of the most appealing aspects is that data can be created as a ColdFusion structure and persisted almost verbatir. Example:
  6 +
  7 +<pre>
  8 +<cfscript>
  9 +my_struct = {
  10 + foo = 'bar'
  11 + bar = 123
  12 +};
  13 +
  14 +mongo.save(my_struct);
  15 +</cfscript>
  16 +</pre>
  17 +
  18 +Check out the wiki for additional info : "http://wiki.github.com/virtix/cfmongodb/":http://wiki.github.com/virtix/cfmongodb/
  19 +
  20 +
  21 +Collaboration is welcome.
  22 +
  23 +
  24 +
  25 +
  26 +
8 test/fixture/SomeCFCWithORMProperties.cfc
... ... @@ -0,0 +1,8 @@
  1 +<cfcomponent output="true">
  2 +
  3 + <cfproperty name="name" default="bill" />
  4 + <cfproperty name="address" persistent="true" />
  5 + <cfproperty name="city" persistent="true" />
  6 +
  7 +
  8 +</cfcomponent>
19 test/rd/DocTest.cfc
... ... @@ -0,0 +1,19 @@
  1 +<cfcomponent output="false" extends="mxunit.framework.TestCase">
  2 +<cfscript>
  3 + //mongo = createObject('component','cfmongodb.test.fixture.').init();
  4 +
  5 +
  6 + function testCFProps(){
  7 + doc = createObject('component','cfmongodb.test.fixture.SomeCFCWithORMProperties');
  8 +
  9 + doc.name = 'mongo';
  10 +
  11 + //debug( doc.properties );
  12 + debug( getMetadata(doc));
  13 + }
  14 +
  15 +
  16 + </cfscript>
  17 +
  18 +
  19 +</cfcomponent>

0 comments on commit c13263a

Please sign in to comment.
Something went wrong with that request. Please try again.