You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
I want to implement a small wrapper around StringField which automatically dumps and loads JSON and stores it in ClickHouse as a string. Here is my code:
But when I use a QuerySet.update(...) frunction trying to update this field I get an error:
infi.clickhouse_orm.database.ServerError: There is no supertype for types Array(String), String because some of them are Array and some of them are not
This is caused by clickhouse_orm utils.arg_to_sql which determines argument type based on its form and there is no any ability to add functionality there using Field child class methods.
I suggest get suitable field from model for every updated value. Than call Field.to_db_string(...) method to convert field value instead of using arg_to_sql function.
The text was updated successfully, but these errors were encountered:
Hi.
I want to implement a small wrapper around
StringField
which automatically dumps and loads JSON and stores it in ClickHouse as a string. Here is my code:But when I use a
QuerySet.update(...)
frunction trying to update this field I get an error:This is caused by clickhouse_orm
utils.arg_to_sql
which determines argument type based on its form and there is no any ability to add functionality there using Field child class methods.I suggest get suitable field from model for every updated value. Than call
Field.to_db_string(...)
method to convert field value instead of usingarg_to_sql
function.The text was updated successfully, but these errors were encountered: