Update of /cvsroot/monetdb/MonetDB5/src/modules/mal/Tests
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31308

Added Files:
        remote04.mal remote05.mal 
Log Message:
Examples of poor-mans bat transport.


--- NEW FILE: remote04.mal ---
#this example tests recieving tuple values as part of the
#MAL interface.

b:bat[:oid,:int]:=mserver.receive();
[ [EMAIL PROTECTED], 1]
[ [EMAIL PROTECTED], 2]

c:bat[:oid,:str]:=mserver.receive();
[ [EMAIL PROTECTED], "hello"]
[ [EMAIL PROTECTED], "world"]

io.print(b);
io.print(c);

--- NEW FILE: remote05.mal ---
#this example tests recieving tuple values as part of the
#MAL interface.
# now in a remote setting

include remote;
# for testweb, we need to ask the server itself how it is available, use
# sabaoth for that
include sabaoth;

h := sabaoth.getLocalConnectionHost();
p := sabaoth.getLocalConnectionPort();

# create a connecton to ourself
remote.create("test", h, p, nil:str, "monetdb", "monetdb");

b:= bat.new(:oid,:str);
bat.insert( [EMAIL PROTECTED], "hello");
bat.insert( [EMAIL PROTECTED], "world");

# store the values
remote.send("test",b);
c:= remote.query("test","io.print(b);")
io.print(c);
# shutdown
remote.destroy("test");



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to