DumpTruck.execute
can return a generator or a list; previously, it only
returned a list.
DumpTruck.{get,save}_var
uses less of a hack for the table that it creates and deletes.
Make Pickle
work properly.
Allow very long numbers to be inserted.
DumpTruck.create_index
adds a NOT NULL
constraint on the column if a unique
index is created.
Added DumpTruck.rollback
for rolling back transactions
Change how dumptruck variables work. This may cause incompatibilties with databases created with an older version of dumptruck.
Allow dumptruck to be install on a system that does not already have lxml.
Handles lxml strings correctly.
Set author correctly.
Add upsert command (Dragon).
A connection can now be made without the adapters and converters by setting the
adapt_and_convert
flag.
But this adapt_and_convert
thing is sort of broken; if you open multiple
dumptruck instances within the same session, the first setting will be used.
This is because the setting is made on the sqlite3
module, which is cached,
and we haven't figured out how to ignore the cache.
We also switched to MIT license.
Fix a bug with save_var.
Speed up insertions of large numbers of rows.
Make dumptruck leaner by removing demjson dependency.
Fix dependency crap.
I decided that database column case-insensitivity did not need to extend into
Python, so dicti
has been removed, and things have been adjusted accordingly.
DumpTruck.execute
now returns a collections.OrderedDict
for each row rather
than a dict
for each row. Also, order is respected on insert, so you can pass
OrderedDicts to DumpTruck.insert
or DumpTruck.create_table
to specify
column order.
Previously, indices were created with
DumpTruck.create_index(table_name, column_names)
This order was chosen to match SQL syntax. It has been changed to
DumpTruck.create_index(column_names, table_name)
to match the syntax for DumpTruck.insert
.
Null value handling has been documented and tweaked.
dt.insert
returns the
the rowid
of the last row inserted row of the last row being inserted.
These webpages were helpful.
I added support for unicode table names.
DumpTruck.execute
returns data as lists of dictis
instead of dicts.
I fixed a few bugs that I noticed while scraping notices on wetland projects
Data can be inserted and retrieved as dictionaries and lists of dictionaries.
The following column types are supported in special ways.
Python type | SQLite type |
---|---|
unicode | text |
str | text |
int | integer |
long | integer |
bool | boolean |
float | real |
datetime.date | date |
datetime.datetime | datetime |
dict | json text |
list | json text |
set | jsonset text |
Indices can be created by passing a list instead of an SQL statement.
Individual variables can be saved in a variables table.
The convenience methods .tables
, .dump
and .drop
are provided for common SQL commands.