2021-11-17 21:29:46 +08:00
|
|
|
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
|
|
|
//
|
|
|
|
// This Source Code Form is subject to the terms of the MIT License.
|
|
|
|
// If a copy of the MIT was not distributed with this file,
|
|
|
|
// You can obtain one at https://github.com/gogf/gf.
|
|
|
|
|
|
|
|
package gdb
|
|
|
|
|
|
|
|
// WhereOrPrefix performs as WhereOr, but it adds prefix to each field in where statement.
|
2022-05-07 15:11:31 +08:00
|
|
|
// See WhereBuilder.WhereOrPrefix.
|
2021-11-17 21:29:46 +08:00
|
|
|
func (m *Model) WhereOrPrefix(prefix string, where interface{}, args ...interface{}) *Model {
|
2022-04-30 15:53:56 +08:00
|
|
|
return m.callWhereBuilder(m.whereBuilder.WhereOrPrefix(prefix, where, args...))
|
2021-11-17 21:29:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// WhereOrPrefixLT builds `prefix.column < value` statement in `OR` conditions..
|
2022-05-07 15:11:31 +08:00
|
|
|
// See WhereBuilder.WhereOrPrefixLT.
|
2021-11-17 21:29:46 +08:00
|
|
|
func (m *Model) WhereOrPrefixLT(prefix string, column string, value interface{}) *Model {
|
2022-04-30 15:53:56 +08:00
|
|
|
return m.callWhereBuilder(m.whereBuilder.WhereOrPrefixLT(prefix, column, value))
|
2021-11-17 21:29:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// WhereOrPrefixLTE builds `prefix.column <= value` statement in `OR` conditions..
|
2022-05-07 15:11:31 +08:00
|
|
|
// See WhereBuilder.WhereOrPrefixLTE.
|
2021-11-17 21:29:46 +08:00
|
|
|
func (m *Model) WhereOrPrefixLTE(prefix string, column string, value interface{}) *Model {
|
2022-04-30 15:53:56 +08:00
|
|
|
return m.callWhereBuilder(m.whereBuilder.WhereOrPrefixLTE(prefix, column, value))
|
2021-11-17 21:29:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// WhereOrPrefixGT builds `prefix.column > value` statement in `OR` conditions..
|
2022-05-07 15:11:31 +08:00
|
|
|
// See WhereBuilder.WhereOrPrefixGT.
|
2021-11-17 21:29:46 +08:00
|
|
|
func (m *Model) WhereOrPrefixGT(prefix string, column string, value interface{}) *Model {
|
2022-04-30 15:53:56 +08:00
|
|
|
return m.callWhereBuilder(m.whereBuilder.WhereOrPrefixGT(prefix, column, value))
|
2021-11-17 21:29:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// WhereOrPrefixGTE builds `prefix.column >= value` statement in `OR` conditions..
|
2022-05-07 15:11:31 +08:00
|
|
|
// See WhereBuilder.WhereOrPrefixGTE.
|
2021-11-17 21:29:46 +08:00
|
|
|
func (m *Model) WhereOrPrefixGTE(prefix string, column string, value interface{}) *Model {
|
2022-04-30 15:53:56 +08:00
|
|
|
return m.callWhereBuilder(m.whereBuilder.WhereOrPrefixGTE(prefix, column, value))
|
2021-11-17 21:29:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// WhereOrPrefixBetween builds `prefix.column BETWEEN min AND max` statement in `OR` conditions.
|
2022-05-07 15:11:31 +08:00
|
|
|
// See WhereBuilder.WhereOrPrefixBetween.
|
2021-11-17 21:29:46 +08:00
|
|
|
func (m *Model) WhereOrPrefixBetween(prefix string, column string, min, max interface{}) *Model {
|
2022-04-30 15:53:56 +08:00
|
|
|
return m.callWhereBuilder(m.whereBuilder.WhereOrPrefixBetween(prefix, column, min, max))
|
2021-11-17 21:29:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// WhereOrPrefixLike builds `prefix.column LIKE like` statement in `OR` conditions.
|
2022-05-07 15:11:31 +08:00
|
|
|
// See WhereBuilder.WhereOrPrefixLike.
|
2021-11-17 21:29:46 +08:00
|
|
|
func (m *Model) WhereOrPrefixLike(prefix string, column string, like interface{}) *Model {
|
2022-04-30 15:53:56 +08:00
|
|
|
return m.callWhereBuilder(m.whereBuilder.WhereOrPrefixLike(prefix, column, like))
|
2021-11-17 21:29:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// WhereOrPrefixIn builds `prefix.column IN (in)` statement in `OR` conditions.
|
2022-05-07 15:11:31 +08:00
|
|
|
// See WhereBuilder.WhereOrPrefixIn.
|
2021-11-17 21:29:46 +08:00
|
|
|
func (m *Model) WhereOrPrefixIn(prefix string, column string, in interface{}) *Model {
|
2022-04-30 15:53:56 +08:00
|
|
|
return m.callWhereBuilder(m.whereBuilder.WhereOrPrefixIn(prefix, column, in))
|
2021-11-17 21:29:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// WhereOrPrefixNull builds `prefix.columns[0] IS NULL OR prefix.columns[1] IS NULL ...` statement in `OR` conditions.
|
2022-05-07 15:11:31 +08:00
|
|
|
// See WhereBuilder.WhereOrPrefixNull.
|
2021-11-17 21:29:46 +08:00
|
|
|
func (m *Model) WhereOrPrefixNull(prefix string, columns ...string) *Model {
|
2022-04-30 15:53:56 +08:00
|
|
|
return m.callWhereBuilder(m.whereBuilder.WhereOrPrefixNull(prefix, columns...))
|
2021-11-17 21:29:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// WhereOrPrefixNotBetween builds `prefix.column NOT BETWEEN min AND max` statement in `OR` conditions.
|
2022-05-07 15:11:31 +08:00
|
|
|
// See WhereBuilder.WhereOrPrefixNotBetween.
|
2021-11-17 21:29:46 +08:00
|
|
|
func (m *Model) WhereOrPrefixNotBetween(prefix string, column string, min, max interface{}) *Model {
|
2022-04-30 15:53:56 +08:00
|
|
|
return m.callWhereBuilder(m.whereBuilder.WhereOrPrefixNotBetween(prefix, column, min, max))
|
2021-11-17 21:29:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// WhereOrPrefixNotLike builds `prefix.column NOT LIKE like` statement in `OR` conditions.
|
2022-05-07 15:11:31 +08:00
|
|
|
// See WhereBuilder.WhereOrPrefixNotLike.
|
2021-11-17 21:29:46 +08:00
|
|
|
func (m *Model) WhereOrPrefixNotLike(prefix string, column string, like interface{}) *Model {
|
2022-04-30 15:53:56 +08:00
|
|
|
return m.callWhereBuilder(m.whereBuilder.WhereOrPrefixNotLike(prefix, column, like))
|
2021-11-17 21:29:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// WhereOrPrefixNotIn builds `prefix.column NOT IN (in)` statement.
|
2022-05-07 15:11:31 +08:00
|
|
|
// See WhereBuilder.WhereOrPrefixNotIn.
|
2021-11-17 21:29:46 +08:00
|
|
|
func (m *Model) WhereOrPrefixNotIn(prefix string, column string, in interface{}) *Model {
|
2022-04-30 15:53:56 +08:00
|
|
|
return m.callWhereBuilder(m.whereBuilder.WhereOrPrefixNotIn(prefix, column, in))
|
2021-11-17 21:29:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// WhereOrPrefixNotNull builds `prefix.columns[0] IS NOT NULL OR prefix.columns[1] IS NOT NULL ...` statement in `OR` conditions.
|
2022-05-07 15:11:31 +08:00
|
|
|
// See WhereBuilder.WhereOrPrefixNotNull.
|
2021-11-17 21:29:46 +08:00
|
|
|
func (m *Model) WhereOrPrefixNotNull(prefix string, columns ...string) *Model {
|
2022-04-30 15:53:56 +08:00
|
|
|
return m.callWhereBuilder(m.whereBuilder.WhereOrPrefixNotNull(prefix, columns...))
|
2021-11-17 21:29:46 +08:00
|
|
|
}
|