Update of /cvsroot/htoolkit/HSQL/MSI/Database/HSQL
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7000/MSI/Database/HSQL
Modified Files:
MSI.hsc
Log Message:
Another way to handle null values in HSQL. Not tested yet.
Index: MSI.hsc
===================================================================
RCS file: /cvsroot/htoolkit/HSQL/MSI/Database/HSQL/MSI.hsc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** MSI.hsc 17 Jun 2005 14:32:54 -0000 1.3
--- MSI.hsc 12 Dec 2005 15:21:56 -0000 1.4
***************
*** 207,212 ****
return True
! getColValue :: IORef MSIHANDLE -> Int -> FieldDef -> (SqlType -> CString -> Int -> IO (Maybe a)) -> IO (Maybe a)
! getColValue refRecord colNumber (name,sqlType,nullable) f =
allocaBytes col_buffer_size $ \buffer ->
alloca $ \plen -> do
--- 207,212 ----
return True
! getColValue :: IORef MSIHANDLE -> Int -> FieldDef -> (FieldDef -> CString -> Int -> IO a) -> IO a
! getColValue refRecord colNumber fieldDef f =
allocaBytes col_buffer_size $ \buffer ->
alloca $ \plen -> do
***************
*** 215,219 ****
msiRecordGetString hRecord (fromIntegral colNumber+1) buffer plen >>= checkResult
len <- peek plen
! f sqlType buffer (fromIntegral len)
closeStatement :: MSIHANDLE -> IORef MSIHANDLE -> IO ()
--- 215,219 ----
msiRecordGetString hRecord (fromIntegral colNumber+1) buffer plen >>= checkResult
len <- peek plen
! f fieldDef buffer (fromIntegral len)
closeStatement :: MSIHANDLE -> IORef MSIHANDLE -> IO ()
|