Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@soranoba
Copy link
Owner

@soranoba soranoba commented Oct 9, 2020

No description provided.

@soranoba soranoba force-pushed the feature/clean-mod-and-support-postgress-and-sqlserver branch from 01b993f to 0957c7b Compare October 9, 2020 15:17
@soranoba soranoba changed the base branch from master to v2-alpha October 9, 2020 15:19
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 {
Copy link
Owner Author

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 {
Copy link
Owner Author

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 {
Copy link
Owner Author

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 {
Copy link
Owner Author

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

@soranoba soranoba changed the base branch from v2-alpha to v2 October 11, 2020 04:20
@soranoba soranoba merged commit 23ffc7a into v2 Oct 11, 2020
@soranoba soranoba deleted the feature/clean-mod-and-support-postgress-and-sqlserver branch October 11, 2020 04:21
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

Successfully merging this pull request may close these issues.

2 participants