# Path: sesql/config.py
# CONFIG_PATH_FALLBACK = 'sesql_config'
#     CONFIG_PATH = getattr(settings, 'SESQL_CONFIG_PATH', CONFIG_PATH_FALLBACK)
#     CONFIG_PATH = CONFIG_PATH_FALLBACK
# 
# Path: sesql/typemap.py
# class TypeMap(object):
#     def __init__(self):
#     def all_subclasses(klass, done = None):
#     def all_tables(self):
#     def all_classes(self):
#     def all_class_names(self):
#     def get_class_names_for(self, table):
#     def get_classes_for(self, table):
#     def get_table_for(self, klass):
#     def get_class_by_name(self, klass):


import logging
from sesql import config
from sesql.typemap import typemap
    __iter__ = iterator

    def all(self):
        """
        Get all the results as a list
        """
        return list(self)

    def get(self, index):
        """
        Get the row at given index
        """
        return self.load(self.objs[index])
    __getitem__ = get

    def __getslice__(self, i, j):
        """
        Get a slice
        """
        res = [ self.load(obj) for obj in self.objs[i:j] ]
        return res

    @staticmethod
    def load(obj):
        """
        Get a given object
        """
        objclass, objid = obj[:2]
        objclass = typemap.get_class_by_name(objclass)
        if not objclass:

# Path: sesql/config.py
# CONFIG_PATH_FALLBACK = 'sesql_config'
#     CONFIG_PATH = getattr(settings, 'SESQL_CONFIG_PATH', CONFIG_PATH_FALLBACK)
#     CONFIG_PATH = CONFIG_PATH_FALLBACK
# 
# Path: sesql/typemap.py
# class TypeMap(object):
#     def __init__(self):
#     def all_subclasses(klass, done = None):
#     def all_tables(self):
#     def all_classes(self):
#     def all_class_names(self):
#     def get_class_names_for(self, table):
#     def get_classes_for(self, table):
#     def get_table_for(self, klass):
#     def get_class_by_name(self, klass):


# Path: sesql/results.py
import logging
from sesql import config
from sesql.typemap import typemap

    __iter__ = iterator

    def all(self):
        """
        Get all the results as a list
        """
        return list(self)

    def get(self, index):
        """
        Get the row at given index
        """
        return self.load(self.objs[index])
    __getitem__ = get

    def __getslice__(self, i, j):
        """
        Get a slice
        """
        res = [ self.load(obj) for obj in self.objs[i:j] ]
        return res

    @staticmethod
    def load(obj):
        """
        Get a given object
        """
        objclass, objid = obj[:2]
        objclass = typemap.get_class_by_name(objclass)
        if not objclass:

            return config.orm.not_found