column
column copied to clipboard
[Feature Request] set pk column after columns creation
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.
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. 🤔