Documentation ¶
Index ¶
- func ByteToInt64(data []byte) int64
- func CallMethod(method reflect.Value, args []reflect.Value) []interface{}
- func ClearTable(db *sql.DB, tableName string) error
- func CreateTable(db *sql.DB, tableName string, columns []string, tableConstraints ...string) error
- func DeleteById(db *sql.DB, tableName string, id int64) error
- func FormatSqlValue(value interface{}) string
- func GetMethod(i interface{}, methodName string) reflect.Value
- func GetParamType(method reflect.Value, paramIndex int) (bool, reflect.Type)
- func ID2String(id int64) string
- func InsertRow(db *sql.DB, tableName string, args ...interface{}) error
- func JsonNumberToInt(value interface{}) (int, error)
- func JsonNumberToInt64(value interface{}) (int64, error)
- func RandAlnum(n int) string
- func RandAlpha(n int) string
- func RandDigits(n int) string
- func RandSeq(chars string, n int) string
- func SendJsonError(rw http.ResponseWriter, value interface{}, code int)
- func SendJsonResponse(rw http.ResponseWriter, value interface{})
- func String2ID(strid string) int64
- func UUIDGen() int64
- func UpdateRows(db *sql.DB, tableName string, whereClause string, args ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteToInt64 ¶
func CreateTable ¶
func FormatSqlValue ¶
func FormatSqlValue(value interface{}) string
func JsonNumberToInt ¶
func JsonNumberToInt64 ¶
func RandDigits ¶
func SendJsonError ¶
func SendJsonError(rw http.ResponseWriter, value interface{}, code int)
func SendJsonResponse ¶
func SendJsonResponse(rw http.ResponseWriter, value interface{})
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.