Closed xao0isb closed 3 months ago
Gem version?
Already support in latest versions https://github.com/PNixx/clickhouse-activerecord/blob/master/spec/single/model_spec.rb#L72-L86
I'm using latest version
record = Model.create(value: "abc")
pp record.value # "abc"
record.update!(value: "123")
pp record.value # "123"
pp Model.last.value # "abc" and not "123"
@PNixx
@PNixx reopen issue, please
Need more details: ClickHouse version, table structure and engine.
Table:
create_table :users, id: false, options: "MergeTree PRIMARY KEY (uuid)" do |t|
t.column :uuid, "UUID", null: false
t.string :name, null: false
t.timestamps
end
Am I doing something wrong with table creation? I don't get deep into clickhouse yet and now just want to test it out.
I ran the test and it completed successfully with a one second pause. You need to wait some time before receiving data from the database. Updating and deleting in Clickhouse should only be used in extreme cases https://clickhouse.com/docs/en/guides/developer/mutations
Is there any way to update record field? If I use
update
or change the value of a record and then runsave
the value in database remains the same.