Skip to content

Commit

Permalink
Export constant and definitions for new MS date/time from dblib headers
Browse files Browse the repository at this point in the history
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
  • Loading branch information
freddy77 committed Nov 21, 2015
1 parent 9e3eca4 commit a35fe7e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions include/sybdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,14 @@ enum
#define SYBBIGDATETIME SYBBIGDATETIME
SYBBIGTIME = 188, /* 0xBC */
#define SYBBIGTIME SYBBIGTIME
SYBMSDATE = 40, /* 0x28 */
#define SYBMSDATE SYBMSDATE
SYBMSTIME = 41, /* 0x29 */
#define SYBMSTIME SYBMSTIME
SYBMSDATETIME2 = 42, /* 0x2A */
#define SYBMSDATETIME2 SYBMSDATETIME2
SYBMSDATETIMEOFFSET = 43, /* 0x2B */
#define SYBMSDATETIMEOFFSET SYBMSDATETIMEOFFSET
};

#define SYBAOPCNT 0x4b
Expand Down Expand Up @@ -247,6 +255,8 @@ typedef unsigned char DBBINARY;
typedef tds_sysdep_real32_type DBREAL;
typedef tds_sysdep_real64_type DBFLT8;
typedef unsigned tds_sysdep_int16_type DBUSMALLINT;
typedef unsigned tds_sysdep_int32_type DBUINT;
typedef unsigned tds_sysdep_int64_type DBUBIGINT;

typedef struct
{
Expand Down Expand Up @@ -292,6 +302,18 @@ typedef struct
DBUSMALLINT minutes; /* minutes since midnight */
} DBDATETIME4;

typedef struct
{
DBUBIGINT time; /**< time, 7 digit precision */
DBINT date; /**< date, 0 = 1900-01-01 */
DBSMALLINT offset; /**< time offset */
DBUSMALLINT time_prec:3;
DBUSMALLINT _res:10;
DBUSMALLINT has_time:1;
DBUSMALLINT has_date:1;
DBUSMALLINT has_offset:1;
} DBDATETIMEALL;

#ifdef MSDBLIB
# define SQLCHAR SYBCHAR
typedef struct
Expand Down

0 comments on commit a35fe7e

Please sign in to comment.