github.com/searKing/golang/go@v1.2.117/database/sql/args.go (about) 1 package sql 2 3 import "time" 4 5 func StringSliceArgs(src ...string) []any { 6 var args []any 7 for _, s := range src { 8 args = append(args, s) 9 } 10 return args 11 } 12 13 func BoolSliceArgs(src ...bool) []any { 14 var args []any 15 for _, s := range src { 16 args = append(args, s) 17 } 18 return args 19 } 20 21 func TimeSliceArgs(src ...time.Time) []any { 22 var args []any 23 for _, s := range src { 24 args = append(args, s) 25 } 26 return args 27 } 28 29 func IntSliceArgs(src ...int) []any { 30 var args []any 31 for _, s := range src { 32 args = append(args, s) 33 } 34 return args 35 } 36 37 func UintSliceArgs(src ...uint) []any { 38 var args []any 39 for _, s := range src { 40 args = append(args, s) 41 } 42 return args 43 } 44 45 func Int8SliceArgs(src ...int8) []any { 46 var args []any 47 for _, s := range src { 48 args = append(args, s) 49 } 50 return args 51 } 52 53 func Uint8SliceArgs(src ...uint8) []any { 54 var args []any 55 for _, s := range src { 56 args = append(args, s) 57 } 58 return args 59 } 60 61 func Int16SliceArgs(src ...int16) []any { 62 var args []any 63 for _, s := range src { 64 args = append(args, s) 65 } 66 return args 67 } 68 69 func Uint16SliceArgs(src ...uint16) []any { 70 var args []any 71 for _, s := range src { 72 args = append(args, s) 73 } 74 return args 75 } 76 77 func Int32SliceArgs(src ...int32) []any { 78 var args []any 79 for _, s := range src { 80 args = append(args, s) 81 } 82 return args 83 } 84 85 func Uint32SliceArgs(src ...uint32) []any { 86 var args []any 87 for _, s := range src { 88 args = append(args, s) 89 } 90 return args 91 }