eaigner / hood

Database agnostic ORM for Go
MIT License
710 stars 52 forks source link

A suggestion to simplify Indexes Add method. #43

Closed coocood closed 11 years ago

coocood commented 11 years ago

Can we provide two methods for unique and non-unique index, like "Add" and "AddUnique", and remove the bool parameter. because pass bool parameter is harder to read.

And if no columns parameter is passed in, the index name will be considered as the single column name. this way we only need to pass in one parameter most of the time.

eaigner commented 11 years ago

Yes, I thought of removing the bool flag myself after I rewrote it to the new approach.

eaigner commented 11 years ago

Fixed in f13af4108e3a0fc21c23bfa0b913bede5ff0ac27

I hope I can stop breaking the API now, seems quite solid.