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

Modified Files:
      Tag: Clients_1-20
        __init__.py 
Log Message:
pass version number (4/5) as the embedded modules have different names 
(monetdb and monetdb5)



Index: __init__.py
===================================================================
RCS file: /cvsroot/monetdb/clients/src/python/Cimpl/MonetSQLdb/__init__.py,v
retrieving revision 1.3.4.2
retrieving revision 1.3.4.3
diff -u -d -r1.3.4.2 -r1.3.4.3
--- __init__.py 21 Oct 2007 08:52:21 -0000      1.3.4.2
+++ __init__.py 21 Oct 2007 16:38:59 -0000      1.3.4.3
@@ -78,7 +78,7 @@
 
 class Connection:
 
-    """ Create a connection to the Monet database.
+    """ Create a connection to the MonetDB database.
     Parameters to pass to the constructor:
 
     host -- string, host to connect
@@ -88,6 +88,11 @@
     lang -- string, language (default SQL)
     unicode -- boolean
     cursorclass -- the class of the cursor to use
+
+    or to create an embedded MonetDB database
+
+    dbfarm -- string, dbfarm location
+    dbname -- string, database name
     """
 
     _mapi = None
@@ -106,6 +111,7 @@
             if not kwargs.has_key('password'): kwargs['password'] = 'monetdb'
         else:
             if not kwargs.has_key('dbname'): kwargs['dbname'] = 'demo'
+            if not kwargs.has_key('version'): kwargs['version'] = 5
         if not kwargs.has_key('lang'): kwargs['lang'] = 'sql'
 
         self.lang = kwargs['lang']
@@ -123,7 +129,7 @@
         if not kwargs.has_key('dbfarm'):
             self._mapi = Mapi(kwargs['host'], kwargs['port'], kwargs['user'], 
kwargs['password'], kwargs['lang'])
         else:
-            self._mapi = Embedded(kwargs['dbfarm'], kwargs['dbname'], 
kwargs['lang'])
+            self._mapi = Embedded(kwargs['dbfarm'], kwargs['dbname'], 
kwargs['lang'], kwargs['version'])
 
     def close(self):
         del self._mapi


-------------------------------------------------------------------------
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