Changeset: 77eeff24060a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=77eeff24060a
Modified Files:
clients/python2/monetdb/mapi.py
clients/python3/monetdb/control.py
clients/python3/monetdb/mapi.py
clients/python3/monetdb/sql/connections.py
Branch: Feb2013
Log Message:
renaming this since it was confusing
(transplanted from e49866d6c20c9517901327dda2d102502eb23fd9)
diffs (65 lines):
diff --git a/clients/python2/monetdb/mapi.py b/clients/python2/monetdb/mapi.py
--- a/clients/python2/monetdb/mapi.py
+++ b/clients/python2/monetdb/mapi.py
@@ -52,7 +52,7 @@ STATE_INIT = 0
STATE_READY = 1
-class Server(object):
+class Connection(object):
"""
MAPI (low level MonetDB API) connection
"""
@@ -267,3 +267,7 @@ class Server(object):
def __del__(self):
if self.socket:
self.socket.close()
+
+#backwards compatiblity
+Server = Connection
+
diff --git a/clients/python3/monetdb/control.py
b/clients/python3/monetdb/control.py
--- a/clients/python3/monetdb/control.py
+++ b/clients/python3/monetdb/control.py
@@ -29,7 +29,7 @@ class Control:
lock, unlock, destroy your databases and request status information.
"""
def __init__(self, hostname, port, passphrase):
- self.server = mapi.Server()
+ self.server = mapi.Connection()
self.server.connect(hostname, port, 'monetdb', passphrase,
'merovingian', 'control')
def _send_command(self, database_name, command):
diff --git a/clients/python3/monetdb/mapi.py b/clients/python3/monetdb/mapi.py
--- a/clients/python3/monetdb/mapi.py
+++ b/clients/python3/monetdb/mapi.py
@@ -52,7 +52,7 @@ STATE_INIT = 0
STATE_READY = 1
-class Server(object):
+class Connection(object):
"""
MAPI (low level MonetDB API) connection
"""
@@ -263,3 +263,8 @@ class Server(object):
def __del__(self):
if self.socket:
self.socket.close()
+
+
+#backwards compatiblity
+Server = Connection
+
diff --git a/clients/python3/monetdb/sql/connections.py
b/clients/python3/monetdb/sql/connections.py
--- a/clients/python3/monetdb/sql/connections.py
+++ b/clients/python3/monetdb/sql/connections.py
@@ -44,7 +44,7 @@ class Connection(object):
username = user
if host is not None:
hostname = host
- self.mapi = mapi.Server()
+ self.mapi = mapi.Connection()
self.mapi.connect(hostname=hostname, port=int(port), username=username,
password=password, database=database, language="sql")
self.set_autocommit(autocommit)
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list