Update of /cvsroot/monetdb/clients/src/examples/python
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17383/src/examples/python

Modified Files:
      Tag: Clients_1-20
        sqlsample.py.in 
Log Message:
fixed test, it now tests both the normal client/server case and the embedded
version


Index: sqlsample.py.in
===================================================================
RCS file: /cvsroot/monetdb/clients/src/examples/python/Attic/sqlsample.py.in,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- sqlsample.py.in     20 Oct 2007 20:27:31 -0000      1.1.2.1
+++ sqlsample.py.in     21 Oct 2007 16:38:04 -0000      1.1.2.2
@@ -19,7 +19,10 @@
 import MonetSQLdb
 import sys
 
-dbh = 
MonetSQLdb.Connection(dbname=sys.argv[2],host='localhost',port=sys.argv[1],lang='sql')
+if len(sys.argv) > 3:
+       dbh = 
MonetSQLdb.Connection(dbfarm=sys.argv[1],dbname=sys.argv[2],version=int(sys.argv[3]))
+else:
+       dbh = MonetSQLdb.Connection(port=sys.argv[1],dbname=sys.argv[2])
 
 cursor = dbh.cursor();
 cursor.execute('select 1;')
@@ -40,3 +43,5 @@
 cursor.execute('insert into python_table values ( 7, \'seven\');');
 cursor.execute('select * from python_table;');
 print cursor.fetchall()
+
+cursor.execute('drop table python_table;');


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to