On Sun, Oct 26, 2008 at 09:23:00AM +0100, Lefteris wrote:
Hi,
all the print functions that you list in your email are the same function but overload with different types. What you have to simply do is: name_of_bat.print(); or print(name_of_bat);
In your case if you want to see the bat that stores attribute owner you will have to do:
1000000001_attr_own.print();
please note that above command do only work in case 'name_of_bat' and/or '1000000001_attr_own' are identifiers of MIL variables of type BAT refering to the respective BATs. In case you want to print a BAT given its name as string, you first need to convert the BAT name into a BAT vaiable using the 'bat()' function, e.g., print(bat("1000000001_attr_own")); Stefan
If you are using directly mil, I suggest you connect to the mserver via mclient -lmil, it is easier.
lefteris
On Sat, Oct 25, 2008 at 11:48 PM, Chaojing Yang
wrote: Dear all,
I'm using MonetDB/XQuery. After i have added a few XML-files into MonetDB, i want to check out how their BATs looks like.
MonetDB>ls(); #---------------------------------------------------------------------------------------------------------------------------------# # name htype ttype count heat dirty status kind refcnt lrefcnt # # str str str lng int str str str int int # #---------------------------------------------------------------------------------------------------------------------------------# [ "1000000001_attr_own", "void", "oid", 5, 0, "clean", "disk", "pers", 0, 2 ] [ "1000000001_attr_prop", "void", "oid", 5, 0, "clean", "disk", "pers", 0, 2 ] [ "1000000001_attr_qn", "void", "oid", 5, 0, "clean", "disk", "pers", 0, 2 ] [ "1000000001_frag_root", "oid", "oid", 1, 0, "clean", "disk", "pers", 0, 1 ] [ "1000000001_map_pid", "void", "oid", 1, 0, "clean", "disk", "pers", 0, 2 ] [ "1000000001_nid_rid", "void", "oid", 25, 0, "clean", "disk", "pers", 0, 2 ] [ "1000000001_prop_com", "void", "str", 0, 0, "clean", "disk", "pers", 0, 2 ] [ "1000000001_prop_ins", "void", "str", 0, 0, "clean", "disk", "pers", 0, 2 ]
I get a list of BAT-data summary. But i cann't figure out how to use print functions from buildin module as listed:
231 .COMMAND print(ANY value) = CMDprint_val; 232 "Print a MIL value between square brackets." 233 234 .COMMAND print(BAT[ANY::1,ANY], ...BAT[ANY::1,ANY]...) = CMDprint_table; 235 "BATs are printed with '#' for legend lines, and the BUNs on seperate 236 lines between brackets, containing each to comma separated values 237 (head and tail). 238 If multiple BATs are passed for printing, print() performs an implicit 239 natural join, producing a multiattribute table." 240 241 .COMMAND print(INT order, BAT[ANY::1,ANY], ...BAT[ANY::1,ANY]...) 242 = CMDprint_otable; 243 "The same as normal table print, but enforces to use the order of 244 BAT number [1..argc] to do the printing." 245 246 .COMMAND table(BAT[any::1,any], ...BAT[any::1,any]...) = print_table_default; 247 "Print an n-ary table. Like print(n-ary) but does not print oid column" 248 249 .COMMAND table(INT order, BAT[any::1,any], ...BAT[any::1,any]...) = print_table; 250 "Print an n-ary table. Use the ordering of param [1..argc]" 251 252 .COMMAND multitable(BAT[any,bat]) = CMDprint_multitable; 253 "Print an n-ary table contained within a BAT of BATs" 254 255 .COMMAND printf(str format, ...) = print_format; 256 "Print a formatted string on the standard client output." 257 258 .COMMAND sprintf(str format, ...) : str = print_str; 259 "Print a formatted string on the standard client output." 260 261 262 .END builtin;
One single example may help me out of this trap.
Best regards, Chaojing
------------------------------------------------------------------------------------------------------------------------------------------ Email: chaojing.yang@gmail.com Blog: http://goethe-ist-taoist.blogspot.com/
§1 Ich widerspreche der Nutzung oder Übermittlung meiner Daten für Werbezwecke oder sowie andere unbefugte Verwendungszwecke. (§ 28 Abs. 4 BDSG=Bundesdatenschutzgesetz).
§2 Durch die Datenübertragung bzw. Kommunikation per E-Mail liegt ein Verstoß gegen das BDSG vor, da ihre Daten insoweit nicht ausreichend geschützt sind. Ich bitte Sie daher, mir schriftlich zu bestätigen, dass Sie mit dem Verstoß gegen das BDSG einverstanden sind und keine Schadensersatzanspräche bzw. Unterlassungsanspräche mir gegenüber geltend machen.
§3 Der Inhalt dieser Nachricht ist vertraulich und nur für den oben angegebenen Empfänger bestimmt.
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 |