paritytech / parity-db

Experimental blockchain database
Apache License 2.0
264 stars 61 forks source link

drop column primitive #210

Closed cheme closed 1 year ago

cheme commented 1 year ago

Could also be refactor to run on options only.

Should allow truncating a column by removing files.

fix https://github.com/paritytech/parity-db/issues/209

cheme commented 1 year ago

I switch to using existing code, and add Db::drop_last_column that will suit the use case I think and Db::reset_column that allow truncating a column and optionally changing its option. Did not implement moving a column, maybe better keep this small.

tdimitrov commented 1 year ago

Great work @cheme. Thank you very much!

I switch to using existing code, and add Db::drop_last_column that will suit the use case I think and Db::reset_column that allow truncating a column and optionally changing its option.

Just curious - what does 'truncating a column' means?

cheme commented 1 year ago

Great work @cheme. Thank you very much!

I switch to using existing code, and add Db::drop_last_column that will suit the use case I think and Db::reset_column that allow truncating a column and optionally changing its option.

Just curious - what does 'truncating a column' means?

Drop all content index from column, but column still exsists (just cleared and new). Probably the work come to my mind from sql truncate table.

tdimitrov commented 1 year ago

No rush, but if this is ready for merging I'm eager to use it :)

arkpar commented 1 year ago

published as 0.4.8