OCILIB (C and C++ Driver for Oracle)
4.7.5
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
|
OcilibCApiLongs
OCILIB encapsulates Oracle SQL all Numeric types using C native data types. But it also provides an optional OCI_Number handle for manipulating and accessing Oracle NUMBER type. OCI_Number provides management for some special value that cannot be addressed in C such as positive and negative infinity.
Functions | |
OCI_SYM_PUBLIC OCI_Number *OCI_API | OCI_NumberCreate (OCI_Connection *con) |
Create a local number object. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_NumberFree (OCI_Number *number) |
Free a number object. | |
OCI_SYM_PUBLIC OCI_Number **OCI_API | OCI_NumberArrayCreate (OCI_Connection *con, unsigned int nbelem) |
Create an array of number object. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_NumberArrayFree (OCI_Number **numbers) |
Free an array of number objects. | |
OCI_SYM_PUBLIC int OCI_API | OCI_NumberAssign (OCI_Number *number, OCI_Number *number_src) |
Assign the value of a number handle to another one. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_NumberToText (OCI_Number *number, const otext *fmt, int size, otext *str) |
Convert a number value from the given number handle to a string. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_NumberFromText (OCI_Number *number, const otext *str, const otext *fmt) |
Convert a string to a number and store it in the given number handle. | |
OCI_SYM_PUBLIC unsigned char *OCI_API | OCI_NumberGetContent (OCI_Number *number) |
Return the number value content. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_NumberSetContent (OCI_Number *number, unsigned char *content) |
Assign the number value content. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_NumberSetValue (OCI_Number *number, unsigned int type, void *value) |
Assign the number value with the value of a native C numeric type. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_NumberGetValue (OCI_Number *number, unsigned int type, void *value) |
Assign the number value to a native C numeric type. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_NumberAdd (OCI_Number *number, unsigned int type, void *value) |
Add the value of a native C numeric type to the given number. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_NumberSub (OCI_Number *number, unsigned int type, void *value) |
Subtract the value of a native C numeric type to the given number. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_NumberMultiply (OCI_Number *number, unsigned int type, void *value) |
Multiply the given number with the value of a native C numeric. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_NumberDivide (OCI_Number *number, unsigned int type, void *value) |
Divide the given number with the value of a native C numeric. | |
OCI_SYM_PUBLIC int OCI_API | OCI_NumberCompare (OCI_Number *number1, OCI_Number *number2) |
Compares two number handles. | |
OCI_SYM_PUBLIC OCI_Number *OCI_API OCI_NumberCreate | ( | OCI_Connection * | con | ) |
#include <api.h>
Create a local number object.
con | - Connection handle |
OCI_SYM_PUBLIC boolean OCI_API OCI_NumberFree | ( | OCI_Number * | number | ) |
#include <api.h>
Free a number object.
number | - Number handle |
OCI_SYM_PUBLIC OCI_Number **OCI_API OCI_NumberArrayCreate | ( | OCI_Connection * | con, |
unsigned int | nbelem | ||
) |
#include <api.h>
Create an array of number object.
con | - Connection handle |
nbelem | - number of elements in the array |
OCI_SYM_PUBLIC boolean OCI_API OCI_NumberArrayFree | ( | OCI_Number ** | numbers | ) |
#include <api.h>
Free an array of number objects.
numbers | - Array of number objects |
OCI_SYM_PUBLIC int OCI_API OCI_NumberAssign | ( | OCI_Number * | number, |
OCI_Number * | number_src | ||
) |
#include <api.h>
Assign the value of a number handle to another one.
number | - Destination number handle |
number_src | - Source number handle |
Referenced by ocilib::Number::Clone().
OCI_SYM_PUBLIC boolean OCI_API OCI_NumberToText | ( | OCI_Number * | number, |
const otext * | fmt, | ||
int | size, | ||
otext * | str | ||
) |
#include <api.h>
Convert a number value from the given number handle to a string.
number | - source number handle |
fmt | - Number format |
size | - Destination string size in characters |
str | - Destination date string |
Referenced by ocilib::Number::ToString().
OCI_SYM_PUBLIC boolean OCI_API OCI_NumberFromText | ( | OCI_Number * | number, |
const otext * | str, | ||
const otext * | fmt | ||
) |
#include <api.h>
Convert a string to a number and store it in the given number handle.
number | - Destination number handle |
str | - Source number string |
fmt | - Number format |
Referenced by ocilib::Number::FromString().
OCI_SYM_PUBLIC unsigned char *OCI_API OCI_NumberGetContent | ( | OCI_Number * | number | ) |
#include <api.h>
Return the number value content.
number | - number handle |
OCI_SYM_PUBLIC boolean OCI_API OCI_NumberSetContent | ( | OCI_Number * | number, |
unsigned char * | content | ||
) |
#include <api.h>
Assign the number value content.
number | - number handle |
content | - raw number content |
OCI_SYM_PUBLIC boolean OCI_API OCI_NumberSetValue | ( | OCI_Number * | number, |
unsigned int | type, | ||
void * | value | ||
) |
#include <api.h>
Assign the number value with the value of a native C numeric type.
number | - number handle |
type | - native C type to assign |
value | - pointer to value to set |
param
type can be :OCI_SYM_PUBLIC boolean OCI_API OCI_NumberGetValue | ( | OCI_Number * | number, |
unsigned int | type, | ||
void * | value | ||
) |
#include <api.h>
Assign the number value to a native C numeric type.
number | - number handle |
type | - native C type to assign |
value | - pointer to a native C variable |
OCI_SYM_PUBLIC boolean OCI_API OCI_NumberAdd | ( | OCI_Number * | number, |
unsigned int | type, | ||
void * | value | ||
) |
#include <api.h>
Add the value of a native C numeric type to the given number.
number | - number handle |
type | - native C type of the variable |
value | - pointer to a native C variable to add |
OCI_SYM_PUBLIC boolean OCI_API OCI_NumberSub | ( | OCI_Number * | number, |
unsigned int | type, | ||
void * | value | ||
) |
#include <api.h>
Subtract the value of a native C numeric type to the given number.
number | - number handle |
type | - native C type of the variable |
value | - pointer to a native C variable to subtract |
OCI_SYM_PUBLIC boolean OCI_API OCI_NumberMultiply | ( | OCI_Number * | number, |
unsigned int | type, | ||
void * | value | ||
) |
#include <api.h>
Multiply the given number with the value of a native C numeric.
number | - number handle |
type | - native C type of the variable |
value | - pointer to a native C variable to multiply by |
OCI_SYM_PUBLIC boolean OCI_API OCI_NumberDivide | ( | OCI_Number * | number, |
unsigned int | type, | ||
void * | value | ||
) |
#include <api.h>
Divide the given number with the value of a native C numeric.
number | - number handle |
type | - native C type of the variable |
value | - pointer to a native C variable to divide by |
OCI_SYM_PUBLIC int OCI_API OCI_NumberCompare | ( | OCI_Number * | number1, |
OCI_Number * | number2 | ||
) |
#include <api.h>
Compares two number handles.
number1 | - number1 handle |
number2 | - number2 handle |