Beispiel #1
0
func Bind_param_float(req_handle int, index int, value interface{}, flag int) int {
	var handle C.int = C.int(req_handle)
	var res C.int

	c_param := C.float(value.(float64))
	res = C.cci_bind_param(handle, C.int(index), C.CCI_A_TYPE_FLOAT,
		unsafe.Pointer(&c_param), C.CCI_U_TYPE_FLOAT, C.char(flag))

	return int(res)
}
Beispiel #2
0
func Bind_param_string(req_handle int, index int, value interface{}, flag int) int {
	var handle C.int = C.int(req_handle)
	var res C.int

	ss := fmt.Sprint(value)
	res = C.cci_bind_param(handle, C.int(index), C.CCI_A_TYPE_STR,
		unsafe.Pointer(C.CString(ss)), C.CCI_U_TYPE_STRING, C.char(flag))

	return int(res)
}