From: <kr_...@us...> - 2006-01-09 12:25:12
|
Update of /cvsroot/htoolkit/HSQL/HSQL/Database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10797/Database Modified Files: HSQL.hsc Log Message: Rename getColumnValue(') to getFieldValueAt(') Index: HSQL.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/HSQL/Database/HSQL.hsc,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** HSQL.hsc 5 Jan 2006 20:14:23 -0000 1.13 --- HSQL.hsc 9 Jan 2006 12:25:01 -0000 1.14 *************** *** 33,38 **** , getFieldValue -- :: SqlBind a => Statement -> String -> IO a , getFieldValue' -- :: SqlBind a => Statement -> String -> a -> IO a ! , getColumnValue -- :: SqlBind a => Statement -> Int -> IO a ! , getColumnValue' -- :: SqlBind a => Statement -> Int -> a -> IO a , getFieldValueMB , getFieldValueType -- :: Statement -> String -> (SqlType, Bool) --- 33,38 ---- , getFieldValue -- :: SqlBind a => Statement -> String -> IO a , getFieldValue' -- :: SqlBind a => Statement -> String -> a -> IO a ! , getFieldValueAt -- :: SqlBind a => Statement -> Int -> IO a ! , getFieldValueAt' -- :: SqlBind a => Statement -> Int -> a -> IO a , getFieldValueMB , getFieldValueType -- :: Statement -> String -> (SqlType, Bool) *************** *** 624,644 **** return (case mb_v of { Nothing -> def; Just a -> a }) ! -- | Retrieves the value of column with the specified index. ! getColumnValue :: SqlBind a => Statement ! -> Int -- ^ Column index ! -> IO a -- ^ Column value ! getColumnValue stmt index = fieldDef `seq` stmtGetCol stmt index fieldDef fromSqlCStringLen where fieldDef = findColumnInfo (stmtFields stmt) index ! -- | Retrieves the value of column with the specified index. -- If the column value is @null@ then the function will return the default value. ! getColumnValue' :: SqlBind a => Statement ! -> Int -- ^ Column index ! -> a -- ^ Default value ! -> IO a -- ^ Column value ! getColumnValue' stmt index def = do ! mb_v <- getColumnValue stmt index return (case mb_v of { Nothing -> def; Just a -> a }) --- 624,644 ---- return (case mb_v of { Nothing -> def; Just a -> a }) ! -- | Retrieves the value of field with the specified index. ! getFieldValueAt :: SqlBind a => Statement ! -> Int -- ^ Field index ! -> IO a -- ^ Field value ! getFieldValueAt stmt index = fieldDef `seq` stmtGetCol stmt index fieldDef fromSqlCStringLen where fieldDef = findColumnInfo (stmtFields stmt) index ! -- | Retrieves the value of field with the specified index. -- If the column value is @null@ then the function will return the default value. ! getFieldValueAt' :: SqlBind a => Statement ! -> Int -- ^ Field index ! -> a -- ^ Default value ! -> IO a -- ^ Field value ! getFieldValueAt' stmt index def = do ! mb_v <- getFieldValueAt stmt index return (case mb_v of { Nothing -> def; Just a -> a }) |