Concept Framework 2.2 documentation Contents | Index

MongoDataSet

Name Version Deprecated
MongoDataSet version 2.0 no

Defined in : MongoDataBase.con
(this file must be included in your application in order to have access, unless you use a child class of MongoDataSet that includes this file)

Description:
TODO: Document this


Properties:
Collection TODO: Document this
Db TODO: Document this
Query TODO: Document this

Methods:
Count TODO: Document this
Find TODO: Document this
FindOne TODO: Document this
Index TODO: Document this
Insert TODO: Document this
LastError TODO: Document this
MongoDataSet TODO: Document this
Remove TODO: Document this
SimpleIndex TODO: Document this
Update TODO: Document this
UpdateType TODO: Document this


Example:
include MongoDataBase.con


class Test {
var Name="Eduard";
var Age=28;
var[] data;
}

class Main {
function Main() {
try {
var mongo=new MongoConnection();
if (mongo.Connect("tutorial")) {
mongo.DropDb("tutorial");

var[] arr;
for (var i=0;i<10;i++) {
var t=new Test();
t.Age=i;
t.Name+=" "+i;
t.data=[1,2,3,4,5,"arraytest",[6,7,8],10];
arr[i]=t;
}

var dataset=new MongoDataSet(mongo,"people");
dataset.Insert(arr);

var cond=new [];
cond["Age"]=9;
dataset.Query=cond;

var res=dataset.Find();
if (res) {
while (res.Next())
echo res.FieldValues.Name;
}
echo "Elements: "+dataset.Count()+"\n";
}
mongo.Close();
} catch (var exc) {
echo exc;
}
}
}



Documented by Devronium Autodocumenter Alpha, generation time: Sun Jan 27 18:15:35 2013 GMT(c)2013 Devronium Applications