"""
aaiclick.data - Data context and object management for ClickHouse operations.

This module provides the core data management capabilities for aaiclick,
including context management, object creation, and database operations.
"""

from .data_context import (
    ChClient,
    LifecycleHandler,
    LocalLifecycleHandler,
    create_object,
    create_object_from_value,
    data_context,
    decref,
    delete_object,
    delete_persistent_object,
    delete_persistent_objects,
    get_ch_client,
    get_data_lifecycle,
    get_engine,
    incref,
    list_persistent_objects,
    open_object,
    register_object,
)
from .models import (
    DATE_TYPES,
    ENGINE_AGGREGATING_MERGE_TREE,
    ENGINE_DEFAULT,
    ENGINE_MEMORY,
    ENGINE_MERGE_TREE,
    ENGINES,
    FIELDTYPE_ARRAY,
    FIELDTYPE_DICT,
    FIELDTYPE_SCALAR,
    GB_ANY,
    GB_COUNT,
    GB_GROUP_ARRAY_DISTINCT,
    GB_MAX,
    GB_MEAN,
    GB_MIN,
    GB_STD,
    GB_SUM,
    GB_VAR,
    ORIENT_DICT,
    ORIENT_RECORDS,
    Agg,
    AggSpec,
    ColumnInfo,
    ColumnType,
    Computed,
    EngineType,
    FieldSpec,
    GroupByInfo,
    GroupByOpType,
    QueryInfo,
    QueryStats,
    Schema,
    ValueListType,
    ValueScalarType,
    ValueType,
    ViewSchema,
    parse_ch_type,
)
from .object import (
    GroupByQuery,
    LazyOperator,
    Object,
    View,
    cast,
    create_object_from_url,
    literal,
    split_by_char,
)
from .scope import NamedScope, ObjectScope
