示例#1
0
文件: oci8.go 项目: mattn/go-oci8
// ColumnTypeNullable implement RowsColumnTypeNullable.
func (rc *OCI8Rows) ColumnTypeNullable(i int) (nullable, ok bool) {
	retUb4 := C.WrapOCIAttrGetUb4(rc.s.s, C.OCI_HTYPE_STMT, C.OCI_ATTR_IS_NULL, (*C.OCIError)(rc.s.c.err))
	if retUb4.rv != C.OCI_SUCCESS {
		return false, false
	}
	return retUb4.num != 0, true
}
示例#2
0
文件: oci8.go 项目: AsamQi/go-oci8
func (s *OCI8Stmt) rowsAffected() (int64, error) {
	retUb4 := C.WrapOCIAttrGetUb4(s.s, C.OCI_HTYPE_STMT, C.OCI_ATTR_ROW_COUNT, (*C.OCIError)(s.c.err))
	if retUb4.rv != C.OCI_SUCCESS {
		return 0, ociGetError(s.c.err)
	}
	return int64(retUb4.num), nil
}
示例#3
0
文件: oci8.go 项目: tianlin/go-oci8
func (s *OCI8Stmt) lastInsertId() (int64, error) {
	retUb4 := C.WrapOCIAttrGetUb4(s.s, C.OCI_HTYPE_STMT, C.OCI_ATTR_ROWID, (*C.OCIError)(s.c.err))
	if retUb4.rv != C.OCI_SUCCESS {
		return 0, ociGetError(s.c.err)
	}
	return int64(retUb4.num), nil
}