# Path: dbsync/models.py
# class PrefixTables(DeclarativeMeta):
# class ContentType(Base):
# class Node(Base):
# class Version(Base):
# class OperationError(Exception): pass
# class Operation(Base):
#     def __init__(cls, classname, bases, dict_):
#     def __repr__(self):
#     def __init__(self, *args, **kwargs):
#     def __repr__(self):
#     def __repr__(self):
#     def validate_command(self, key, command):
#     def __repr__(self):
#     def references(self, obj):
#     def perform(operation, container, session, node_id=None):


import datetime
from sqlalchemy.orm import sessionmaker
from models import City, House, Person, engine
from dbsync import models
    session = Session()
    person = session.query(Person).filter(Person.id == id).one()
    session.delete(person)
    session.commit()


def read_persons():
    session = Session()
    for person in session.query(Person): print person


# Synch

def read_content_types():
    session = Session()
    for ct in session.query(models.ContentType): print ct


def read_versions():
    session = Session()
    for version in session.query(models.Version): print version


def read_operations():
    session = Session()
    for op in session.query(models.Operation): print op


def read_nodes():
    session = Session()

# Path: dbsync/models.py
# class PrefixTables(DeclarativeMeta):
# class ContentType(Base):
# class Node(Base):
# class Version(Base):
# class OperationError(Exception): pass
# class Operation(Base):
#     def __init__(cls, classname, bases, dict_):
#     def __repr__(self):
#     def __init__(self, *args, **kwargs):
#     def __repr__(self):
#     def __repr__(self):
#     def validate_command(self, key, command):
#     def __repr__(self):
#     def references(self, obj):
#     def perform(operation, container, session, node_id=None):


# Path: app-tests/node/controller.py
import datetime
from sqlalchemy.orm import sessionmaker
from models import City, House, Person, engine
from dbsync import models

    session = Session()
    person = session.query(Person).filter(Person.id == id).one()
    session.delete(person)
    session.commit()


def read_persons():
    session = Session()
    for person in session.query(Person): print person


# Synch

def read_content_types():
    session = Session()
    for ct in session.query(models.ContentType): print ct


def read_versions():
    session = Session()
    for version in session.query(models.Version): print version


def read_operations():
    session = Session()
    for op in session.query(models.Operation): print op


def read_nodes():
    session = Session()

    for node in session.query(models.Node): print node