-------------
- Modified __getitem__ so that retrievals of slices return new Tables
instead of just lists of objects (essentially adding sliced indexing
as another chained accessor).
- Added count_fn to the dump_counts method of PivotTable, so that a
summarizing function other than mere counting can be used for each cell
in the pivot table. Here is an example of summarizing population by
state and elevation, where each record has attributes state, elevation
(reduced to nearest 1000'), and population:
piv = places.pivot('state elevation')
piv.dump_counts(count_fn=lambda recs:sum(r.population for r in recs))
- Added sort(), initial version contributed by Adam Sah. sort will take
a key function, or a string containing comma-separated attribute names.
Attributes can be qualified with "desc" to indicated sort to be done
in descending order.
- Modified insert() and compute() to return self, for chaining support.
- Renamed maxrecs parameters to 'limit', to be more similar to the same
concept in SQL.
- Merged query and where into a single consolidated function named 'where'
for selecting matching records from a table.
- Add union function to add records of two tables. '+' between two tables
will perform union; '+' between join terms, or a table and a join term,
will perform join. Returns a new Table.
- join() verifies that all named attributes exist in one of the source
tables
- join() will automatically create indexes for join columns if indexes
do not already exist