# Path: bustard/orm.py
# class MetaData:
# class Field(metaclass=abc.ABCMeta):
# class ModelMetaClass(type):
# class Model(metaclass=ModelMetaClass):
# class TextField(Field):
# class CharField(TextField):
# class IntegerField(Field):
# class DateField(Field):
# class DateTimeField(Field):
# class BooleanField(Field):
# class UUIDField(Field):
# class JSONField(Field):
# class AutoField(Field):
# class ForeignKey:
# class Index:
# class Engine:
# class Session:
# class QuerySet:
#     def index_sqls(cls):
#     def create_all(cls, bind):
#     def drop_all(cls, bind):
#     def __init__(self, name=None, max_length=None, default=None,
#                  server_default=None, unique=False, nullable=True,
#                  index=False, primary_key=False, foreign_key=None):
#     def __get__(self, instance, owner):
#     def __set__(self, instance, value):
#     def __lt__(self, value):
#     def __le__(self, value):
#     def __eq__(self, value):
#     def __ne__(self, value):
#     def __gt__(self, value):
#     def __ge__(self, value):
#     def like(self, value):
#     def desc(self):
#     def is_(self, value):
#     def is_not(self, value):
#     def not_in(self, value):
#     def in_(self, value):
#     def to_sql(self):
#     def default_value(self):
#     def name_sql(self):
# def _collect_fields(attr_dict, model):
# def _get_table_name(attr_dict):
# def _auto_column_name(attr_dict):
# def _collect_indexes(table_name, attr_dict):
#     def __init__(cls, name, bases, attr_dict):
#     def __prepare__(cls, name, bases):
#     def __init__(self, **kwargs):
#     def default_dict(self):
#     def table_sql(cls):
#     def sql_values(self):
#     def __init__(self, max_length=None, **kwargs):
#     def __init__(self, column, onupdate=None, ondelete=None):
#     def to_sql(self):
#     def __init__(self, name, table_name, column_name, unique=False):
#     def to_sql(self):
#     def __init__(self, uri):
#     def connect(self):
#     def close(self):
#     def __init__(self, bind=None):
#     def configure(cls, bind):
#     def connect(self):
#     def execute(self, sql, args):
#     def fetchone(self):
#     def fetchmany(self, size=None):
#     def fetchall(self):
#     def commit(self):
#     def rollback(self):
#     def close(self):
#     def insert(self, instance):
#     def update(self, instance):
#     def delete(self, instance):
#     def query(self, model):
#     def transaction(self):
#     def __init__(self, session, model):
#     def clone(self):
#     def limit(self, number):
#     def offset(self, number):
#     def order_by(self, *args):
#     def filter(self, *args, **kwargs):
#     def count(self):
#     def update(self, **kwargs):
#     def delete(self):
#     def _build_where_sql(self):
#     def _build_limit_sql(self):
#     def _build_offset_sql(self):
#     def _build_order_by_sql(self):
#     def _build_select_sql(self, count=False):
#     def _build_update_sql(self, sql_values):
#     def _build_delete_sql(self):
#     def _execute(self):
#     def _clean_data(self):
#     def __len__(self):
#     def __getitem__(self, index):
#     def __iter__(self):


import os
import pytest
from bustard import orm
# -*- coding: utf-8 -*-



pg_uri = os.environ.get(
    'BUSTARD_TEST_PG_URI',
    'postgresql://dbuser:password@localhost/exampledb'
)


@pytest.yield_fixture
def model():

# Path: bustard/orm.py
# class MetaData:
# class Field(metaclass=abc.ABCMeta):
# class ModelMetaClass(type):
# class Model(metaclass=ModelMetaClass):
# class TextField(Field):
# class CharField(TextField):
# class IntegerField(Field):
# class DateField(Field):
# class DateTimeField(Field):
# class BooleanField(Field):
# class UUIDField(Field):
# class JSONField(Field):
# class AutoField(Field):
# class ForeignKey:
# class Index:
# class Engine:
# class Session:
# class QuerySet:
#     def index_sqls(cls):
#     def create_all(cls, bind):
#     def drop_all(cls, bind):
#     def __init__(self, name=None, max_length=None, default=None,
#                  server_default=None, unique=False, nullable=True,
#                  index=False, primary_key=False, foreign_key=None):
#     def __get__(self, instance, owner):
#     def __set__(self, instance, value):
#     def __lt__(self, value):
#     def __le__(self, value):
#     def __eq__(self, value):
#     def __ne__(self, value):
#     def __gt__(self, value):
#     def __ge__(self, value):
#     def like(self, value):
#     def desc(self):
#     def is_(self, value):
#     def is_not(self, value):
#     def not_in(self, value):
#     def in_(self, value):
#     def to_sql(self):
#     def default_value(self):
#     def name_sql(self):
# def _collect_fields(attr_dict, model):
# def _get_table_name(attr_dict):
# def _auto_column_name(attr_dict):
# def _collect_indexes(table_name, attr_dict):
#     def __init__(cls, name, bases, attr_dict):
#     def __prepare__(cls, name, bases):
#     def __init__(self, **kwargs):
#     def default_dict(self):
#     def table_sql(cls):
#     def sql_values(self):
#     def __init__(self, max_length=None, **kwargs):
#     def __init__(self, column, onupdate=None, ondelete=None):
#     def to_sql(self):
#     def __init__(self, name, table_name, column_name, unique=False):
#     def to_sql(self):
#     def __init__(self, uri):
#     def connect(self):
#     def close(self):
#     def __init__(self, bind=None):
#     def configure(cls, bind):
#     def connect(self):
#     def execute(self, sql, args):
#     def fetchone(self):
#     def fetchmany(self, size=None):
#     def fetchall(self):
#     def commit(self):
#     def rollback(self):
#     def close(self):
#     def insert(self, instance):
#     def update(self, instance):
#     def delete(self, instance):
#     def query(self, model):
#     def transaction(self):
#     def __init__(self, session, model):
#     def clone(self):
#     def limit(self, number):
#     def offset(self, number):
#     def order_by(self, *args):
#     def filter(self, *args, **kwargs):
#     def count(self):
#     def update(self, **kwargs):
#     def delete(self):
#     def _build_where_sql(self):
#     def _build_limit_sql(self):
#     def _build_offset_sql(self):
#     def _build_order_by_sql(self):
#     def _build_select_sql(self, count=False):
#     def _build_update_sql(self, sql_values):
#     def _build_delete_sql(self):
#     def _execute(self):
#     def _clean_data(self):
#     def __len__(self):
#     def __getitem__(self, index):
#     def __iter__(self):


# Path: tests/test_orm.py
import os
import pytest
from bustard import orm

# -*- coding: utf-8 -*-



pg_uri = os.environ.get(
    'BUSTARD_TEST_PG_URI',
    'postgresql://dbuser:password@localhost/exampledb'
)


@pytest.yield_fixture
def model():

    yield orm.Model