⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ocikp.h

📁 通用的数据库中间库
💻 H
📖 第 1 页 / 共 5 页
字号:
   OCI_DATE_INVALID_SECOND      0x400           Bad SeCond   OCI_DATE_SECOND_BELOW_VALID  0x800           bad second Low/high bit (1=low)   OCI_DATE_DAY_MISSING_FROM_1582 0x1000        Day is one of those "missing"                                                from 1582   OCI_DATE_YEAR_ZERO           0x2000          Year may not equal zero   OCI_DATE_INVALID_TIMEZONE    0x4000          Bad Timezone   OCI_DATE_INVALID_FORMAT      0x8000          Bad date format input   So, for example, if the date passed in was 2/0/1990 25:61:10 in   (month/day/year hours:minutes:seconds format), the error returned   would be OCI_DATE_INVALID_DAY | OCI_DATE_DAY_BELOW_VALID |   OCI_DATE_INVALID_HOUR | OCI_DATE_INVALID_MINUTEDESCRIPTION:  	Check if the given date is valid.RETURNS:        OCI_SUCCESS if the function completes successfully.        OCI_INVALID_HANDLE if 'err' is NULL.        OCI_ERROR if  	  'date' and 'valid' pointers are NULL pointers------------------------------- OCIDateTimeCompare-------------------------sword OCIDateTimeCompare(dvoid *hndl, OCIError *err, CONST OCIDateTime *date1,                      CONST OCIDateTime *date2,  sword *result );NAME: OCIDateTimeCompare - OCIDateTime CoMPare datesPARAMETERS:hndl (IN) - Session/Env handle. err (IN/OUT) - error handle. If there is an error, it is                recorded in 'err' and this function returns OCI_ERROR.                The error recorded in 'err' can be retrieved by calling                OCIErrorGet().date1, date2 (IN) - dates to be comparedtype (IN)  - Type of datetime to be compared. Both input datetimes			should be of same type.(OCI_DATE, OCI_TIME, 				OCI_TIMESTAMP, OCI_TZTIMESTAMP, OCI_TZTIME)result (OUT) - comparison result, 0 if equal, -1 if date1 < date2,   		1 if date1 > date2DESCRIPTION:The function OCIDateCompare compares two dates. It returns -1 if date1 is smaller than date2, 0 if they are equal, and 1 if date1 is greater than date2.RETURNS:       OCI_SUCCESS if the function completes successfully.        OCI_INVALID_HANDLE if 'err' is NULL.        OCI_ERROR if  	  invalid date	  input dates are not mutually comparable------------------------------OCIDateTimeConvert----------------------sword OCIDateTimeConvert(dvoid *hndl, OCIError *err, OCIDateTime *indate, 				OCIDateTime *outdate);NAME: OCIDateTimeConvert - Conversion between different DATETIME typesPARAMETERS:hndl (IN) - Session/Env handle. err (IN/OUT) - error handle. If there is an error, it is                recorded in 'err' and this function returns OCI_ERROR.                The error recorded in 'err' can be retrieved by calling                OCIErrorGet().indate (IN) - pointer to input dateoutdate (OUT) - pointer to output datetime DESCRIPTION: Converts one datetime type to another. The result type is       the type of the 'outdate' descriptor.RETURNS:        OCI_SUCCESS if the function completes successfully.        OCI_INVALID_HANDLE if 'err' is NULL.	OCI_ERROR if	    conversion not possible.   ---------------------------- OCIDateTimeFromText-----------------------sword OCIDateTimeFromText(dvoid *hndl, OCIError *err, CONST OraText *date_str,                      size_t d_str_length, CONST OraText *fmt, ub1 fmt_length,                      CONST OraText *lang_name, size_t lang_length,                      OCIDateTime *date );NAME: OCIDateTimeFromText - OCIDateTime convert String FROM DatePARAMETERS:hndl (IN) - Session/Env handle. If Session Handle is passed, the 		    conversion takes place in session NLS_LANGUAGE and		    session NLS_CALENDAR, otherwise the default is used.err (IN/OUT) - error handle. If there is an error, it is                recorded in 'err' and this function returns OCI_ERROR.                The error recorded in 'err' can be retrieved by calling                OCIErrorGet().date_str (IN) - input string to be converted to Oracle dated_str_length (IN) - size of the input string, if the length is -1  		then 'date_str' is treated as a null terminated  stringfmt (IN) - conversion format; if 'fmt' is a null pointer, then                the string is expected to be in the default format for		the datetime type.fmt_length (IN) - length of the 'fmt' parameterlang_name (IN) - language in which the names and abbreviations of  	        days and months are specified, if null i.e. (OraText *)0,  		the default language of session is used, lang_length (IN) - length of the 'lang_name' parameterdate (OUT) - given string converted to dateDESCRIPTION:  	Converts the given string to Oracle datetime type set in the         OCIDateTime descriptor according to the specified format. Refer to         "TO_DATE" conversion function described in "Oracle SQL Language         Reference Manual" for a description of format.RETURNS:        OCI_SUCCESS if the function completes successfully.        OCI_INVALID_HANDLE if 'err' is NULL.        OCI_ERROR if  	  invalid format  	  unknown language  	  invalid input string--------------------------- OCIDateTimeGetDate-------------------------void OCIDateTimeGetDate(dvoid *hndl, OCIError *err,  CONST OCIDateTime *date, 		 sb2 *year, ub1 *month, ub1 *day );NAME: OCIDateTimeGetDate - OCIDateTime Get Date (year, month, day)  				portion of DATETIME. PARAMETERS:hndl (IN) - Session/Env handle. err (IN/OUT) - error handle. If there is an error, it is                recorded in 'err' and this function returns OCI_ERROR.                The error recorded in 'err' can be retrieved by calling                OCIErrorGet().datetime (IN) - Pointer to OCIDateTime year      (OUT) - year valuemonth     (OUT) - month valueday       (OUT) - day value--------------------------- OCIDateTimeGetTime ------------------------void OCIDateTimeGetTime(dvoid *hndl, OCIError *err, OCIDateTime *datetime, 		 ub1 *hour, ub1 *min, ub1 *sec, ub4 *fsec);NAME: OCIDateTimeGetTime - OCIDateTime Get Time (hour, min, second, 			fractional second)  of DATETIME. PARAMETERS:hndl (IN) - Session/Env handle. err (IN/OUT) - error handle. If there is an error, it is                recorded in 'err' and this function returns OCI_ERROR.                The error recorded in 'err' can be retrieved by calling                OCIErrorGet().datetime (IN) - Pointer to OCIDateTime hour      (OUT) - hour valuemin       (OUT) - minute valuesec       (OUT) - second valuefsec      (OUT) - Fractional Second value--------------------------- OCIDateTimeGetTimeZoneOffset ----------------------sword OCIDateTimeGetTimeZoneOffset(dvoid *hndl,OCIError *err,CONST               OCIDateTime *datetime,sb1 *hour,sb1  *minute); NAME: OCIDateTimeGetTimeZoneOffset - OCIDateTime Get TimeZone (hour, minute)                           portion of DATETIME. PARAMETERS:hndl (IN) - Session/Env handle. err (IN/OUT) - error handle. If there is an error, it is                recorded in 'err' and this function returns OCI_ERROR.                The error recorded in 'err' can be retrieved by calling                OCIErrorGet().datetime (IN) - Pointer to OCIDateTime hour      (OUT) - TimeZone Hour valueminute     (OUT) - TimeZone Minute value ------------------------------OCIDateTimeIntervalAdd----------------------sword OCIDateTimeIntervalAdd(dvoid *hndl, OCIError *err, OCIDateTime *datetime,	 OCIInterval *inter, OCIDateTime *outdatetime);NAME: OCIDateTimeIntervalAdd - Adds an interval to datetimePARAMETERS:hndl (IN) - Session/Env handle.err (IN/OUT) - error handle. If there is an error, it is                recorded in 'err' and this function returns OCI_ERROR.                The error recorded in 'err' can be retrieved by calling                OCIErrorGet().datetime (IN) - pointer to input datetimeinter    (IN) - pointer to interval outdatetime (IN) - pointer to output datetime. The output datetime 				will be of same type as input datetimeDESCRIPTION: 	Adds an interval to a datetime to produce a resulting datetimeRETURNS:        OCI_SUCCESS if the function completes successfully.        OCI_INVALID_HANDLE if 'err' is NULL.	OCI_ERROR if:		resulting date is before Jan 1, -4713		resulting date is after Dec 31, 9999------------------------------OCIDateTimeIntervalSub----------------------sword OCIDateTimeIntervalSub(dvoid *hndl, OCIError *err, OCIDateTime *datetime,	 OCIInterval *inter, OCIDateTime *outdatetime);NAME: OCIDateTimeIntervalSub - Subtracts an interval from a datetimePARAMETERS:hndl (IN) - Session/Env handle. err (IN/OUT) - error handle. If there is an error, it is                recorded in 'err' and this function returns OCI_ERROR.                The error recorded in 'err' can be retrieved by calling                OCIErrorGet().datetime (IN) - pointer to input datetimeinter    (IN) - pointer to interval outdatetime (IN) - pointer to output datetime. The output datetime 				will be of same type as input datetimeDESCRIPTION:  	Subtracts an interval from a datetime and stores the result in a     	datetimeRETURNS:        OCI_SUCCESS if the function completes successfully.        OCI_INVALID_HANDLE if 'err' is NULL.	OCI_ERROR if:		resulting date is before Jan 1, -4713		resulting date is after Dec 31, 9999--------------------------- OCIDateTimeConstruct-------------------------sword OCIDateTimeConstruct(dvoid  *hndl,OCIError *err,OCIDateTime *datetime,               sb2 year,ub1 month,ub1 day,ub1 hour,ub1 min,ub1 sec,ub4 fsec,               OraText  *timezone,size_t timezone_length);   NAME: OCIDateTimeConstruct - Construct an OCIDateTime. Only the relevant       fields for the OCIDateTime descriptor types are used.   PARAMETERS:        hndl (IN) - Session/Env handle.         err (IN/OUT) - error handle. If there is an error, it is                recorded in 'err' and this function returns OCI_ERROR.                The error recorded in 'err' can be retrieved by calling                OCIErrorGet().        datetime (IN) - Pointer to OCIDateTime         year      (IN) - year value        month     (IN) - month value        day       (IN) - day value                hour      (IN) - hour value        min       (IN) - minute value        sec       (IN) - second value        fsec      (IN) - Fractional Second value        timezone  (IN) - Timezone string        timezone_length(IN) - Length of timezone stringDESCRIPTION:       Constructs a DateTime descriptor. The type of the datetime is the       type of the OCIDateTime descriptor. Only the relevant fields based       on the type are used. For Types with timezone, the date and time       fields are assumed to be in the local time of the specified timezone.       If timezone is not specified, then session default timezone is       assumed.RETURNS:        OCI_SUCCESS if the function completes successfully.        OCI_ERROR if datetime is not valid.--------------------------- OCIDateTimeSysTimeStamp---------------------sword OCIDateTimeSysTimeStamp(dvoid *hndl, OCIError *err,               OCIDateTime *sys_date ); NAME: OCIDateTimeSysTimeStamp - Returns system date/time as a TimeStamp with                       timezonePARAMETERS:hndl (IN) - Session/Env handle. err (IN/OUT) - error handle. If there is an error, it is                recorded in 'err' and this function returns OCI_ERROR.                The error recorded in 'err' can be retrieved by calling                OCIErrorGet().sys_date (OUT) - Pointer to output timestamp DESCRIPTION:         Gets the system current date and time as a timestamp with timezoneRETURNS:        OCI_SUCCESS if the function completes successfully.        OCI_INVALID_HANDLE if 'err' is NULL. ------------------------------OCIDateTimeSubtract-----------------------sword OCIDateTimeSubtract(dvoid *hndl, OCIError *err, OCIDateTime *indate1, 		OCIDateTime *indate2,	OCIInterval *inter);NAME: OCIDateTimeSubtract - subtracts two datetimes to return an intervalPARAMETERS:hndl (IN) - Session/Env handle. err (IN/OUT) - error handle. If there is an error, it is                recorded in 'err' and this function returns OCI_ERROR.                The error recorded in 'err' can be retrieved by calling                OCIErrorGet().indate1(IN) - pointer to subtrahendindate2(IN) - pointer to minuendinter  (OUT) - pointer to output intervalDESCRIPTION: 	Takes two datetimes as input and stores their difference in an         interval. The type of the result interval is the type of the         'inter' descriptor.RETURNS:        OCI_SUCCESS if the function completes successfully.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -