|
OCILIB (C and C++ Driver for Oracle)
4.0.0
|
OCILIB encapsulates Oracle :
Basically, the OCI_Timestamp and OCI_Interval routines are wrappers around the Oracle OCIDatetime and OCIInterval APIs
Functions | |
| OCI_EXPORT OCI_Timestamp *OCI_API | OCI_TimestampCreate (OCI_Connection *con, unsigned int type) |
| Create a local Timestamp instance. More... | |
| OCI_EXPORT boolean OCI_API | OCI_TimestampFree (OCI_Timestamp *tmsp) |
| Free an OCI_Timestamp handle. More... | |
| OCI_EXPORT OCI_Timestamp **OCI_API | OCI_TimestampArrayCreate (OCI_Connection *con, unsigned int type, unsigned int nbelem) |
| Create an array of timestamp object. More... | |
| OCI_EXPORT boolean OCI_API | OCI_TimestampArrayFree (OCI_Timestamp **tmsps) |
| Free an array of timestamp objects. More... | |
| OCI_EXPORT unsigned int OCI_API | OCI_TimestampGetType (OCI_Timestamp *tmsp) |
| Return the type of the given Timestamp object. More... | |
| OCI_EXPORT boolean OCI_API | OCI_TimestampAssign (OCI_Timestamp *tmsp, OCI_Timestamp *tmsp_src) |
| Assign the value of a timestamp handle to another one. More... | |
| OCI_EXPORT int OCI_API | OCI_TimestampCheck (OCI_Timestamp *tmsp) |
| Check if the given timestamp is valid. More... | |
| OCI_EXPORT int OCI_API | OCI_TimestampCompare (OCI_Timestamp *tmsp, OCI_Timestamp *tmsp2) |
| Compares two timestamp handles. More... | |
| OCI_EXPORT boolean OCI_API | OCI_TimestampConstruct (OCI_Timestamp *tmsp, int year, int month, int day, int hour, int min, int sec, int fsec, const otext *time_zone) |
| Set a timestamp handle value. More... | |
| OCI_EXPORT boolean OCI_API | OCI_TimestampConvert (OCI_Timestamp *tmsp, OCI_Timestamp *tmsp_src) |
| Convert one timestamp value from one type to another. More... | |
| OCI_EXPORT boolean OCI_API | OCI_TimestampFromText (OCI_Timestamp *tmsp, const otext *str, const otext *fmt) |
| Convert a string to a timestamp and store it in the given timestamp handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_TimestampToText (OCI_Timestamp *tmsp, const otext *fmt, int size, otext *str, int precision) |
| Convert a timestamp value from the given timestamp handle to a string. More... | |
| OCI_EXPORT boolean OCI_API | OCI_TimestampGetDate (OCI_Timestamp *tmsp, int *year, int *month, int *day) |
| Extract the date part from a timestamp handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_TimestampGetTime (OCI_Timestamp *tmsp, int *hour, int *min, int *sec, int *fsec) |
| Extract the time portion from a timestamp handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_TimestampGetDateTime (OCI_Timestamp *tmsp, int *year, int *month, int *day, int *hour, int *min, int *sec, int *fsec) |
| Extract the date and time parts from a date handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_TimestampGetTimeZoneName (OCI_Timestamp *tmsp, int size, otext *str) |
| Return the time zone name of a timestamp handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_TimestampGetTimeZoneOffset (OCI_Timestamp *tmsp, int *hour, int *min) |
| Return the time zone (hour, minute) portion of a timestamp handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_TimestampIntervalAdd (OCI_Timestamp *tmsp, OCI_Interval *itv) |
| Add an interval value to a timestamp value of a timestamp handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_TimestampIntervalSub (OCI_Timestamp *tmsp, OCI_Interval *itv) |
| Subtract an interval value from a timestamp value of a timestamp handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_TimestampSubtract (OCI_Timestamp *tmsp, OCI_Timestamp *tmsp2, OCI_Interval *itv) |
| Store the difference of two timestamp handles into an interval handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_TimestampSysTimestamp (OCI_Timestamp *tmsp) |
| Stores the system current date and time as a timestamp value with time zone into the timestamp handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_TimestampToCTime (OCI_Timestamp *tmsp, struct tm *ptm, time_t *pt) |
| Affect an OCI_Timestamp handle value to ISO C time data types. More... | |
| OCI_EXPORT boolean OCI_API | OCI_TimestampFromCTime (OCI_Timestamp *tmsp, struct tm *ptm, time_t t) |
| Affect ISO C time datatypes values to an OCI_Timestamp handle. More... | |
| OCI_EXPORT OCI_Interval *OCI_API | OCI_IntervalCreate (OCI_Connection *con, unsigned int type) |
| Create a local interval object. More... | |
| OCI_EXPORT boolean OCI_API | OCI_IntervalFree (OCI_Interval *itv) |
| Free an OCI_Interval handle. More... | |
| OCI_EXPORT OCI_Interval **OCI_API | OCI_IntervalArrayCreate (OCI_Connection *con, unsigned int type, unsigned int nbelem) |
| Create an array of Interval object. More... | |
| OCI_EXPORT boolean OCI_API | OCI_IntervalArrayFree (OCI_Interval **itvs) |
| Free an array of Interval objects. More... | |
| OCI_EXPORT unsigned int OCI_API | OCI_IntervalGetType (OCI_Interval *itv) |
| Return the type of the given Interval object. More... | |
| OCI_EXPORT boolean OCI_API | OCI_IntervalAssign (OCI_Interval *itv, OCI_Interval *itv_src) |
| Assign the value of a interval handle to another one. More... | |
| OCI_EXPORT int OCI_API | OCI_IntervalCheck (OCI_Interval *itv) |
| Check if the given interval is valid. More... | |
| OCI_EXPORT int OCI_API | OCI_IntervalCompare (OCI_Interval *itv, OCI_Interval *itv2) |
| Compares two interval handles. More... | |
| OCI_EXPORT boolean OCI_API | OCI_IntervalFromText (OCI_Interval *itv, const otext *str) |
| Convert a string to an interval and store it in the given interval handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_IntervalToText (OCI_Interval *itv, int leading_prec, int fraction_prec, int size, otext *str) |
| Convert an interval value from the given interval handle to a string. More... | |
| OCI_EXPORT boolean OCI_API | OCI_IntervalFromTimeZone (OCI_Interval *itv, const otext *str) |
| Correct an interval handle value with the given time zone. More... | |
| OCI_EXPORT boolean OCI_API | OCI_IntervalGetDaySecond (OCI_Interval *itv, int *day, int *hour, int *min, int *sec, int *fsec) |
| Return the day / time portion of an interval handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_IntervalGetYearMonth (OCI_Interval *itv, int *year, int *month) |
| Return the year / month portion of an interval handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_IntervalSetDaySecond (OCI_Interval *itv, int day, int hour, int min, int sec, int fsec) |
| Set the day / time portion if the given interval handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_IntervalSetYearMonth (OCI_Interval *itv, int year, int month) |
| Set the year / month portion if the given Interval handle. More... | |
| OCI_EXPORT boolean OCI_API | OCI_IntervalAdd (OCI_Interval *itv, OCI_Interval *itv2) |
| Adds an interval handle value to another. More... | |
| OCI_EXPORT boolean OCI_API | OCI_IntervalSubtract (OCI_Interval *itv, OCI_Interval *itv2) |
| Subtract an interval handle value from another. More... | |
| OCI_EXPORT OCI_Timestamp* OCI_API OCI_TimestampCreate | ( | OCI_Connection * | con, |
| unsigned int | type | ||
| ) |
#include <ocilib.h>
Create a local Timestamp instance.
| con | - Connection handle |
| type | - Timestamp type |
| OCI_EXPORT boolean OCI_API OCI_TimestampFree | ( | OCI_Timestamp * | tmsp | ) |
#include <ocilib.h>
Free an OCI_Timestamp handle.
| tmsp | - Timestamp handle |
| OCI_EXPORT OCI_Timestamp** OCI_API OCI_TimestampArrayCreate | ( | OCI_Connection * | con, |
| unsigned int | type, | ||
| unsigned int | nbelem | ||
| ) |
#include <ocilib.h>
Create an array of timestamp object.
| con | - Connection handle |
| type | - Timestamp type |
| nbelem | - number of elements in the array |
| OCI_EXPORT boolean OCI_API OCI_TimestampArrayFree | ( | OCI_Timestamp ** | tmsps | ) |
#include <ocilib.h>
Free an array of timestamp objects.
| tmsps | - Array of timestamp objects |
| OCI_EXPORT unsigned int OCI_API OCI_TimestampGetType | ( | OCI_Timestamp * | tmsp | ) |
#include <ocilib.h>
Return the type of the given Timestamp object.
| tmsp | - Timestamp handle |
Referenced by ocilib::Timestamp::GetType().
| OCI_EXPORT boolean OCI_API OCI_TimestampAssign | ( | OCI_Timestamp * | tmsp, |
| OCI_Timestamp * | tmsp_src | ||
| ) |
#include <ocilib.h>
Assign the value of a timestamp handle to another one.
| tmsp | - Destination Timestamp handle |
| tmsp_src | - Source Timestamp handle |
Referenced by ocilib::Timestamp::Clone().
| OCI_EXPORT int OCI_API OCI_TimestampCheck | ( | OCI_Timestamp * | tmsp | ) |
#include <ocilib.h>
Check if the given timestamp is valid.
| tmsp | - Timestamp handle |
Referenced by ocilib::Timestamp::IsValid().
| OCI_EXPORT int OCI_API OCI_TimestampCompare | ( | OCI_Timestamp * | tmsp, |
| OCI_Timestamp * | tmsp2 | ||
| ) |
#include <ocilib.h>
Compares two timestamp handles.
| tmsp | - Timestamp1 handle |
| tmsp2 | - Timestamp2 handle |
| OCI_EXPORT boolean OCI_API OCI_TimestampConstruct | ( | OCI_Timestamp * | tmsp, |
| int | year, | ||
| int | month, | ||
| int | day, | ||
| int | hour, | ||
| int | min, | ||
| int | sec, | ||
| int | fsec, | ||
| const otext * | time_zone | ||
| ) |
#include <ocilib.h>
Set a timestamp handle value.
| tmsp | - Timestamp handle |
| year | - Year value |
| month | - Month value |
| day | - Day value |
| hour | - hour value |
| min | - minutes value |
| sec | - seconds value |
| fsec | - fractional part of seconds value |
| time_zone | - name of a time zone to use [optional] |
Referenced by ocilib::Timestamp::SetDateTime().
| OCI_EXPORT boolean OCI_API OCI_TimestampConvert | ( | OCI_Timestamp * | tmsp, |
| OCI_Timestamp * | tmsp_src | ||
| ) |
#include <ocilib.h>
Convert one timestamp value from one type to another.
| tmsp | - Timestamp handle to convert |
| tmsp_src | - Timestamp handle to use for the type conversion |
Referenced by ocilib::Timestamp::Convert().
| OCI_EXPORT boolean OCI_API OCI_TimestampFromText | ( | OCI_Timestamp * | tmsp, |
| const otext * | str, | ||
| const otext * | fmt | ||
| ) |
#include <ocilib.h>
Convert a string to a timestamp and store it in the given timestamp handle.
| tmsp | - Destination Timestamp handle |
| str | - Source date string |
| fmt | - Date format |
Referenced by ocilib::Timestamp::FromString().
| OCI_EXPORT boolean OCI_API OCI_TimestampToText | ( | OCI_Timestamp * | tmsp, |
| const otext * | fmt, | ||
| int | size, | ||
| otext * | str, | ||
| int | precision | ||
| ) |
#include <ocilib.h>
Convert a timestamp value from the given timestamp handle to a string.
| tmsp | - source Timestamp handle |
| fmt | - Timestamp format |
| size | - Destination string size in characters |
| str | - Destination date string |
| precision | - Precision for fractional part of the seconds |
Referenced by ocilib::Timestamp::ToString().
| OCI_EXPORT boolean OCI_API OCI_TimestampGetDate | ( | OCI_Timestamp * | tmsp, |
| int * | year, | ||
| int * | month, | ||
| int * | day | ||
| ) |
#include <ocilib.h>
Extract the date part from a timestamp handle.
| tmsp | - Timestamp handle |
| year | - Place holder for year value |
| month | - Place holder for month value |
| day | - Place holder for day value |
Referenced by ocilib::Timestamp::GetDate().
| OCI_EXPORT boolean OCI_API OCI_TimestampGetTime | ( | OCI_Timestamp * | tmsp, |
| int * | hour, | ||
| int * | min, | ||
| int * | sec, | ||
| int * | fsec | ||
| ) |
#include <ocilib.h>
Extract the time portion from a timestamp handle.
| tmsp | - Timestamp handle |
| hour | - Place holder for hour value |
| min | - Place holder for minute value |
| sec | - Place holder for second value |
| fsec | - Place holder for fractional part of second value |
Referenced by ocilib::Timestamp::GetTime().
| OCI_EXPORT boolean OCI_API OCI_TimestampGetDateTime | ( | OCI_Timestamp * | tmsp, |
| int * | year, | ||
| int * | month, | ||
| int * | day, | ||
| int * | hour, | ||
| int * | min, | ||
| int * | sec, | ||
| int * | fsec | ||
| ) |
#include <ocilib.h>
Extract the date and time parts from a date handle.
| tmsp | - Date handle |
| year | - Place holder for year value |
| month | - Place holder for month value |
| day | - Place holder for day value |
| hour | - Place holder for hour value |
| min | - Place holder for minute value |
| sec | - Place holder for second value |
| fsec | - Place holder for fractional part of seconds value |
Referenced by ocilib::Timestamp::GetDateTime().
| OCI_EXPORT boolean OCI_API OCI_TimestampGetTimeZoneName | ( | OCI_Timestamp * | tmsp, |
| int | size, | ||
| otext * | str | ||
| ) |
#include <ocilib.h>
Return the time zone name of a timestamp handle.
| tmsp | - Timestamp handle |
| size | - Destination string size in characters |
| str | - Destination zone name string |
Referenced by ocilib::Timestamp::GetTimeZone().
| OCI_EXPORT boolean OCI_API OCI_TimestampGetTimeZoneOffset | ( | OCI_Timestamp * | tmsp, |
| int * | hour, | ||
| int * | min | ||
| ) |
#include <ocilib.h>
Return the time zone (hour, minute) portion of a timestamp handle.
| tmsp | - Timestamp handle |
| hour | - Place holder for hour value |
| min | - Place holder for min value |
Referenced by ocilib::Timestamp::GetTimeZoneOffset().
| OCI_EXPORT boolean OCI_API OCI_TimestampIntervalAdd | ( | OCI_Timestamp * | tmsp, |
| OCI_Interval * | itv | ||
| ) |
#include <ocilib.h>
Add an interval value to a timestamp value of a timestamp handle.
| tmsp | - Timestamp handle |
| itv | - Interval handle |
Referenced by ocilib::Timestamp::operator+=().
| OCI_EXPORT boolean OCI_API OCI_TimestampIntervalSub | ( | OCI_Timestamp * | tmsp, |
| OCI_Interval * | itv | ||
| ) |
#include <ocilib.h>
Subtract an interval value from a timestamp value of a timestamp handle.
| tmsp | - Timestamp handle |
| itv | - Interval handle |
Referenced by ocilib::Timestamp::operator-=().
| OCI_EXPORT boolean OCI_API OCI_TimestampSubtract | ( | OCI_Timestamp * | tmsp, |
| OCI_Timestamp * | tmsp2, | ||
| OCI_Interval * | itv | ||
| ) |
#include <ocilib.h>
Store the difference of two timestamp handles into an interval handle.
| tmsp | - Timestamp handle (subtrahend) |
| tmsp2 | - Timestamp2 handle (minuend) |
| itv | - Interval handle |
Referenced by ocilib::Timestamp::operator-().
| OCI_EXPORT boolean OCI_API OCI_TimestampSysTimestamp | ( | OCI_Timestamp * | tmsp | ) |
#include <ocilib.h>
Stores the system current date and time as a timestamp value with time zone into the timestamp handle.
| tmsp | - Timestamp handle |
Referenced by ocilib::Timestamp::SysTimestamp().
| OCI_EXPORT boolean OCI_API OCI_TimestampToCTime | ( | OCI_Timestamp * | tmsp, |
| struct tm * | ptm, | ||
| time_t * | pt | ||
| ) |
#include <ocilib.h>
Affect an OCI_Timestamp handle value to ISO C time data types.
| tmsp | - Timestamp handle |
| ptm | - Pointer to a structure tm to receive date/time values |
| pt | - Pointer to a time_t to hold the date/time in the time_t format |
| OCI_EXPORT boolean OCI_API OCI_TimestampFromCTime | ( | OCI_Timestamp * | tmsp, |
| struct tm * | ptm, | ||
| time_t | t | ||
| ) |
#include <ocilib.h>
Affect ISO C time datatypes values to an OCI_Timestamp handle.
| tmsp | - Timestamp handle |
| ptm | - Pointer to a structure tm that hold the date/time value |
| t | - Value (time_t) that hold the date/time in the time_t format |
Both parameters 'ptm' and 'p' are optional but one of them has to be provided. If 'ptm' is not null, its value is affected to the OCI_Timestamp handle, otherwise the value of 't' is used.
| OCI_EXPORT OCI_Interval* OCI_API OCI_IntervalCreate | ( | OCI_Connection * | con, |
| unsigned int | type | ||
| ) |
#include <ocilib.h>
Create a local interval object.
| con | - Connection handle |
| type | - Type of Interval |
Referenced by ocilib::Interval::Interval().
| OCI_EXPORT boolean OCI_API OCI_IntervalFree | ( | OCI_Interval * | itv | ) |
#include <ocilib.h>
Free an OCI_Interval handle.
| itv | - Interval handle |
Referenced by ocilib::Interval::Interval().
| OCI_EXPORT OCI_Interval** OCI_API OCI_IntervalArrayCreate | ( | OCI_Connection * | con, |
| unsigned int | type, | ||
| unsigned int | nbelem | ||
| ) |
#include <ocilib.h>
Create an array of Interval object.
| con | - Connection handle |
| type | - Type of Interval |
| nbelem | - number of elements in the array |
| OCI_EXPORT boolean OCI_API OCI_IntervalArrayFree | ( | OCI_Interval ** | itvs | ) |
#include <ocilib.h>
Free an array of Interval objects.
| itvs | - Array of Interval objects |
| OCI_EXPORT unsigned int OCI_API OCI_IntervalGetType | ( | OCI_Interval * | itv | ) |
#include <ocilib.h>
Return the type of the given Interval object.
| itv | - Interval handle |
Referenced by ocilib::Interval::GetType().
| OCI_EXPORT boolean OCI_API OCI_IntervalAssign | ( | OCI_Interval * | itv, |
| OCI_Interval * | itv_src | ||
| ) |
#include <ocilib.h>
Assign the value of a interval handle to another one.
| itv | - Destination interval handle |
| itv_src | - Source interval handle |
Referenced by ocilib::Interval::Clone().
| OCI_EXPORT int OCI_API OCI_IntervalCheck | ( | OCI_Interval * | itv | ) |
#include <ocilib.h>
Check if the given interval is valid.
| itv | - Interval handle |
Referenced by ocilib::Interval::IsValid().
| OCI_EXPORT int OCI_API OCI_IntervalCompare | ( | OCI_Interval * | itv, |
| OCI_Interval * | itv2 | ||
| ) |
#include <ocilib.h>
Compares two interval handles.
| itv | - Interval1 handle |
| itv2 | - Interval2 handle |
| OCI_EXPORT boolean OCI_API OCI_IntervalFromText | ( | OCI_Interval * | itv, |
| const otext * | str | ||
| ) |
#include <ocilib.h>
Convert a string to an interval and store it in the given interval handle.
| itv | - Destination interval handle |
| str | - Source date string |
Referenced by ocilib::Interval::FromString().
| OCI_EXPORT boolean OCI_API OCI_IntervalToText | ( | OCI_Interval * | itv, |
| int | leading_prec, | ||
| int | fraction_prec, | ||
| int | size, | ||
| otext * | str | ||
| ) |
#include <ocilib.h>
Convert an interval value from the given interval handle to a string.
| itv | - source Interval handle |
| leading_prec | - Precision of the leading part |
| fraction_prec | - Precision of the fractional part |
| size | - Destination string size in characters |
| str | - Destination date string |
Referenced by ocilib::Interval::ToString().
| OCI_EXPORT boolean OCI_API OCI_IntervalFromTimeZone | ( | OCI_Interval * | itv, |
| const otext * | str | ||
| ) |
#include <ocilib.h>
Correct an interval handle value with the given time zone.
| itv | - Interval handle |
| str | - Time zone name |
Referenced by ocilib::Interval::UpdateTimeZone().
| OCI_EXPORT boolean OCI_API OCI_IntervalGetDaySecond | ( | OCI_Interval * | itv, |
| int * | day, | ||
| int * | hour, | ||
| int * | min, | ||
| int * | sec, | ||
| int * | fsec | ||
| ) |
#include <ocilib.h>
Return the day / time portion of an interval handle.
| itv | - Interval handle |
| day | - Place holder for day value |
| hour | - Place holder for hours value |
| min | - Place holder for minutes value |
| sec | - Place holder for seconds value |
| fsec | - Place holder for fractional part of seconds value |
Referenced by ocilib::Interval::GetDaySecond().
| OCI_EXPORT boolean OCI_API OCI_IntervalGetYearMonth | ( | OCI_Interval * | itv, |
| int * | year, | ||
| int * | month | ||
| ) |
#include <ocilib.h>
Return the year / month portion of an interval handle.
| itv | - Interval handle |
| year | - Place holder for year value |
| month | - Place holder for month value |
Referenced by ocilib::Interval::GetYearMonth().
| OCI_EXPORT boolean OCI_API OCI_IntervalSetDaySecond | ( | OCI_Interval * | itv, |
| int | day, | ||
| int | hour, | ||
| int | min, | ||
| int | sec, | ||
| int | fsec | ||
| ) |
#include <ocilib.h>
Set the day / time portion if the given interval handle.
| itv | - Interval handle |
| day | - day value |
| hour | - Hour value |
| min | - Minute value |
| sec | - Second value |
| fsec | - Fractional part of the seconds |
Referenced by ocilib::Interval::SetDaySecond().
| OCI_EXPORT boolean OCI_API OCI_IntervalSetYearMonth | ( | OCI_Interval * | itv, |
| int | year, | ||
| int | month | ||
| ) |
#include <ocilib.h>
Set the year / month portion if the given Interval handle.
| itv | - Interval handle |
| year | - Year value |
| month | - Month value |
Referenced by ocilib::Interval::SetYearMonth().
| OCI_EXPORT boolean OCI_API OCI_IntervalAdd | ( | OCI_Interval * | itv, |
| OCI_Interval * | itv2 | ||
| ) |
#include <ocilib.h>
Adds an interval handle value to another.
| itv | - Interval handle from witch to add |
| itv2 | - Interval handle to add |
Referenced by ocilib::Interval::operator+=().
| OCI_EXPORT boolean OCI_API OCI_IntervalSubtract | ( | OCI_Interval * | itv, |
| OCI_Interval * | itv2 | ||
| ) |
#include <ocilib.h>
Subtract an interval handle value from another.
| itv | - Interval handle from witch to remove |
| itv2 | - Interval handle to remove |
Referenced by ocilib::Interval::operator-=().