Commit Graph
341 Commits
Author SHA1 Message Date
xrotwang 0b76c3fadb fixed problems reported by flake8 2014-07-25 12:46:55 +02:00
xrotwang a14f0bbde2 ported freezing as csv to python 3.4 2014-07-25 12:15:08 +02:00
Victor Kashirin 38b1114bde Add support for with statement 2014-06-09 01:36:42 +04:00
Friedrich Lindenberg f5535fa085 Handle NULL dates, fixes #91. 2014-05-14 14:39:13 +02:00
Friedrich Lindenberg fcbaf977c0 Fix flake. 2014-05-12 19:44:15 +02:00
Friedrich Lindenberg d56b767479 Implement support for handling file objects as
input to the freeze function, fixes #79.
2014-05-12 19:35:44 +02:00
Friedrich Lindenberg 9c32d18607 fix flake8 errors 2014-04-20 14:07:13 +02:00
John Lee 798e92e472 Fix find order_by bug for descending order 2014-03-07 17:07:38 -08:00
Friedrich Lindenberg e7d317b38b Flakes are gone 2014-02-18 13:08:06 +01:00
Friedrich Lindenberg 5e90421e2d Fix Python3 support 2014-02-18 13:03:19 +01:00
Friedrich Lindenberg 6ef4cd7814 Revert to using OrderedDict. 2014-02-18 12:59:12 +01:00
Stefan Wehrmeyer ea31943e18 Fix too early StopIteration on empty result sets
Fixes #77, thanks to @hfaran for report
2014-02-16 13:48:56 +01:00
Friedrich Lindenberg a797e90357 Don't try to execute DDL in a transactional context. 2014-02-12 13:52:59 +01:00
Chen Liu 03cb294e34 fix rows to rows.rowcount 2014-02-04 09:23:49 +01:00
Chen Liu 5b162feea7 add __repr__ method to Table 2014-02-04 09:23:42 +01:00
Chen Liu 682b90cb6e let table.delete return true/false 2014-02-04 09:23:34 +01:00
Stefan Wehrmeyer 77025cede2 Accept engine_kwargs kwarg in connect call 2014-01-31 22:21:24 +01:00
Stefan Wehrmeyer cd1d3a1d67 Remove documentation on old __getattr__ API 2014-01-31 22:10:17 +01:00
Stefan Wehrmeyer 3fd1c1185a Pass in create_engine kwargs through database constructor 2014-01-31 22:03:34 +01:00
Stefan Wehrmeyer ed007bf4be Reduce default String length of pk to 255 2014-01-31 21:11:12 +01:00
Stefan Wehrmeyer 5f2c0193b8 Make print a function in documentation 2014-01-31 20:42:26 +01:00
Stefan Wehrmeyer 8f4cd59c9a Treat columns as ordered throughout code
The set() does not make anything any easier,
lists are closer to underlying representation.
2014-01-31 20:42:04 +01:00
Stefan Wehrmeyer 0e39190062 Reduce complexity of __getitem__ API
If you need to specify more, call get_table method
2014-01-31 19:18:58 +01:00
Grzegorz Niewisiewicz a4d676f325 Merge branch 'master' into fix-table-cache 2014-01-27 08:56:28 +01:00
Stefan Wehrmeyer 92817d5f4d Make flake8 part of test suite 2014-01-25 21:45:30 +01:00
Stefan Wehrmeyer 0726dd9cf3 Remove OrderedDict implementation as RowProxy is returned
http://docs.sqlalchemy.org/en/rel_0_9/core/connections.html?highlight=rowproxy#sqlalchemy.engine.RowProxy
2014-01-25 21:22:11 +01:00
Stefan Wehrmeyer eff6925af9 Fix infinite loop in find method
If a _limit is not given, the query limit should
be given by eit
2014-01-25 21:20:18 +01:00
Stefan Wehrmeyer 5a7cafd4e2 Don't convert to datetime, if it is already datetime 2014-01-25 21:06:38 +01:00
Grzegorz Niewisiewicz d07cc90345 Update the table cache in update_table (fixes 67)
The problem occurs in the following scenario:

* an instance of a Table, obtained through Database.get_table, is used
  to insert some data
* a different instance of Table, obtained through Database.get_table
  call after the data has been inserted, uses a Table instance that is
  not up-to-date

The result is that, e.g. the keys created with the first Table object
aren't accessible via the second object.

This fixes the problem by updating the table cache in
Database.update_table.
2014-01-17 14:54:46 +01:00
Aditya Upadhyay 6d5e1c755f fixed bug with offsets and limits. 2014-01-12 23:56:14 +05:30
Friedrich Lindenberg 382703f753 Merge pull request #46 from 3onyc/issue-34
Implement SQLite datetime fix (Fixes #34)
2014-01-05 09:39:48 -08:00
Friedrich Lindenberg 3abe9d2c8d Merge branch 'python-3' of github.com:stefanw/dataset into stefanw-python-3 2014-01-05 17:52:59 +01:00
Friedrich Lindenberg ec9a2c56d1 Merge commit '2566581442eff9b17ee439296e7c4e9c232cee26' 2014-01-05 16:01:32 +01:00
Abhinav Upadhyay 508e025689 Fix insert for tables that do not have any primary key.
The insert method returns the value of the primary key for the inserted
row. But for tables that do not have any primary key, it raises an
IndexError, which is clearly wrong. At best it should return None in
such cases and avoid raising any exception.
2014-01-04 11:53:15 +05:30
Gregor Aisch 2566581442 using OrderedDict to preserve key order 2013-12-20 00:01:26 +01:00
Stefan Wehrmeyer 2870fdfb0b Fix a couple of more iterator changes 2013-12-18 11:32:58 +01:00
Stefan Wehrmeyer 426095634c Replace unicode with str, duck type encode 2013-12-18 11:31:41 +01:00
Stefan Wehrmeyer 74b900f1f6 Move from sqlalchemy-migrate to alembic
This affects how columns are added and dropped from
tables. MetaData and SQLATable objects have to be
recreated to make sync changed columns.
2013-12-18 04:08:24 +01:00
Stefan Wehrmeyer 5d3e8b90bf Turn ResultIter class into Python 3 iterator 2013-12-18 04:08:23 +01:00
Stefan Wehrmeyer 23e484cbed Handle Python 3 keys/values iterators 2013-12-18 04:08:23 +01:00
Stefan Wehrmeyer 88c0c1a15f Remove basestring, unicode from code base 2013-12-18 04:08:21 +01:00
Stefan Wehrmeyer b3520665d7 Replace old except syntax with new one
Drops Python 2.5 support
2013-12-18 03:22:49 +01:00
Stefan Wehrmeyer ad72ca5c4c Use new urllib.parse imports with fallbacks 2013-12-18 03:22:22 +01:00
3onyc a75c1968b4 Only apply fix when the current engine has an SQLite dialect 2013-12-10 14:06:06 +01:00
Chen 4a86981026 chang "Text" to "String" in create_table() function, fix issue #51 2013-12-06 23:58:54 -05:00
Friedrich Lindenberg d393523764 use row.copy() not copy.copy(row) 2013-12-05 13:11:04 +01:00
Chen 36b27c354b add drop_column function 2013-12-04 14:44:01 -05:00
Friedrich Lindenberg a174225de3 Change code to use copy(). 2013-12-04 17:55:42 +01:00
Friedrich Lindenberg ff247f17cc Create a new dict before updating data. Fixes #53 2013-12-04 11:09:22 +01:00
3onyc 07c290f691 Implement SQLite datetime fix 2013-11-21 08:48:38 +01:00