-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
28 lines (22 loc) · 798 Bytes
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package mysqlx
import (
"github.com/renthraysk/mysqlx/collation"
"github.com/renthraysk/mysqlx/msg"
)
func Null() any { return msg.Null() }
// String wraps a string value with a specific collation for use as an input parameter value
func String(value string, collation collation.Collation) any {
return &msg.String{Value: value, Collation: collation}
}
// JSON wraps a byte slice value for use as an JSON input parameter value
func JSON[T []byte | string](json T) any {
return msg.JSON(json)
}
// XML wraps a byte slice value for use as an XML input parameter value
func XML[T []byte | string](xml T) any {
return msg.XML(xml)
}
// Geometry wraps a byte slice value for use as an Geometry input parameter value
func Geometry[T []byte | string](geom T) any {
return msg.Geometry(geom)
}