View Source
const (
	ZeroTime0 = "0000-00-00 00:00:00"
	ZeroTime1 = "0001-01-01 00:00:00"

represents all zero times


This section is empty.


func IndexName

func IndexName(tableName, idxName string) string

IndexName returns index name

func IndexNoCase

func IndexNoCase(s, sep string) int

IndexNoCase index a string in a string with no care of capitalize

func IsArrayZero

func IsArrayZero(v reflect.Value) bool

IsArrayZero returns true is a slice of array is zero

func IsStructZero

func IsStructZero(v reflect.Value) bool

IsStructZero returns true if the Value is a struct and all fields is zero

func IsSubQuery

func IsSubQuery(tbName string) bool

IsSubQuery returns true if it contains a sub query

func IsTimeZero

func IsTimeZero(t time.Time) bool

IsTimeZero return true if a time is zero

func IsValueZero

func IsValueZero(v reflect.Value) bool

IsValueZero returns true if the reflect Value is a zero

func IsZero

func IsZero(k interface{}) bool

IsZero returns false if k is nil or has a zero value

func ReflectValue

func ReflectValue(bean interface{}) reflect.Value

ReflectValue returns value of a bean

func SliceEq

func SliceEq(left, right []string) bool

SliceEq return true if two slice have the same elements even if different sort.

func SplitNNoCase

func SplitNNoCase(s, sep string, n int) []string

SplitNNoCase split n by a seperator with no care of capitalize

func SplitNoCase

func SplitNoCase(s, sep string) []string

SplitNoCase split a string by a seperator with no care of capitalize


type Zeroable

type Zeroable interface {
	IsZero() bool

Zeroable represents an interface which could know if it's a zero value