ods / aiochsa Goto Github PK
View Code? Open in Web Editor NEWClickhouse Python/asyncio library for use with SQLAlchemy core
License: MIT License
Clickhouse Python/asyncio library for use with SQLAlchemy core
License: MIT License
I wanna delete all rows from my table, but I'd have exception sqlalchemy.exc.CompileError: WHERE clause is required
My code:
await test_db.execute(electricity_battery.delete())
Using password with "/" (e.g. "6p_/D!h") raise ValueError
Function urlsplit
in the dsn_to_params
function parse parameter dns
(url string) by delim by slash and spoil password
I'd had exception: ValueError: Port could not be cast to integer value as '6p_'
I propose use function connect keyword args for hard password with slash. For example:
aiochsa.connect("clickhouse://localhost:8123/default", user="admin", password="6p_/D!h")
At current implementation using keywords "user" and "password" on create pool is useless, because it will be override at line 58 pool.py
params.update(dsn_to_params(dsn))
Snippets for tests:
SELECT toTimeZone(now(), 'UTC')
SELECT toTimeZone(now(), 'EST')
SELECT toTimeZone(now(), 'Europe/Moscow')
This also works, but it could be reconsidered as a bug in Clickhouse and therefore be changed in future releases:
SELECT toStartOfDay(now())
Python 3.9 has native support for timezones (module zoneinfo
) and there is backports.zoneinfo
.
I cannot type a new connection object, because Pool may not be imported
db_conn: Optional["Pool"] = None
Python and MyPy point to that
Mypy: Name "Pool" is not defined
Unresolved reference 'Pool'
Need to add Pool to import at __init__.py
from .pool import connect, create_pool, Pool
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.