/[thuban]
ViewVC logotype

Revision 765


Jump to revision: Previous Next
Author: bh
Date: Tue Apr 29 12:42:14 2003 UTC (21 years, 10 months ago)
Changed paths: 7
Log Message:
Next step of table implementation. Introduce a transient database
using SQLite that some of the data is copied to on demand. This
allows us to do joins and other operations that require an index
for good performance with reasonable efficiency. Thuban now needs
SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
haven't tested that.

* Thuban/Model/transientdb.py: New. Transient database
implementation.

* test/test_transientdb.py: New. Tests for the transient DB
classes.

* Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
classes to help automatically remove temporary files and
directories.
(Session.__init__): New instance variables temp_dir for the
temporary directory and transient_db for the SQLite database
(Session.temp_directory): New. Create a temporary directory if not
yet done and return its name. Use AutoRemoveDir to have it
automatically deleted
(Session.TransientDB): Instantiate the transient database if not
done yet and return it.

* Thuban/Model/data.py (ShapefileStore.__init__): Use an
AutoTransientTable so that data is copied to the transient DB on
demand.
(SimpleStore): New class that simply combines a table and a
shapefile

* Thuban/Model/table.py (Table, DBFTable): Rename Table into
DBFTable and update its doc-string to reflect the fact that this
is only the table interface to a DBF file. Table is now an alias
for DBFTable for temporary backwards compatibility.

* Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
the last reference to the session goes away so that the temporary
files are removed properly.

* test/test_load.py (LoadSessionTest.tearDown): Remove the
reference to the session to make sure the temporary files are
removed.


Changed paths

Path Details
Directorytrunk/thuban/Thuban/Model/data.py modified , text changed
Directorytrunk/thuban/Thuban/Model/session.py modified , text changed
Directorytrunk/thuban/Thuban/Model/table.py modified , text changed
Directorytrunk/thuban/Thuban/Model/transientdb.py added
Directorytrunk/thuban/Thuban/UI/application.py modified , text changed
Directorytrunk/thuban/test/test_load.py modified , text changed
Directorytrunk/thuban/test/test_transientdb.py added

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26