]> git.jsancho.org Git - mojodb.git/blobdiff - connection.py
New database scheme, storing key name inside tables for improving searching
[mojodb.git] / connection.py
index 32cd8ae1316a3aa8b16927ff002e4d036ed20663..add83e3b116c881979c1eaf0ec4369f2dc441975 100644 (file)
 ##############################################################################
 
 from database import Database
+import dbutils
 
 class Connection(object):
+    Query = dbutils.Query
+    Field = dbutils.Field
+    Table = dbutils.Table
+    Constraint = dbutils.Constraint
+    Literal = dbutils.Literal
+
     def __init__(self, *args, **kwargs):
         self._db_con = None
 
@@ -68,11 +75,10 @@ class Connection(object):
         # [{'name': 'id', 'type': 'char', 'size': 20, 'primary': True}]
         return None
 
-    def _get_cursor(self, db_name, query):
-        # {'select': [('t1$_id', 'id'), {'select': [('t1$c1', 'value')], 'from': ['t1$c1'], 'where': [(('t1$c1', 'id'), '=', ('t1$_id', 'id'))]}], 'from': ['t1$_id']}
+    def _get_cursor(self, query):
         return None
 
-    def _next(self, cursor):
+    def _next(self, db_name, cursor):
         return None
 
     def _insert(self, db_name, table_name, values):