X-Git-Url: https://git.jsancho.org/?p=mojodb.git;a=blobdiff_plain;f=connection.py;fp=connection.py;h=add83e3b116c881979c1eaf0ec4369f2dc441975;hp=32cd8ae1316a3aa8b16927ff002e4d036ed20663;hb=aa509ddc8574e0a5220c94a2b72f4d5a798d6e8a;hpb=2c1872fd5004c8464e146081b61783de47b87e2d diff --git a/connection.py b/connection.py index 32cd8ae..add83e3 100644 --- a/connection.py +++ b/connection.py @@ -20,8 +20,15 @@ ############################################################################## 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):