column icon indicating copy to clipboard operation
column copied to clipboard

[Feature Request] set pk column after columns creation

Open kcmvp opened this issue 3 years ago • 1 comments

when create columns with CreateColumnsOf as below, there is no way to set a PK field.

` obj := map[string]any{ "name": "Roman", "age": 35, "wallet": 50.99, "health": 100, "mana": 200, }

col := NewCollection()
col.CreateColumnsOf(obj)`

if there is a new API such as collection.setPK(colName string) then we can set an existing column as PK. Of course, this api only available when the collection is emtpy.

kcmvp avatar Dec 07 '22 09:12 kcmvp

I'm actually thinking of removing this API altogether, to keep overall API simple and more consistent. Maybe we can consider creating an "ORM" package for column that can auto-create column schemas off maps, structs etc. 🤔

kelindar avatar Dec 12 '22 06:12 kelindar