queryPackages :: FilePath -> String -> IO [(String, String)]
queryPackages db term =
  do conn <- connectSqlite3 db
     rows <- quickQuery conn "SELECT * FROM packages WHERE name LIKE ?" [toSql $ '%':term++"%"]
     return $ map (\[n,m] -> (fromSql n :: String, fromSql m :: String)) rows


{-| List packages using Cabal and parse the result to (name, meta) -}
queryPackages :: FilePath -> String -> IO [(String, String)]
queryPackages db term =
  do conn <- connectSqlite3 db
     rows <- quickQuery conn "SELECT * FROM packages WHERE name LIKE ?" [toSql $ '%':term++"%"]
     return $ map (\[n,m] -> (fromSql n :: String, fromSql m :: String)) rows


{-| List packages using Cabal and parse the result to (name, meta) -}
queryPackages db term =
  do conn <- connectSqlite3 db
     rows <- quickQuery conn "SELECT * FROM packages WHERE name LIKE ?" [toSql $ '%':term++"%"]
     return $ map (\[n,m] -> (fromSql n :: String, fromSql m :: String)) rows


{-| List packages using Cabal and parse the result to (name, meta) -}