Commit Graph

206 Commits

Author SHA1 Message Date
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
Friedrich Lindenberg
2d526a2b73 Merge pull request #55 from cli248/upstream
Fix #51: change 'Text' to 'String' in create_table function
2013-12-07 02:25:18 -08:00
Chen
dac921a29e modify testcase for create_table() function 2013-12-07 00:22:29 -05: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
Friedrich Lindenberg
ba07c2c998 Merge pull request #54 from cli248/upstream
add drop_column function
2013-12-04 13:10:11 -08: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
Friedrich Lindenberg
b7bbde45fa Fix tests; pass url query args to create_engine. Fixes #40 2013-11-15 23:23:03 +02:00
Friedrich Lindenberg
8ec494c515 Up the release to 0.3.14 2013-11-15 22:50:17 +02:00
Friedrich Lindenberg
65198dc74a Use Python-slugify to generate Freezefile slugs.
This lets me remove a lot of unneeded code from the utils, and the
dependency improves the quality a lot.
2013-11-15 22:50:17 +02:00
Friedrich Lindenberg
060691f818 Include Python-slugify to begin using their slugging function 2013-11-15 22:50:16 +02:00
Friedrich Lindenberg
ea582d3fce Merge pull request #39 from diegoguimaraes/master
Fixing bug
2013-11-15 12:43:56 -08:00
Friedrich Lindenberg
2288202a4c Merge pull request #36 from gtsafas/patch-2
Some refactors I noticed when reading through the code
2013-11-15 12:28:24 -08:00
Diego Guimarães
bc16b9e325 Fixing bug
Fixing bug where the insert method always returns 0,
even after a successfully insetion, rather than the id
of the inserted element.
2013-11-14 22:24:44 -02:00
George "elb0w" Tsafas
7675198640 Some refactors I noticed when reading through the code
Pretty nicely written, I didnt actually test these. But I think they are sane. Nice project, im going to use it later.
2013-11-13 09:57:25 -05:00
Friedrich Lindenberg
4856c16b1f Merge pull request #35 from 3onyc/issue-33
Use string comparison in create_table (Fixes issue #33)
2013-11-13 02:07:25 -08:00
3onyc
95ca93cff0 Use string comparison in create_table (Fixes issue #33) 2013-11-13 10:05:46 +01:00
Friedrich Lindenberg
6b8a40746c Merge pull request #31 from alasdairnicol/quickstart_freeze_examples
Fix freeze examples in the docs
2013-11-12 06:42:50 -08:00
Alasdair Nicol
c7b07d6ca8 Fix freeze examples in the docs 2013-11-12 14:14:53 +00:00
Friedrich Lindenberg
dc144a27b0 have find_one return a dict, not a tuple 2013-11-04 17:29:20 +01:00
Friedrich Lindenberg
70eece9e77 Support transforms, fixes #28 2013-09-19 19:25:28 +02:00
Friedrich Lindenberg
36cbd4e417 Mention driver packages, fixes #25 2013-09-19 19:14:46 +02:00
Friedrich Lindenberg
a3613ef133 fixes #29: logger for command line app 2013-09-19 18:32:55 +02:00
Friedrich Lindenberg
9de60c388d update version 2013-09-18 12:54:27 +02:00
Friedrich Lindenberg
4ca0b4f167 Merge pull request #27 from dnatag/master
create table with custom primary_id
2013-09-18 03:49:44 -07:00
Yi Xie
257d767b6d add options to create custom primary id and type with shorthand format 2013-09-15 14:12:30 -04:00
Yi Xie
95cc5dd411 simplify creat_table interface 2013-09-13 09:42:35 -04:00
Yi Xie
bfd75360be create table with custom primary_id 2013-09-08 11:35:43 -04:00
Friedrich Lindenberg
2d27a75c1a Merge pull request #26 from jonathaneunice/master
Made `freeze()` less persnickety
2013-08-21 07:27:50 -07:00
Jonathan Eunice
93c05eb542 Added convenience check to `freeze()`. If a whole table is passed
as a result set, rather than a result set, calls ``result.all()``
to automagically "do the right thing."
2013-08-20 13:55:42 -04:00
Friedrich Lindenberg
e488664efe Support generation of static JSONP. 2013-08-19 22:45:05 +02:00
Friedrich Lindenberg
5a458da376 allow params in query() 2013-08-18 18:37:31 +02:00
Friedrich Lindenberg
ef45f8dd95 Allow query parameters on database.query(). 2013-08-18 18:09:07 +02:00
Friedrich Lindenberg
51462678c6 new version for pypi 2013-08-12 12:09:55 +02:00
gka
39d870a36a Merge pull request #24 from abelsonlive/master
update table.update now accepting keys as string, too
2013-08-12 01:47:00 -07:00
Brian Abelson
1f77509017 update table.update to perform the same as upsert 2013-08-11 10:40:27 -04:00
gka
b14b73e320 Merge pull request #23 from abelsonlive/master
allow keys arg for upsert to be a string
2013-08-11 01:55:44 -07:00
Brian Abelson
904e464dfa allow keys arg for upsert to be a string
I want to be able to use `upsert` without formatting the keys arg as a list, ie:
```
table.upsert(new_data, "id")
```
2013-08-10 21:34:00 -04:00
Friedrich Lindenberg
a228f48e23 Merge pull request #22 from scraperwiki/20-fix-logging
Don't modify the root logger if being used as a library
2013-08-06 06:53:06 -07:00
Paul Furley
69815e65fc Moved logging.basicConfig() so using dataset as a library doesn't interfere with the global logger 2013-08-06 13:48:55 +01:00
Friedrich Lindenberg
39edde3a2c Support postgres schemata, bump version 2013-07-25 10:18:20 +02:00
gka
1dbf8ddc70 application should be able to overwrite environment setting 2013-07-15 10:38:19 +02:00
Friedrich Lindenberg
3860b76dcf Merge pull request #21 from mattack108/master
Allow env variable for database connection
2013-07-15 00:35:04 -07:00
mattack108
9c7cdf6723 No needs for positional args. 2013-07-14 22:07:42 +01:00
mattack108
a9be8300aa Update docs. 2013-07-14 22:05:52 +01:00
mattack108
57a7c58f63 Test case when url comes as env variable. 2013-07-14 21:51:35 +01:00
mattack108
cf8f3dc4d2 Allow to use url defined as env variable. 2013-07-14 21:50:52 +01:00