From: <kr_...@us...> - 2005-12-12 15:22:07
|
Update of /cvsroot/htoolkit/HSQL/Oracle/Database/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7000/Oracle/Database/HSQL Modified Files: Oracle.hsc Log Message: Another way to handle null values in HSQL. Not tested yet. Index: Oracle.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/Oracle/Database/HSQL/Oracle.hsc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Oracle.hsc 29 Oct 2005 12:16:38 -0000 1.4 --- Oracle.hsc 12 Dec 2005 15:21:56 -0000 1.5 *************** *** 260,267 **** return (res /= (#const OCI_NO_DATA)) ! getColValue :: Ptr () -> Int -> FieldDef -> (SqlType -> CString -> Int -> IO (Maybe a)) -> IO (Maybe a) ! getColValue buffer colNumber (name,sqlType,nullable) f = do (offset :: CInt) <- peek (castPtr buffer `advancePtr` colNumber) let valuePtr = castPtr buffer `plusPtr` fromIntegral offset valueLen <- strlen valuePtr ! f sqlType valuePtr (fromIntegral valueLen) --- 260,267 ---- return (res /= (#const OCI_NO_DATA)) ! getColValue :: Ptr () -> Int -> FieldDef -> (FieldDef -> CString -> Int -> IO a) -> IO a ! getColValue buffer colNumber fieldDef f = do (offset :: CInt) <- peek (castPtr buffer `advancePtr` colNumber) let valuePtr = castPtr buffer `plusPtr` fromIntegral offset valueLen <- strlen valuePtr ! f fieldDef valuePtr (fromIntegral valueLen) |