mirror of
https://github.com/hanzo-ds/connect.git
synced 2026-10-30 20:31:24 +00:00
* sqa dict and alembic work * sqa dialect improvements * import shim * engine shim * implement alembic support * clickhouse dictionary support * compat shim * add alembic to test reqs * integration/unit tests * update readme * update changelog * fix to support sqa 1.4 and 2.x * update readme * add alembic worked example * consolidate duplicate code * add sql parse logic file * cloud quirk reflection fixes * cc_sqalchemy ergonomics * chcsqa prewhere, limit by, lambda chainables * preserve ARRAY JOIN labels, fix Tuple adapt * wording edits, name fixes * linting * linting, use format * simplify docstrings * update migration guide * update migration guide * fix alembic enum render for autogen migrations * fix alembic enum render for nested container types * 1.1.0a1 release prep * preserve CH select modifiers when compiling from ORM-mapped attributes * 1.1.0a2 release prep * address pr comments
40 lines
1.2 KiB
Python
40 lines
1.2 KiB
Python
from sqlalchemy import Table
|
|
from sqlalchemy.dialects import registry
|
|
|
|
from clickhouse_connect import driver_name
|
|
from clickhouse_connect.cc_sqlalchemy import types
|
|
from clickhouse_connect.cc_sqlalchemy.datatypes.base import schema_types
|
|
from clickhouse_connect.cc_sqlalchemy.ddl import tableengine as engines
|
|
from clickhouse_connect.cc_sqlalchemy.ddl.dictionary import Dictionary
|
|
from clickhouse_connect.cc_sqlalchemy.sql import final, sample
|
|
from clickhouse_connect.cc_sqlalchemy.sql.clauses import ArrayJoin, ClickHouseJoin, Lambda, array_join, ch_join
|
|
from clickhouse_connect.dbapi.cursor import Cursor
|
|
|
|
registry.register("clickhouse", "clickhouse_connect.cc_sqlalchemy.dialect", "ClickHouseDialect")
|
|
registry.register("clickhouse.connect", "clickhouse_connect.cc_sqlalchemy.dialect", "ClickHouseDialect")
|
|
|
|
dialect_name = driver_name
|
|
ischema_names = schema_types
|
|
|
|
CH_DIALECT = dialect_name
|
|
ClickhouseDictionary = Dictionary
|
|
|
|
__all__ = [
|
|
"dialect_name",
|
|
"CH_DIALECT",
|
|
"ischema_names",
|
|
"array_join",
|
|
"ArrayJoin",
|
|
"ch_join",
|
|
"ClickHouseJoin",
|
|
"Lambda",
|
|
"final",
|
|
"sample",
|
|
"Dictionary",
|
|
"ClickhouseDictionary",
|
|
"engines",
|
|
"types",
|
|
"Cursor",
|
|
"Table",
|
|
]
|