- From: Christian Grün <christian.gruen@gmail.com>
- Date: Thu, 26 Mar 2015 13:02:15 +0100
- To: EXPath <expath@googlegroups.com>
- Cc: EXPath <public-expath@w3.org>
Got it! Thanks. I have some fears that a too verbose representation might prevent people from working with the module. We are currently experimenting with different representations. Personally, I more and more tend to the plain string representation. If someone wants to have better typing, it's still possible to use existing JSON mappings before eventually calling the MongoDB functions. We will keee you updated, Christian On Thu, Mar 26, 2015 at 11:53 AM, Adam Retter <adam.retter@googlemail.com> wrote: > mongo:command($id, 'db', ( > function() {('createIndexes', 'coll')}, > function() {('indexes', '...')} > )) > > Basically instead of using a map of key-value pairs (which is just a > function from key->value), you use an array/sequence (which is > ordered) of functions which return key->value pairs. You could model > this in several different ways, for example another way would be: > > mongo:command($id, 'db', function() { > array { > ('createIndexes', 'indexes'), > function($key as xs:string) { > switch($key) { > case 'createIndexes': > 'coll' > case 'indexes': > ... > } > } > } > }) > > I would abstract this structural pattern and provide functions to help > create it, as you will be nesting this to be able to create > effectively ordered maps of maps. > > Although.... it might just be easier to use XML! :-) > > -- > You received this message because you are subscribed to the Google Groups "EXPath" group. > To unsubscribe from this group and stop receiving emails from it, send an email to expath+unsubscribe@googlegroups.com. > To post to this group, send email to expath@googlegroups.com. > Visit this group at http://groups.google.com/group/expath. > For more options, visit https://groups.google.com/d/optout.
Received on Thursday, 26 March 2015 12:19:26 UTC