smi2 / phpClickHouse

php ClickHouse wrapper
MIT License
741 stars 139 forks source link

readonly flag doesn't work with insert() #209

Open peter-nitropack opened 7 months ago

peter-nitropack commented 7 months ago

Setting the readonly flag when initializing the db connection does not stop inserting:

...
$config['readonly'] = true;
$clickHouse = new ClickHouseDB\Client($config);
$clickHouse->database($config['name']);
$clickHouse->setTimeout(10);
$clickHouse->setConnectTimeOut(5);
$clickHouse->ping(true);

$clickHouse->insert($table, $entries, $columns); // this is not supposed to work but it does
peter-nitropack commented 7 months ago

@isublimity @simPod Any news on this? Excuse me for tagging you directly, I see you are major contributors to the project :)

simPod commented 7 months ago

I'm not a maintainer here and I abandoned the project because of issues like this. You can use https://packagist.org/packages/simpod/clickhouse-client, there are no hidden dragons.