Closed samuelcolvin closed 1 year ago
It would be great to be able to insert data to a JSON type, at the moment it's causing an error.
JSON
Supported
amazing, thank you.
It would be great to be able to insert data to a
JSON
type, at the moment it's causing an error.Minimal Reproduction
```py import asyncio from asynch import connect from asynch.cursors import DictCursor async def demo(): conn = await connect() async with conn.cursor(cursor=DictCursor) as cursor: await cursor.execute('create database if not exists test') await cursor.execute('SET allow_experimental_object_type=1') await cursor.execute(""" CREATE TABLE if not exists test.json_type ( id Int32, json_data JSON ) ENGINE = MergeTree ORDER BY id""" ) ret = await cursor.execute( """INSERT INTO test.json_type(id, json_data) VALUES""", [ { "id": 1, "json_data": b'{"foo": "bar"}' } ], ) print(ret) if __name__ == '__main__': asyncio.run(demo()) ```