Changeset combined,2.1.1 for combined/src/odbc/odbc-ff-interface.lisp
- Timestamp:
- 11/28/2007 03:49:48 AM (19 years ago)
- branch-nick:
- 64-bit
- revision id:
- dsowen@tux-20071128034948-of18hhgvistm196l
- File:
-
- 1 edited
-
combined/src/odbc/odbc-ff-interface.lisp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
combined/src/odbc/odbc-ff-interface.lisp
r1 r2.1.1 31 31 32 32 33 (defcfun "SQLAllocEnv" retcode (penv *sql-handle)) 34 35 (defcfun "SQLAllocConnect" retcode 36 (henv sql-handle) ; HENV henv 37 (*phdbc *sql-handle)) ; HDBC FAR *phdbc 38 39 (defcfun "SQLConnect" retcode 40 (hdbc sql-handle) ; HDBC hdbc 41 (*szDSN string-ptr) ; UCHAR FAR *szDSN 42 (cbDSN :short) ; SWORD cbDSN 43 (*szUID string-ptr) ; UCHAR FAR *szUID 44 (cbUID :short) ; SWORD cbUID 45 (*szAuthStr string-ptr) ; UCHAR FAR *szAuthStr 46 (cbAuthStr :short) ; SWORD cbAuthStr 47 ) 33 ;;;; dso- 34 35 (defctype sql-small-int :int16) 36 (defctype sql-u-small-int :uint16) 37 (defctype sql-integer :int32) 38 (defctype sql-u-integer :uint32) 39 (defctype sql-pointer :pointer) 40 (defctype sql-len sql-integer) 41 (defctype sql-u-len sql-u-integer) 42 (defctype sql-return sql-small-int) 43 44 (defctype *sql-small-int :pointer) 45 (defctype *sql-integer :pointer) 46 (defctype *sql-len :pointer) 47 (defctype *sql-u-len :pointer) 48 49 (defctype sql-handle :pointer) 50 (defctype sql-h-env sql-handle) 51 (defctype sql-h-dbc sql-handle) 52 (defctype sql-h-stmt sql-handle) 53 (defctype sql-h-wnd :pointer) 54 55 (defctype *sql-h-env :pointer) 56 (defctype *sql-h-dbc :pointer) 57 (defctype *sql-h-stmt :pointer) 58 59 (defmacro defsqlfun (name (&rest args)) 60 `(defcfun ,name sql-return ,@args)) 61 62 ;;;; -dso 63 64 65 66 (defsqlfun "SQLAllocEnv" 67 ((penv *sql-h-env))) 68 69 (defsqlfun "SQLAllocConnect" 70 ((henv sql-h-env) ; HENV henv 71 (*phdbc *sql-h-dbc))) ; HDBC FAR *phdbc 72 73 (defsqlfun "SQLDriverConnect" 74 ((hdbc sql-h-dbc) ; HDBC hdbc 75 (hwnd sql-h-wnd) ; SQLHWND hwnd 76 ;(*szConnStrIn string-ptr) ; UCHAR FAR *szConnStrIn 77 (*szConnStrIn string-ptr) ; UCHAR FAR *szConnStrIn 78 (cbConnStrIn sql-small-int) ; SWORD cbConnStrIn 79 ;(*szConnStrOut string-ptr) ; UCHAR FAR *szConnStrOut 80 (*szConnStrOut string-ptr) ; UCHAR FAR *szConnStrOut 81 (cbConnStrOutMax sql-small-int) ; SWORD cbConnStrOutMaxw 82 (*pcbConnStrOut *sql-small-int) ; SWORD FAR *pcbConnStrOut 83 (fDriverCompletion :unsigned-short))) ; UWORD fDriverCompletion 84 85 (defsqlfun "SQLDisconnect" 86 ((hdbc sql-h-dbc))) ; HDBC hdbc 87 88 (defsqlfun "SQLAllocStmt" 89 ((hdbc sql-h-dbc) ; HDBC hdbc 90 (*phstmt *sql-h-stmt))) ; HSTMT FAR *phstmt 91 92 93 94 (defsqlfun "SQLGetInfo" 95 ((hdbc sql-h-dbc) ; HDBC hdbc 96 (fInfoType sql-u-small-int) ; UWORD fInfoType 97 (rgbInfoValue sql-pointer) ; PTR rgbInfoValue 98 (cbInfoValueMax sql-small-int) ; SWORD cbInfoValueMax 99 (*pcbInfoValue *sql-small-int))) ; SWORD FAR *pcbInfoValue 100 101 102 (defsqlfun ("SQLGetInfo" SQLGetInfo-Str) 103 ((hdbc sql-h-dbc) ; HDBC hdbc 104 (fInfoType sql-u-small-int) ; UWORD fInfoType 105 (rgbInfoValue string-ptr) ; PTR rgbInfoValue 106 (cbInfoValueMax sql-small-int) ; SWORD cbInfoValueMax 107 (*pcbInfoValue *sql-small-int))) ; SWORD FAR *pcbInfoValue 108 109 110 (defsqlfun "SQLPrepare" 111 ((hstmt sql-h-stmt) ; HSTMT hstmt 112 (*szSqlStr string-ptr) ; UCHAR FAR *szSqlStr 113 (cbSqlStr sql-integer))) ; SDWORD cbSqlStr 114 115 116 117 (defsqlfun "SQLExecute" 118 ((hstmt sql-h-stmt))) ; HSTMT hstmt 119 120 121 (defsqlfun "SQLExecDirect" 122 ((hstmt sql-h-stmt) ; HSTMT hstmt 123 (*szSqlStr string-ptr) ; UCHAR FAR *szSqlStr 124 (cbSqlStr sql-integer))) ; SDWORD cbSqlStr 125 126 127 128 (defsqlfun "SQLFreeStmt" 129 ((hstmt sql-h-stmt) ; HSTMT hstmt 130 (fOption sql-u-small-int))) ; UWORD fOption 131 132 133 134 (defsqlfun "SQLError" 135 ((henv sql-h-env) ; HENV henv 136 (hdbc sql-h-dbc) ; HDBC hdbc 137 (hstmt sql-h-stmt) ; HSTMT hstmt 138 ; (*szSqlState string-ptr) ; UCHAR FAR *szSqlState 139 (*szSqlState string-ptr) ; UCHAR FAR *szSqlState 140 (*pfNativeError *sql-integer) ; SDWORD FAR *pfNativeError 141 ; (*szErrorMsg string-ptr) ; UCHAR FAR *szErrorMsg 142 (*szErrorMsg string-ptr) ; UCHAR FAR *szErrorMsg 143 (cbErrorMsgMax sql-small-int) ; SWORD cbErrorMsgMax 144 (*pcbErrorMsg *sql-small-int))) ; SWORD FAR *pcbErrorMsg 145 146 147 148 (defsqlfun "SQLNumResultCols" 149 ((hstmt sql-h-stmt) ; HSTMT hstmt 150 (*pccol *sql-small-int))) ; SWORD FAR *pccol 151 152 153 (defsqlfun "SQLRowCount" 154 ((hstmt sql-h-stmt) ; HSTMT hstmt 155 (*pcrow *sql-len))) ; SDWORD FAR *pcrow 156 157 158 (defsqlfun "SQLDescribeCol" 159 ((hstmt sql-h-stmt) ; HSTMT hstmt 160 (icol sql-u-small-int) ; UWORD icol 161 (*szColName string-ptr) ; UCHAR FAR *szColName 162 (cbColNameMax sql-small-int) ; SWORD cbColNameMax 163 (*pcbColName *sql-small-int) ; SWORD FAR *pcbColName 164 (*pfSqlType *sql-small-int) ; SWORD FAR *pfSqlType 165 (*pcbColDef *sql-u-len) ; UDWORD FAR *pcbColDef 166 (*pibScale *sql-small-int) ; SWORD FAR *pibScale 167 (*pfNullable *sql-small-int))) ; SWORD FAR *pfNullable 168 169 170 (defsqlfun "SQLBindCol" 171 ((hstmt sql-h-stmt) ; HSTMT hstmt 172 (icol sql-u-small-int) ; UWORD icol 173 (fCType sql-small-int) ; SWORD fCType 174 (rgbValue sql-pointer) ; PTR rgbValue 175 (cbValueMax sql-len) ; SDWORD cbValueMax 176 (*pcbValue *sql-len))) ; SDWORD FAR *pcbValue 177 48 178 49 (defcfun "SQLDriverConnect" retcode 50 (hdbc sql-handle) ; HDBC hdbc 51 (hwnd sql-handle) ; SQLHWND hwnd 52 ;(*szConnStrIn string-ptr) ; UCHAR FAR *szConnStrIn 53 (*szConnStrIn string-ptr) ; UCHAR FAR *szConnStrIn 54 (cbConnStrIn :short) ; SWORD cbConnStrIn 55 ;(*szConnStrOut string-ptr) ; UCHAR FAR *szConnStrOut 56 (*szConnStrOut string-ptr) ; UCHAR FAR *szConnStrOut 57 (cbConnStrOutMax :short) ; SWORD cbConnStrOutMaxw 58 (*pcbConnStrOut *short) ; SWORD FAR *pcbConnStrOut 59 (fDriverCompletion :unsigned-short) ; UWORD fDriverCompletion 60 ) 61 62 (defcfun "SQLDisconnect" retcode 63 (hdbc sql-handle)) ; HDBC hdbc 64 65 (defcfun "SQLAllocStmt" retcode 66 (hdbc sql-handle) ; HDBC hdbc 67 (*phstmt *sql-handle)) ; HSTMT FAR *phstmt 68 69 70 71 (defcfun "SQLGetInfo" retcode 72 (hdbc sql-handle) ; HDBC hdbc 73 (fInfoType :short) ; UWORD fInfoType 74 (rgbInfoValue :pointer) ; PTR rgbInfoValue 75 (cbInfoValueMax :short) ; SWORD cbInfoValueMax 76 (*pcbInfoValue :pointer) ; SWORD FAR *pcbInfoValue 77 ) 78 79 (defcfun ("SQLGetInfo" SQLGetInfo-Str) retcode 80 (hdbc sql-handle) ; HDBC hdbc 81 (fInfoType :short) ; UWORD fInfoType 82 (rgbInfoValue string-ptr) ; PTR rgbInfoValue 83 (cbInfoValueMax :short) ; SWORD cbInfoValueMax 84 (*pcbInfoValue :pointer) ; SWORD FAR *pcbInfoValue 85 ) 86 87 88 (defcfun "SQLPrepare" retcode 89 (hstmt sql-handle) ; HSTMT hstmt 90 (*szSqlStr string-ptr) ; UCHAR FAR *szSqlStr 91 (cbSqlStr :long) ; SDWORD cbSqlStr 92 ) 93 94 95 (defcfun "SQLExecute" retcode 96 (hstmt sql-handle) ; HSTMT hstmt 97 ) 98 99 100 (defcfun "SQLExecDirect" retcode 101 (hstmt sql-handle) ; HSTMT hstmt 102 (*szSqlStr string-ptr) ; UCHAR FAR *szSqlStr 103 (cbSqlStr :long) ; SDWORD cbSqlStr 104 ) 105 106 107 (defcfun "SQLFreeStmt" retcode 108 (hstmt sql-handle) ; HSTMT hstmt 109 (fOption :short)) ; UWORD fOption 110 111 112 (defcfun "SQLCancel" retcode 113 (hstmt sql-handle) ; HSTMT hstmt 114 ) 115 116 117 (defcfun "SQLError" retcode 118 (henv sql-handle) ; HENV henv 119 (hdbc sql-handle) ; HDBC hdbc 120 (hstmt sql-handle) ; HSTMT hstmt 121 ; (*szSqlState string-ptr) ; UCHAR FAR *szSqlState 122 (*szSqlState string-ptr) ; UCHAR FAR *szSqlState 123 (*pfNativeError *SDWORD) ; SDWORD FAR *pfNativeError 124 ; (*szErrorMsg string-ptr) ; UCHAR FAR *szErrorMsg 125 (*szErrorMsg string-ptr) ; UCHAR FAR *szErrorMsg 126 (cbErrorMsgMax :short) ; SWORD cbErrorMsgMax 127 (*pcbErrorMsg *short)) ; SWORD FAR *pcbErrorMsg 128 129 130 131 (defcfun "SQLNumResultCols" retcode 132 (hstmt sql-handle) ; HSTMT hstmt 133 (*pccol :pointer) ; SWORD FAR *pccol 134 ) 135 136 137 (defcfun "SQLRowCount" retcode 138 (hstmt sql-handle) ; HSTMT hstmt 139 (*pcrow *sdword) ; SDWORD FAR *pcrow 140 ) 141 142 143 (defcfun "SQLDescribeCol" retcode 144 (hstmt sql-handle) ; HSTMT hstmt 145 (icol :short) ; UWORD icol 146 (*szColName string-ptr) ; UCHAR FAR *szColName 147 (cbColNameMax :short) ; SWORD cbColNameMax 148 (*pcbColName *short) ; SWORD FAR *pcbColName 149 (*pfSqlType *short) ; SWORD FAR *pfSqlType 150 (*pcbColDef *ulong) ; UDWORD FAR *pcbColDef 151 (*pibScale *short) ; SWORD FAR *pibScale 152 (*pfNullable *short) ; SWORD FAR *pfNullable 153 ) 154 155 156 (defcfun "SQLColAttributes" retcode 157 (hstmt sql-handle) ; HSTMT hstmt 158 (icol :short) ; UWORD icol 159 (fDescType :short) ; UWORD fDescType 160 (rgbDesc :pointer) ; PTR rgbDesc 161 (cbDescMax :short) ; SWORD cbDescMax 162 (*pcbDesc *sword) ; SWORD FAR *pcbDesc 163 (*pfDesc *sdword) ; SDWORD FAR *pfDesc 164 ) 165 166 167 (defcfun "SQLColumns" retcode 168 (hstmt sql-handle) ; HSTMT hstmt 169 (*szTableQualifier string-ptr) ; UCHAR FAR *szTableQualifier 170 (cbTableQualifier :short) ; SWORD cbTableQualifier 171 (*szTableOwner string-ptr) ; UCHAR FAR *szTableOwner 172 (cbTableOwner :short) ; SWORD cbTableOwner 173 (*szTableName string-ptr) ; UCHAR FAR *szTableName 174 (cbTableName :short) ; SWORD cbTableName 175 (*szColumnName string-ptr) ; UCHAR FAR *szColumnName 176 (cbColumnName :short) ; SWORD cbColumnName 177 ) 178 179 180 (defcfun "SQLBindCol" retcode 181 (hstmt sql-handle) ; HSTMT hstmt 182 (icol :short) ; UWORD icol 183 (fCType :short) ; SWORD fCType 184 (rgbValue :pointer) ; PTR rgbValue 185 (cbValueMax :long) ; SDWORD cbValueMax 186 (*pcbValue *sdword) ; SDWORD FAR *pcbValue 187 ) 188 189 190 (defcfun "SQLFetch" retcode 191 (hstmt sql-handle) ; HSTMT hstmt 192 ) 193 194 195 (defcfun "SQLTransact" retcode 196 (henv sql-handle) ; HENV henv 197 (hdbc sql-handle) ; HDBC hdbc 198 (fType :short) ; UWORD fType ($SQL_COMMIT or $SQL_ROLLBACK) 199 ) 200 201 202 ;; ODBC 2.0 203 (defcfun "SQLDescribeParam" retcode 204 (hstmt sql-handle) ; HSTMT hstmt 205 (ipar :short) ; UWORD ipar 206 (*pfSqlType *sword) ; SWORD FAR *pfSqlType 207 (*pcbColDef *ulong) ; UDWORD FAR *pcbColDef 208 (*pibScale *sword) ; SWORD FAR *pibScale 209 (*pfNullable *sword) ; SWORD FAR *pfNullable 210 ) 211 212 213 ;; ODBC 2.0 214 (defcfun "SQLBindParameter" retcode 215 (hstmt sql-handle) ; HSTMT hstmt 216 (ipar :short) ; UWORD ipar 217 (fParamType :short) ; SWORD fParamType 218 (fCType :short) ; SWORD fCType 219 (fSqlType :short) ; SWORD fSqlType 220 (cbColDef :ulong) ; UDWORD cbColDef 221 (ibScale :short) ; SWORD ibScale 222 (rgbValue :pointer) ; PTR rgbValue 223 (cbValueMax :long) ; SDWORD cbValueMax 224 (*pcbValue *sdword) ; SDWORD FAR *pcbValue 225 ) 226 227 228 ;; level 1 229 (defcfun "SQLGetData" retcode 230 (hstmt sql-handle) ; HSTMT hstmt 231 (icol :short) ; UWORD icol 232 (fCType :short) ; SWORD fCType 233 (rgbValue :pointer) ; PTR rgbValue 234 (cbValueMax :long) ; SDWORD cbValueMax 235 (*pcbValue *sdword) ; SDWORD FAR *pcbValue 236 ) 237 238 239 (defcfun "SQLParamData" retcode 240 (hstmt sql-handle) ; HSTMT hstmt 241 (*prgbValue :pointer) ; PTR FAR *prgbValue 242 ) 243 244 245 (defcfun "SQLPutData" retcode 246 (hstmt sql-handle) ; HSTMT hstmt 247 (rgbValue :pointer) ; PTR rgbValue 248 (cbValue :long) ; SDWORD cbValue 249 ) 250 251 252 (defcfun "SQLGetConnectOption" retcode 253 (hdbc sql-handle) ; HDBC hdbc 254 (fOption :short) ; UWORD fOption 255 (pvParam :pointer) ; PTR pvParam 256 ) 257 258 259 (defcfun "SQLSetConnectOption" retcode 260 (hdbc sql-handle) ; HDBC hdbc 261 (fOption :short) ; UWORD fOption 262 (vParam :ulong) ; UDWORD vParam 263 ) 179 (defsqlfun "SQLFetch" 180 ((hstmt sql-h-stmt))) ; HSTMT hstmt 181 182 183 (defsqlfun "SQLTransact" 184 ((henv sql-h-env) ; HENV henv 185 (hdbc sql-h-dbc) ; HDBC hdbc 186 (fType sql-u-small-int))) ; UWORD fType ($SQL_COMMIT or $SQL_ROLLBACK) 187 188 189 ;; ODBC 2.0 190 (defsqlfun "SQLBindParameter" 191 ((hstmt sql-h-stmt) ; HSTMT hstmt 192 (ipar sql-u-small-int) ; UWORD ipar 193 (fParamType sql-small-int) ; SWORD fParamType 194 (fCType sql-small-int) ; SWORD fCType 195 (fSqlType sql-small-int) ; SWORD fSqlType 196 (cbColDef sql-u-len) ; UDWORD cbColDef 197 (ibScale sql-small-int) ; SWORD ibScale 198 (rgbValue sql-pointer) ; PTR rgbValue 199 (cbValueMax sql-len) ; SDWORD cbValueMax 200 (*pcbValue *sql-len))) ; SDWORD FAR *pcbValue 201 202 203 ;; level 1 204 (defsqlfun "SQLGetData" 205 ((hstmt sql-h-stmt) ; HSTMT hstmt 206 (icol sql-u-small-int) ; UWORD icol 207 (fCType sql-small-int) ; SWORD fCType 208 (rgbValue sql-pointer) ; PTR rgbValue 209 (cbValueMax sql-len) ; SDWORD cbValueMax 210 (*pcbValue *sql-len))) ; SDWORD FAR *pcbValue 211 212 213 (defsqlfun "SQLParamData" 214 ((hstmt sql-h-stmt) ; HSTMT hstmt 215 (*prgbValue sql-pointer))) ; PTR FAR *prgbValue 216 217 218 (defsqlfun "SQLPutData" 219 ((hstmt sql-h-stmt) ; HSTMT hstmt 220 (rgbValue sql-pointer) ; PTR rgbValue 221 (cbValue sql-len))) ; SDWORD cbValue 222 223 224 (defsqlfun "SQLSetConnectOption" 225 ((hdbc sql-h-dbc) ; HDBC hdbc 226 (fOption sql-u-small-int) ; UWORD fOption 227 (vParam sql-u-len))) ; UDWORD vParam 264 228 265 229 … … 277 241 ; driver-specific value, the value in ValuePtr may be a signed integer. 278 242 279 (defcfun ("SQLSetConnectAttr" SQLSetConnectAttr_long) retcode 280 (hdbc sql-handle) ; HDBC hdbc 281 (fOption :short) ; UWORD fOption 282 (pvParam :long) ; UDWORD vParam 283 (stringlength :long) 284 ) 285 286 287 (defcfun ("SQLSetConnectAttr" SQLSetConnectAttr_string) retcode 288 (hdbc sql-handle) ; HDBC hdbc 289 (fOption :short) ; UWORD fOption 290 (pvParam string-ptr) ; UDWORD vParam 291 (stringlength :long) 292 ) 293 294 295 296 (defcfun "SQLSetPos" retcode 297 (hstmt sql-handle) ; HSTMT hstmt 298 (irow :short) ; UWORD irow 299 (fOption :short) ; UWORD fOption 300 (fLock :short) ; UWORD fLock 301 ) 302 303 304 ; level 2 305 (defcfun "SQLExtendedFetch" retcode 306 (hstmt sql-handle) ; HSTMT hstmt 307 (fFetchType :short) ; UWORD fFetchType 308 (irow :long) ; SDWORD irow 309 (*pcrow :pointer) ; UDWORD FAR *pcrow 310 (*rgfRowStatus :pointer) ; UWORD FAR *rgfRowStatus 311 ) 312 313 (defcfun "SQLDataSources" retcode 314 (henv sql-handle) ; HENV henv 315 (fDirection :short) 316 (*szDSN string-ptr) ; UCHAR FAR *szDSN 317 (cbDSNMax :short) ; SWORD cbDSNMax 318 (*pcbDSN *sword) ; SWORD *pcbDSN 319 (*szDescription string-ptr) ; UCHAR *szDescription 320 (cbDescriptionMax :short) ; SWORD cbDescriptionMax 321 (*pcbDescription *sword) ; SWORD *pcbDescription 322 ) 323 324 325 (defcfun "SQLFreeEnv" retcode 326 (henv sql-handle) ; HSTMT hstmt 327 ) 328 329 330 (defcfun "SQLMoreResults" retcode 331 (hstmt sql-handle)) 243 (defsqlfun ("SQLSetConnectAttr" SQLSetConnectAttr_long) 244 ((hdbc sql-h-dbc) ; HDBC hdbc 245 ;; TODO: The new def of fOption doesn't seem compatible with the 246 ;; original, but matches my headers. 247 (fOption sql-integer) ; UWORD fOption 248 (pvParam sql-integer) ; UDWORD vParam 249 (stringlength sql-integer))) 250 251 252 (defsqlfun ("SQLSetConnectAttr" SQLSetConnectAttr_string) 253 ((hdbc sql-handle) ; HDBC hdbc 254 (fOption sql-integer) ; UWORD fOption 255 (pvParam string-ptr) ; UDWORD vParam 256 (stringlength sql-integer))) 257 258 259 ;; level 2 260 (defsqlfun "SQLMoreResults" 261 ((hstmt sql-h-stmt))) 332 262 333 263 334 264 ;;; foreign type definitions 335 265 336 (defcstruct sql-c-time ""337 (hour :short)338 (minute :short)339 (second :short))340 341 (defcstruct sql-c-date ""342 (year :short)343 (month :short)344 (day :short))345 346 (defcstruct sql-c-timestamp ""347 (year :short)348 (month :short)349 (day :short)350 (hour :short)351 (minute :short)352 (second :short)353 (fraction :long))266 (defcstruct sql-c-time "" 267 (hour sql-u-small-int) 268 (minute sql-u-small-int) 269 (second sql-u-small-int)) 270 271 (defcstruct sql-c-date "" 272 (year sql-small-int) 273 (month sql-u-small-int) 274 (day sql-u-small-int)) 275 276 (defcstruct sql-c-timestamp "" 277 (year sql-small-int) 278 (month sql-u-small-int) 279 (day sql-u-small-int) 280 (hour sql-u-small-int) 281 (minute sql-u-small-int) 282 (second sql-u-small-int) 283 (fraction sql-u-integer)) 354 284 355 285 (defun %put-sql-c-date (adr %year %month %day) … … 358 288 (setf (foreign-slot-value adr 'sql-c-date 'day) %day)) 359 289 360 361 (defun %put-sql-c-timestamp (adr %year %month %day %hour %minute %second %fraction) 290 291 (defun %put-sql-c-timestamp (adr %year %month %day %hour %minute %second 292 %fraction) 362 293 (setf (foreign-slot-value adr 'sql-c-timestamp 'second) %second) 363 294 (setf (foreign-slot-value adr 'sql-c-timestamp 'minute) %minute) … … 366 297 (setf (foreign-slot-value adr 'sql-c-timestamp 'month) %month) 367 298 (setf (foreign-slot-value adr 'sql-c-timestamp 'year) %year) 368 (setf (foreign-slot-value adr 'sql-c-timestamp 'fraction) %fraction) 369 ) 299 (setf (foreign-slot-value adr 'sql-c-timestamp 'fraction) %fraction)) 370 300 371 301 (defun timestamp-to-universal-time (adr) 372 (with-foreign-slots 302 (with-foreign-slots 373 303 ((year month day hour minute second fraction) adr sql-c-timestamp) 374 304 (values … … 379 309 day 380 310 month 381 year )311 year) 382 312 fraction))) 383 313 384 314 385 315 (defun date-to-universal-time (adr) 386 (with-foreign-slots 316 (with-foreign-slots 387 317 ((year month day) adr sql-c-date) 388 318 (encode-universal-time 389 0 0 0390 day391 month392 year)))393 394 395 (defmacro %sql-len-data-at-exec (length) 319 0 0 0 320 day 321 month 322 year))) 323 324 325 (defmacro %sql-len-data-at-exec (length) 396 326 `(- $SQL_LEN_DATA_AT_EXEC_OFFSET ,length))
Note: See TracChangeset
for help on using the changeset viewer.
