chdb-io / chdb

chDB is an in-process OLAP SQL Engine 🚀 powered by ClickHouse
https://clickhouse.com/docs/en/chdb
Apache License 2.0
2.03k stars 72 forks source link

Fix executemany in dbapi cursor implementation, make tests more comprehensive #175

Closed yunyu closed 9 months ago

yunyu commented 9 months ago

Changelog category (leave one):

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

executemany in the DBAPI cursor implementation would previously not work due to TypeError: can only concatenate str (not "bytes") to str in _do_execute_many. This PR correctly interprets everything as encoded bytes, and adds a test for executemany and parameterized queries.

(This unblocks something I ran into while getting chdb to work with clickhouse-sqlalchemy)

Documentation entry for user-facing changes

yunyu commented 9 months ago

@auxten @laodouya would you mind taking a look?

auxten commented 9 months ago

LGTM