jmcollin78 / jmcnet-full-mongo-flex-driver Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/jmcnet-full-mongo-flex-driver
Automatically exported from code.google.com/p/jmcnet-full-mongo-flex-driver
Sorry for posting here, but really didnt find another way, i subscribed forum
for this porject but had no acceptance afetr one week, how can be done ? thank
you
Original issue reported on code.google.com by [email protected]
on 14 Nov 2014 at 10:40
Hi,
i able to get the connection to MONGODB,i can able create the data in to
database,
issue is,i tried to retrieve the data from database,
after executing the query callback function not invoked
please find the code below
var query:MongoDocumentQuery = new MongoDocumentQuery();
mongoDriver.queryDoc("reporting_serialization6",query, onMyResponseReceived);
//call back function
public function onMyResponseReceived (responseDoc:MongoDocumentResponse)
{
Alert.show(ObjectUtil.toString(ac));
}
it is very difficult to debug this issue,
i found source code 1.1 version at SVN, if it is possible can you upload 1.4
version source to SVN
so i can debug the issue. where it is missing.
thanks
Santhosh
Original issue reported on code.google.com by [email protected]
on 22 Aug 2012 at 2:19
As you can only query from one collection at a time, it would be handy, if the
MongoDocuments returned in the MongoDocumentResponse object had a property
"collection", filled with the collection used in the query.
This is useful if doing a subsequent update on the same object. Something like:
driver.queryDoc( "someCollection", new MongoDocumentQuery, new MongoResponder(
this._onResponse ) );
private function _onResponse( response:MongoDocumentResponse ):void
{
var doc:MongoDocument = response.documents[0];
var query:MongoDocumentUpdate = new MongoDocumentUpdate;
...
driver.updateDoc( doc.collection, query, new MongoResponder( this._onUpdate ), false, false );
}
Original issue reported on code.google.com by [email protected]
on 18 Oct 2012 at 8:50
Hi,
First off all, thank you so much for creating this brilliant product! It is
really amazing and makes the software development much more easier and faster.
Though I have no issues in adding ArrayCollection into the MongoDocument, when
it comes to retrieve, I'm unable to cast down the output to ArrayCollection
using toObject().
I'm not sure if I am missing anything? Or perhaps, because ArrayCollection is
not part of core ActionScript, this is not supported. I'm clue-less basically.
It would be really nice, if you could throw some lights on the above.
Thank in advance...
Regards,
Tharma
Original issue reported on code.google.com by [email protected]
on 18 Aug 2012 at 4:25
What steps will reproduce the problem?
1. Create object with AS3 code:
var object:Object = { literalValue: "hello", objectWillBeHere: { }, integralValue: 123, anotherLiteral: "world" };
object.objectWillBeHere = { justInt: 777, literal: "inner", arrayHere: [] };
object.objectWillBeHere.arrayHere = [ { withJustInt: 666 }, { withJustString: "within array" }, { withObject: { first: "my address", second: 5 }, andString: "philadelphia" } ];
2. Encode it:
var asBson:ByteArray = BSONEncoder.encodeObjectToBSON( object );
3. Try to decode with:
var fromBson:Object = BSONDecoder.decodeBSONToMongoDocument( asBson );
Fails with exception "BSONDecoder : TypeElement : '116' not implemented".
Obtained the source from repository "right now".
Thank you.
Original issue reported on code.google.com by [email protected]
on 24 Dec 2012 at 10:55
Hi,
How are you?
I'm just wondering if we possibly can add a AsyncResponder to carry a "Token".
Please refer this example below:
http://code.google.com/p/assql/wiki/Examples#Token_Responder_Example_1
Besides the basic requirement of making sure the response is correctly handled
based on the request, we can also pass certain information into the responder
through this token...
Please let me know what your thoughts on this?
Regards,
Tharma
Original issue reported on code.google.com by [email protected]
on 23 Aug 2012 at 11:30
When connected to a server, get the replica set (if there is one).
In case of communication failure with the current server, try to automatically
connect to other servers of the replica set.
Original issue reported on code.google.com by [email protected]
on 15 Aug 2012 at 8:14
The driver does not handle UTC format. Little indian encoding is not respected
for date. This can lead to incorrect date manipulation (ie with aggregation
framework for example).
Original issue reported on code.google.com by [email protected]
on 25 Aug 2012 at 10:11
This aims to provided a simple way to sequentialize commands across MongoDB
database.
This is very usefull when you are in non safe mode. In this mode, there is no
callback called for common operation like update, create, delete for example.
So you will never be sure that a command won't be executed before a second one
- unless if you force the reuse of the same socket.
Priority should be strong as it provide a very simple way to many user's
request.
The JMCNet Team
Original issue reported on code.google.com by the.jmcnet.team
on 27 Aug 2012 at 8:14
The nedd is to get all the collections of a database.
The solution is there (thank's to divillysausages) :
https://groups.google.com/forum/?fromgroups=#!topic/jmcnet-full-mongo-flex-drive
r/lRUhwS7GkaU
Original issue reported on code.google.com by the.jmcnet.team
on 16 Oct 2012 at 9:13
Hi,
I believe extending a query functionality to support fetching documents by
joining two or more collections based on a certain key. This would be similar
to what SQL offers.
As you know, the way we could accomplish that in monogo console would be like
this -
var o = db.orders.findOne({_id:"q179"});
var name = db.customers.findOne({_id:o.custid})
Presently using our JMCNet Mongo Driver, we need to fire two sequential queries
that of course, get executed in asynchronous way. So my suggestion here is to
make that as a single query. Perhaps something like this:
//MongoDocumentQuery: defines the filter criteria within the collection
var docs1:* = queryDoc(<collection1>, new MongoDocumentQuery() );
var docs2:* = queryDoc(<collection2>, new MongoDocumentQuery() );
//new type of query: JoinQuery
var jq:MongoDocumentJoinQuery = new MongoDocumentJoinQuery(docs1);
jq.addJoinCriteria(left(docs2).on(docs1.Id,docs2.ID); //left, inner can be
supported with priority(outer, right )
mongoDriver.queryDoc( jq, onResponseReceived);
Please let me know what your thoughts are...
Thanks,
Tharma
Original issue reported on code.google.com by [email protected]
on 26 Aug 2012 at 9:47
Cf summary.
Original issue reported on code.google.com by [email protected]
on 15 Aug 2012 at 8:15
Flash will call toString() automatically when an object is concatenated to a
String. Removing the explicit calls means that you can pass null as the query
to the queryDoc() function (if you're searching for all or a specific number of
documents, but with no particular search criteria).
It also means you can remove code such as "((obj !=
null)?obj.toString():"null")" as if obj is null, it'll print "null"
automatically
Original issue reported on code.google.com by [email protected]
on 18 Oct 2012 at 8:36
Authentication mode is not robust to event order.
Original issue reported on code.google.com by [email protected]
on 14 Aug 2012 at 10:23
http://www.mongodb.org/display/DOCS/Updating+Data+in+Mongo
I want the example about DBRef to work.
Thank's
Original issue reported on code.google.com by the.jmcnet.team
on 26 Aug 2012 at 11:30
When updating a mongo document and using modifiers, according to
http://www.mongodb.org/display/DOCS/Updating#Updating-ModifierOperations, "most
modifier operators will accept multiple field/value pairs when one wishes to
modify multiple fields".
With the code:
var query:MongoDocumentUpdate = new MongoDocumentUpdate;
query.addUpdateCriteria( "$set", new MongoDocument("x", 1) );
query.addUpdateCriteria( "$set", new MongoDocument("y", 2) );
should result in a query like this:
{ $set : { x : 1 , y : 2 } }
whereas the actual result is:
{ $set : { y : 2 } }
as the set addUpdateCriteria() will overwrite the first. NOTE: using a
different modifier will work, but again, only for one.
To get around this, you need to create your query like this:
var doc:MongoDocument = new MongoDocument;
doc.addKeyValuePair( "x", 1 );
doc.addKeyValuePair( "y", 2 );
var query:MongoDocumentUpdate = new MongoDocumentUpdate;
query.addUpdateCriteria( "$set", doc );
Maybe an additional method could be added: appendUpdateCriteria(), or
addModifierCriteria(), with the signature ( String (modifier), key, value ). If
the modifier doesn't exist already, a new MongoDocument is created internally.
It if does exist, then key and value are added as normal through
addKeyValuePair().
Original issue reported on code.google.com by [email protected]
on 18 Oct 2012 at 9:01
When you make a call, you get a MongoDocumentResponse object, with a list of
MongoDocuments in the documents[] array.
To print your explanation of the toObject() function for clarification:
"Concerning your question about the MongoDocument.toObject() method, you’re
right, you don’t need to call it on Response because the driver do it for you
in the interpretedResponse field.
But suppose you had a Data Transfert Object (DTO) or ValueObject (VO) to
interact with Java (for example). You need to transform a generic MongoDocument
into an Object with fields. This method filled the fields of the DTO with the
generic MongoDocument.
- The DocumentResponse contains 2 kinds of response : the documents[] array
with contains an array of MongoDocument. You can use getKeys and getValue but
if you want to transform those documents into object (generic object, DTO or
VO) you need the “.toObject” method,
- The interpretedResponse which contains the documents[] treated by an
Interpreter class. If you use this interpretedResponse you don’t need the
toObject method."
InterpretedResponse will be filled even if you're not using it (as in you're
only using the MongoDocuments documents[] array directly), meaning toObject()
is always called, meaning Objects are created and populated in any case. Only
filling interpretedResponse when it's needed (i.e. called) would help memory &
speed if you're just using the stock MongoDocuments
Original issue reported on code.google.com by [email protected]
on 18 Oct 2012 at 8:42
Cf. summary.
Original issue reported on code.google.com by [email protected]
on 5 Aug 2012 at 8:39
The "orderby" directive doesn't work. It seems to be a confusion with the
returnFields attribute.
Original issue reported on code.google.com by [email protected]
on 13 Aug 2012 at 8:00
Can't get it working as AS3 projects, always missing mx libraries
Original issue reported on code.google.com by [email protected]
on 30 Oct 2014 at 6:13
Hi,
I got the below error when i attempted to do something like this:
//creating a MangoDocument
var query:MongoDocumentQuery = new MongoDocumentQuery();
//defining criteria
query.addQueryCriteria("rank" , MongoDocument.lte(1000));
//I convert the Document into ByteArray because I need to get the count of docs
first
var queryDocByteArray:ByteArray = query.toBSON();
//invoke this count
mongoDriver.count("My_Collection",
BSONDecoder.decodeBSONToMongoDocument(queryDocByteArray), onCountReceived);
---------------------------------------
Error: Error #2030: End of file was encountered.
at flash.utils::ByteArray/readUnsignedInt()
at jmcnet.mongodb.bson::BSONDecoder$/bsonReadDocument()[E:\jmc\Projets\jmcnet\workspace\JMCNetMongoFlex\src\jmcnet\mongodb\bson\BSONDecoder.as:37]
at jmcnet.mongodb.bson::BSONDecoder$/decodeBSONToMongoDocument()[E:\jmc\Projets\jmcnet\workspace\JMCNetMongoFlex\src\jmcnet\mongodb\bson\BSONDecoder.as:30]
---------------------------------------
You might have wondered why I did not create MongoDocument instead of creating
query:MongoDocumentQuery and then converted that to MongoDocument... the reason
why i prefer to do that way is that I wanted to use the criteria for both
getting the count as well as getting the docs. So, I do not want to duplicate
the criteria definition once for getting count and another time for actually
fetching the docs.
The bottom-line is that "BSONDecoder" encounters some unexpected char in the
ByteArray -that could be due to the malfunctioning of toBSON().
Please let me know what your thoughts are.
Thanks,
Tharma
Original issue reported on code.google.com by [email protected]
on 24 Aug 2012 at 9:30
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.