txt-sushi-0.3.0: Spreadsheets are databases!

Database.TxtSushi.Transform

Description

Simple table transformations

Synopsis

Documentation

selectColumns :: [Int] -> [[a]] -> [[a]]Source

sortColumns :: Ord a => [Int] -> [[a]] -> [[a]]Source

mergeAllBy :: (a -> a -> Ordering) -> [[a]] -> [a]Source

joinTables :: Ord o => [(Int, Int)] -> [[o]] -> [[o]] -> [[o]]Source

Create a new table by selecting the given columnIndices

sort the given table on the given columns

compare two rows based on given column balues

merge two sorted lists into a single sorted list

merge the sorted lists in the list to a list about 1/2 the size

merge a list of sorted lists into a single sorted list

perform a table sort using files to keep from holding the whole list in memory

unwrap a list of IO boxed items

create a list of parial sorts

buffer the table to a temporary file and return a handle to that file

join together two tables on the given column index pairs

joinPresortedTables :: Ord o => [(Int, Int)] -> [[o]] -> [[o]] -> [[o]]Source

join together two tables that are presorted on the given column index pairs

rowComparison :: Ord a => [Int] -> [a] -> [a] -> OrderingSource