Commit Graph

456 Commits

Author SHA1 Message Date
Stefan Wehrmeyer
330916f239 Fix test to ignore order of columns 2014-01-31 20:06:06 +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
Stefan Wehrmeyer
7a6b16931c Drop all tables of db after each test 2014-01-31 18:56:58 +01:00
Stefan Wehrmeyer
2865e7c50e Add travis config to test on sqlite, postgres, mysql 2014-01-31 18:10:49 +01:00
Stefan Wehrmeyer
9035edceeb Merge pull request #68 from grn/fix-table-cache
Update the table cache in update_table (fixes #67)

Thanks to @grn
2014-01-27 14:25:08 -08:00
Grzegorz Niewisiewicz
a9abc9908d Add a test case for table cache updates
This test case verifies whether get_table returns the most up-to-date
table object containing all columns that has been added to the table
since the last cache update.
2014-01-27 08:58:45 +01:00
Grzegorz Niewisiewicz
a4d676f325 Merge branch 'master' into fix-table-cache 2014-01-27 08:56:28 +01:00
Stefan Wehrmeyer
f254e03ef1 Merge pull request #72 from cli248/new_master
Add 'build' to .gitignore

Thanks to @cli248
2014-01-25 15:18:52 -08:00
Chen Liu
ec4c91c20e add 'build' to .gitignore 2014-01-25 17:57:29 -05:00
Stefan Wehrmeyer
81008c4562 Merge pull request #71 from stefanw/improve-testing
Improve test suite and testing
2014-01-25 13:22:28 -08:00
Stefan Wehrmeyer
47456b35a7 Fix type comparison to isinstance check 2014-01-25 22:19:03 +01:00
Stefan Wehrmeyer
697cfcf165 Explicitly install flake8 and run it 2014-01-25 22:13:52 +01:00
Stefan Wehrmeyer
92817d5f4d Make flake8 part of test suite 2014-01-25 21:45:30 +01:00
Stefan Wehrmeyer
6292bda8aa Upgrade dependencies 2014-01-25 21:22:19 +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
Stefan Wehrmeyer
6c8f83b7c2 Merge branch 'master' into improve-testing
Conflicts:
	test/test_persistence.py
2014-01-25 20:53:03 +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
Friedrich Lindenberg
e26bf57c39 Merge pull request #64 from Aditya-upadhyay/bugfix/offsets_and_limit
fixed bug with offsets and limits.
2014-01-13 01:04:25 -08:00
Aditya Upadhyay
6d5e1c755f fixed bug with offsets and limits. 2014-01-12 23:56:14 +05:30
Friedrich Lindenberg
06046aa16f Update to version 0.4.0 2014-01-05 18:43:25 +01:00
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
b431292188 fix test for ordereddicts 2014-01-05 18:36:11 +01: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
Friedrich Lindenberg
1fe1b163f6 Release 0.3.15. 2014-01-05 15:55:37 +01:00
Friedrich Lindenberg
dc0a6f1f49 Merge pull request #60 from abhinav-upadhyay/fix-table-insert
Fix insert for tables that do not have any primary key.
2014-01-05 06:45:16 -08: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
Gregor Aisch
03cca31b5b added test for ordered keys 2013-12-19 23:46:10 +01:00
Stefan Wehrmeyer
ea28ddec01 Make tests more than twice as fast 2013-12-18 13:02:37 +01:00
Stefan Wehrmeyer
a6095a0506 Reset DATABASE_URL OS environ value properly
Let's be nice, who knows when this will save the day.
2013-12-18 13:02:37 +01:00
Stefan Wehrmeyer
95717d4584 Add Travis CI tests 2013-12-18 13:02:37 +01:00
Stefan Wehrmeyer
425528dc17 Set up test suite running through setup.py
Run with python setup.py test
2013-12-18 13:02:36 +01:00
Stefan Wehrmeyer
2291953e59 Do not install test package into global namespace 2013-12-18 13:02:36 +01:00
Stefan Wehrmeyer
0de0f0f95a Fix tests under Python 2.6
assertRaises is not a context manager under Py 2.6
2013-12-18 13:02:18 +01:00
Stefan Wehrmeyer
2eea58a64c Fix Python version detection for Python 2.6 2013-12-18 12:53:11 +01:00
Stefan Wehrmeyer
158e87152c Make argparse a Python 2.6 dependency 2013-12-18 12:35:35 +01:00
Stefan Wehrmeyer
aa3dded49e Put actual unicode character into test data 2013-12-18 11:33:45 +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
ba7109a6b9 Add Py 2 and Py 3 classifiers 2013-12-18 04:08:24 +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
Stefan Wehrmeyer
408145a98d Fix syntax errors cause by old octal literals 2013-12-18 03:22:00 +01:00