/[thuban]
ViewVC logotype

Revision 818


Jump to revision: Previous Next
Author: bh
Date: Mon May 5 17:18:31 2003 UTC (21 years, 10 months ago)
Changed paths: 6
Log Message:
Convert the table implementations to a new table interface. All
tables use a common mixin class to provide backwards compatibility
until all table users have been updated.

* Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
provide backwards compatibility for table classes implementing the
new interface
(DBFTable, MemoryTable): Implement the new table interface. Use
OldTableInterfaceMixin as base for compatibility
(DBFColumn, MemoryColumn): New. Column description for DBFTable
and MemoryTable resp.

* test/test_dbf_table.py: New. Test cases for the DBFTable with
the new table interface.

* test/test_memory_table.py: New. Test cases for the MemoryTable
with the new table interface.

* test/test_table.py: Document the all tests in this file as only
for backwards compatibility. The equivalent tests for the new
interface are in test_memory_table.py and test_dbf_table.py
(MemoryTableTest.test_read): field_info should be returning tuples
with four items
(MemoryTableTest.test_write): Make doc-string a more precise.

* Thuban/Model/transientdb.py (TransientTableBase): Convert to new
table interface. Derive from from OldTableInterfaceMixin for
compatibility.
(TransientTableBase.create): New intance variable column_map to
map from names and indices to column objects
(TransientTable.create): Use the new table interface of the input
table
(AutoTransientTable): Convert to new table interface. Derive from
from OldTableInterfaceMixin for compatibility.
(AutoTransientTable.write_record): Removed. It's not implemented
yet and we still have to decide how to handle writing with the new
table and data framework.

* test/test_transientdb.py
(TestTransientTable.run_iceland_political_tests)
(TestTransientTable.test_transient_joined_table): Use the new
table interface


Changed paths

Path Details
Directorytrunk/thuban/Thuban/Model/table.py modified , text changed
Directorytrunk/thuban/Thuban/Model/transientdb.py modified , text changed
Directorytrunk/thuban/test/test_dbf_table.py added
Directorytrunk/thuban/test/test_memory_table.py added
Directorytrunk/thuban/test/test_table.py modified , text changed
Directorytrunk/thuban/test/test_transientdb.py modified , text changed

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26