Changeset: fd5c0307f3b6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fd5c0307f3b6
Modified Files:
        monetdb5/extras/jaql/jaqlfunc.mal
Branch: Feb2013
Log Message:

info: allow usage on variables too


diffs (32 lines):

diff --git a/monetdb5/extras/jaql/jaqlfunc.mal 
b/monetdb5/extras/jaql/jaqlfunc.mal
--- a/monetdb5/extras/jaql/jaqlfunc.mal
+++ b/monetdb5/extras/jaql/jaqlfunc.mal
@@ -208,7 +208,7 @@ function list()(kind:bat[:oid,:bte],stri
 end list;
 
 # retrieve/calculate and return info about a stored document
-function 
info(docname:str)(kind:bat[:oid,:bte],string:bat[:oid,:str],integer:bat[:oid,:lng],double:bat[:oid,:dbl],array:bat[:oid,:oid],object:bat[:oid,:oid],name:bat[:oid,:str]);
+function 
info(d1:bat[:oid,:bte],d2:bat[:oid,:str],d3:bat[:oid,:lng],d4:bat[:oid,:dbl],d5:bat[:oid,:oid],d6:bat[:oid,:oid],d7:bat[:oid,:str])(kind:bat[:oid,:bte],string:bat[:oid,:str],integer:bat[:oid,:lng],double:bat[:oid,:dbl],array:bat[:oid,:oid],object:bat[:oid,:oid],name:bat[:oid,:str]);
        # what we return:
        # - number of bytes on disk
        # - number of elements in top array
@@ -217,7 +217,6 @@ function info(docname:str)(kind:bat[:oid
        # - ?
        # [ {"size": 444, "elems": 444, ...} ]
 
-       (d1,d2,d3,d4,d5,d6,d7) := json.load(docname);
 
        s1 := bat.getDiskSize(d1);
        s2 := bat.getDiskSize(d2);
@@ -291,6 +290,11 @@ function info(docname:str)(kind:bat[:oid
        (r1,r2,r3,r4,r5,r6,r7) := json.shred(doc);
        return (r1,r2,r3,r4,r5,r6,r7);
 end info;
+function 
info(docname:str)(kind:bat[:oid,:bte],string:bat[:oid,:str],integer:bat[:oid,:lng],double:bat[:oid,:dbl],array:bat[:oid,:oid],object:bat[:oid,:oid],name:bat[:oid,:str]);
+       (d1,d2,d3,d4,d5,d6,d7) := json.load(docname);
+       (r1,r2,r3,r4,r5,r6,r7) := jaqlfunc.info(d1,d2,d3,d4,d5,d6,d7);
+       return (r1,r2,r3,r4,r5,r6,r7);
+end info;
 
 # produce a JSON document with trace information
 function 
gettrace()(kind:bat[:oid,:bte],string:bat[:oid,:str],integer:bat[:oid,:lng],double:bat[:oid,:dbl],array:bat[:oid,:oid],object:bat[:oid,:oid],name:bat[:oid,:str]);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to