-
-
Couldn't load subscription status.
- Fork 2
Support PostgresSQL and SQLServer / Clean go.mod #6
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
Support PostgresSQL and SQLServer / Clean go.mod #6
Conversation
01b993f to
0957c7b
Compare
| if len(columns) != len(comparisons) { | ||
| panic("columns and comparisons must have the same length") | ||
| } | ||
| func MakeComparisonScope(columns []string, comparisons []Comparison, nullsOrders []NullsOrder, values []interface{}) func(*gorm.DB) *gorm.DB { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking changes.
- func MakeComparisonScopeBuildFunc(columns ...string) func(comparisons ...Comparison) func(values ...interface{}) func(*gorm.DB) *gorm.DB`
+ func MakeComparisonScope(columns []string, comparisons []Comparison, nullsOrders []NullsOrder, values []interface{}) func(*gorm.DB) *gorm.DB| // OrderClauseBuilder returns a function that create ORDER BY clause to specifies the order of DB records. | ||
| func OrderClauseBuilder(columns ...string) func(orders ...Order) string { | ||
| return func(orders ...Order) string { | ||
| func OrderClauseBuilder(columns ...string) func(orders ...string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking changes
- func OrderClauseBuilder(columns ...string) func(orders ...Order) string
+ func OrderClauseBuilder(columns ...string) func(orders ...string) string| } | ||
|
|
||
| // ReverseOrders returns a slice of Order converted from ASC to DESC, DESC to ASC. | ||
| func ReverseOrders(orders []Order) []Order { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking changes
- func ReverseOrders(orders []Order) []Order
+ func ReverseOrders(orders []string) []string|
|
||
| // Order set the pagination orders, and returns self. | ||
| // The orders must be same order as columns that set to arguments of Paginate. | ||
| func (cursor *Cursor) Order(orders ...pbc.Order) *Cursor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking changes
- func (cursor *Cursor) Order(orders ...pbc.Order) *Cursor
+ func (cursor *Cursor) Order(orders ...string) *Cursor
No description provided.