You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe a good ORM should abstract the user from writing any kind of SQL, at least for normal operation. Having this into account, kallax' schema generation feature needs some improvements.
In the near future, what I think it would be useful is:
Schema generation
Add support for indices via struct tags
Simple indices, with sorting option
Compound indices
Migrations
When manual migration is required, hint the user which sql they should run with a comment in the migration script
This is an open discussion. Feel free to suggest another features regarding this functionality.
The text was updated successfully, but these errors were encountered:
@Maaarcocr Of course! But please take into account that PR require minimal documentation (both on README and as godoc comments) and test cases covering basic usage to be merged.
// model struct definition// users table has (org_id, user_id) unique index footypeUserstruct {
OrgIdint`index:"foo"`UserIdint`index:"foo"`
}
// generated UserQuery can query by foo indexuserQuery.FindByFooIndex(orgId, userId)
This is, specifying the name of the index seems unnecessary to me (it should be a unique name, autogenerated by kallax), and allowing to specify the index default sorting option may have some value. This sorting option thing is not prioritary tho.
I believe a good ORM should abstract the user from writing any kind of SQL, at least for normal operation. Having this into account, kallax' schema generation feature needs some improvements.
In the near future, what I think it would be useful is:
Schema generation
Migrations
This is an open discussion. Feel free to suggest another features regarding this functionality.
The text was updated successfully, but these errors were encountered: