Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] set pk column after columns creation #81

Open
kcmvp opened this issue Dec 7, 2022 · 1 comment
Open

[Feature Request] set pk column after columns creation #81

kcmvp opened this issue Dec 7, 2022 · 1 comment

Comments

@kcmvp
Copy link

kcmvp commented Dec 7, 2022

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.

@kelindar
Copy link
Owner

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. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants