Code Monkey home page Code Monkey logo

aiochsa's Issues

Add support for DateTime with timezone

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.

Parse connection url bug

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))

Delete all rows from table

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())

Typing connection objects

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.