From: <kr_...@us...> - 2006-01-03 21:01:48
|
Update of /cvsroot/htoolkit/HSQL/PostgreSQL/Database/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29943/Database/HSQL Modified Files: PostgreSQL.hsc Log Message: fix PostgreSQL driver Index: PostgreSQL.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/PostgreSQL/Database/HSQL/PostgreSQL.hsc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PostgreSQL.hsc 12 Dec 2005 15:21:56 -0000 1.2 --- PostgreSQL.hsc 3 Jan 2006 21:01:30 -0000 1.3 *************** *** 179,183 **** getFieldValue stmt colNumber fieldDef v = do ! mb_v <- stmtGetCol stmt colNumber fieldDef fromNonNullSqlCStringLen return (case mb_v of { Nothing -> v; Just a -> a }) --- 179,183 ---- getFieldValue stmt colNumber fieldDef v = do ! mb_v <- stmtGetCol stmt colNumber fieldDef fromSqlCStringLen return (case mb_v of { Nothing -> v; Just a -> a }) *************** *** 210,221 **** getColValue :: PGresult -> MVar Int -> Int -> Int -> FieldDef -> (FieldDef -> CString -> Int -> IO a) -> IO a ! getColValue pRes tupleIndex countTuples colNumber (name,sqlType,nullable) f = do index <- readMVar tupleIndex when (index >= countTuples) (throwDyn SqlNoData) isnull <- pqGetisnull pRes index colNumber if isnull == 1 ! then f sqlType nullPtr 0 else do pStr <- pqGetvalue pRes index colNumber strLen <- strlen pStr ! f sqlType pStr strLen --- 210,221 ---- getColValue :: PGresult -> MVar Int -> Int -> Int -> FieldDef -> (FieldDef -> CString -> Int -> IO a) -> IO a ! getColValue pRes tupleIndex countTuples colNumber fieldDef f = do index <- readMVar tupleIndex when (index >= countTuples) (throwDyn SqlNoData) isnull <- pqGetisnull pRes index colNumber if isnull == 1 ! then f fieldDef nullPtr 0 else do pStr <- pqGetvalue pRes index colNumber strLen <- strlen pStr ! f fieldDef pStr strLen |