Install packages::
apt-get install git python-django python-setuptools python-sphinx
+ apt-get install python-sqlalchemy python-psycopg2
apt-get install apache2 libapache2-mod-wsgi
Get the source::
from simple import SimpleBackend
from modular import ModularBackend
+from modular_alchemy import AlchemyBackend
backend = None
options = getattr(settings, 'BACKEND', None)
from sqlalchemy import Table, Integer, Float, Column, String, MetaData, ForeignKey
from sqlalchemy.schema import Index, Sequence
from sqlalchemy.sql import func, and_, or_, null, select, bindparam
-from duplicate import insertOnDuplicate
from dbworker import DBWorker
ROOTNODE = 0
def attribute_copy(self, source, dest):
from sqlalchemy.ext.compiler import compiles
- from sqlalchemy.sql.expression import UpdateBase
+ from sqlalchemy.sql.expression import _UpdateBase
- class InsertFromSelect(UpdateBase):
+ class InsertFromSelect(_UpdateBase):
def __init__(self, table, select):
self.table = table
self.select = select
# or implied, of GRNET S.A.
from sqlalchemy.sql import select, literal
-from sqlalchemy.sql.expression import join
+from sqlalchemy.sql.expression import join, union
from xfeatures import XFeatures
from groups import Groups
r = self.conn.execute(s)
l = [row[0] for row in r.fetchall()]
r.close()
- return l
\ No newline at end of file
+ return l
return fn
-class ModularBackend(BaseBackend):
- """A modular backend.
+class AlchemyBackend(BaseBackend):
+ """A backend based on ModularBackend that uses SQLAlchemy.
Uses modules for SQL functions and storage.
"""