from ... import dataclasses as _dc


_dc.init_package(
    globals(),
    codegen=True,
)


##


from .adapters import (  # noqa
    Adapter,

    HasAdapter,
)

from .asquery import (  # noqa
    AsQueryContext,
    as_query,
    as_query_,
)

from .columns import (  # noqa
    Column,
    Columns,
)

from .core import (  # noqa
    AnyRows,
    Rows,
    AsyncRows,

    AnyTransaction,
    Transaction,
    AsyncTransaction,

    AnyConn,
    Conn,
    AsyncConn,

    AnyDb,
    Db,
    AsyncDb,
)

from .dbapi import (  # noqa
    DbapiRows,
    DbapiConn,
    DbapiDb,
    DbapiAdapter,
)

from .errors import (  # noqa
    Error,

    ColumnError,
    DuplicateColumnNameError,
    MismatchedColumnCountError,

    QueryError,
)

from .queriers import (  # noqa
    AnyQuerier,
    Querier,
    AsyncQuerier,
)

from .querierfuncs import (  # noqa
    sync_exec,
    async_exec,
    exec,  # noqa

    sync_query,
    async_query,
    query,

    sync_query_all,
    async_query_all,
    query_all,

    sync_query_first,
    async_query_first,
    query_first,

    sync_query_opt_first,
    async_query_opt_first,
    query_opt_first,

    sync_query_one,
    async_query_one,
    query_one,

    sync_query_opt_one,
    async_query_opt_one,
    query_opt_one,

    sync_query_scalar,
    async_query_scalar,
    query_scalar,

    sync_query_maybe_scalar,
    async_query_maybe_scalar,
    query_maybe_scalar,
)

from .queries import (  # noqa
    QueryMode,

    Queryable,
    Query,
)

from .rows import (  # noqa
    Row,
)


##


from ... import lang as _lang  # noqa

_lang.register_conditional_import('..queries', '._queries', __package__)
