url
stringlengths
53
56
repository_url
stringclasses
1 value
labels_url
stringlengths
67
70
comments_url
stringlengths
62
65
events_url
stringlengths
60
63
html_url
stringlengths
41
46
id
int64
450k
1.69B
node_id
stringlengths
18
32
number
int64
1
2.72k
title
stringlengths
1
209
user
dict
labels
list
state
stringclasses
1 value
locked
bool
2 classes
assignee
null
assignees
list
milestone
null
comments
list
created_at
timestamp[s]
updated_at
timestamp[s]
closed_at
timestamp[s]
author_association
stringclasses
3 values
active_lock_reason
stringclasses
2 values
body
stringlengths
0
104k
reactions
dict
timeline_url
stringlengths
62
65
performed_via_github_app
null
state_reason
stringclasses
2 values
draft
bool
2 classes
pull_request
dict
https://api.github.com/repos/coleifer/peewee/issues/1018
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1018/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1018/comments
https://api.github.com/repos/coleifer/peewee/issues/1018/events
https://github.com/coleifer/peewee/issues/1018
166,441,534
MDU6SXNzdWUxNjY0NDE1MzQ=
1,018
Implement alternative DeferredRelation semantics
{ "login": "c0ldcalamari", "id": 11208820, "node_id": "MDQ6VXNlcjExMjA4ODIw", "avatar_url": "https://avatars.githubusercontent.com/u/11208820?v=4", "gravatar_id": "", "url": "https://api.github.com/users/c0ldcalamari", "html_url": "https://github.com/c0ldcalamari", "followers_url": "https://api.github.c...
[]
closed
false
null
[]
null
[ "That's a very nice API. Depending on the class name (a string) is something I try to shy away from, as errors can occur despite the code appearing to be perfectly valid, for instance a typo or you happen to change the model name in one place and not the other.\n\nI like the API, though, and agree that it would be ...
2016-07-19T21:36:08
2016-07-20T15:50:01
2016-07-20T15:50:01
NONE
null
The [semantics behind circular foreign key dependencies](http://docs.peewee-orm.com/en/latest/peewee/models.html#circular-foreign-key-dependencies) get kind of unwieldy when you have more than a few models (and they're spread over multiple files). This is because the `DeferredRelation` object has to be defined, used, ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1018/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1018/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/1017
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1017/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1017/comments
https://api.github.com/repos/coleifer/peewee/issues/1017/events
https://github.com/coleifer/peewee/issues/1017
166,265,605
MDU6SXNzdWUxNjYyNjU2MDU=
1,017
Issues with counting uuid in Postgresql
{ "login": "bitnic028", "id": 11515516, "node_id": "MDQ6VXNlcjExNTE1NTE2", "avatar_url": "https://avatars.githubusercontent.com/u/11515516?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bitnic028", "html_url": "https://github.com/bitnic028", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "Thanks for including the traceback. Looks like the exception itself got cut off. Could you please include that? Will make debugging a bit easier... I'm just guessing here, but is psycopg2 already providing a uuid and peewee is treating it like it's a string?\n", "All code with all traceback:\n\n```\n>>> from app...
2016-07-19T07:29:52
2016-07-20T16:26:25
2016-07-20T16:26:25
NONE
null
Issues with counting uuid, with other type fields the problem is avoid. For example: ``` import peewee from uuid import UUID class User(): id = UUIDField(primary_key=True) login = CharField() department = ForeignKeyField(Department, related_name=u"users_in_department", null=True) class Department(): ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1017/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1017/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/1016
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1016/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1016/comments
https://api.github.com/repos/coleifer/peewee/issues/1016/events
https://github.com/coleifer/peewee/pull/1016
166,251,895
MDExOlB1bGxSZXF1ZXN0Nzc5MTk5NjY=
1,016
The update of BooleanField coerce
{ "login": "mobishift2011", "id": 3817564, "node_id": "MDQ6VXNlcjM4MTc1NjQ=", "avatar_url": "https://avatars.githubusercontent.com/u/3817564?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mobishift2011", "html_url": "https://github.com/mobishift2011", "followers_url": "https://api.github....
[]
closed
false
null
[]
null
[ "Is this in reference to a particular issue?\n", "**Amazing!**\n", "This patch seems more suitable for a subclass of BooleanField that is designed to handle things like strings or untrusted data.\n" ]
2016-07-19T05:35:02
2016-07-29T14:18:16
2016-07-29T14:18:16
NONE
null
Good afternoon, coleifer. We've found the most common case is that the data from the client(as browser) will send true or false, 1 or 0 to the server, but the conversion should be decided by peewee on the data field type. So may be the update of mine makes common sense.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1016/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1016/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/1016", "html_url": "https://github.com/coleifer/peewee/pull/1016", "diff_url": "https://github.com/coleifer/peewee/pull/1016.diff", "patch_url": "https://github.com/coleifer/peewee/pull/1016.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/1015
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1015/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1015/comments
https://api.github.com/repos/coleifer/peewee/issues/1015/events
https://github.com/coleifer/peewee/issues/1015
166,145,488
MDU6SXNzdWUxNjYxNDU0ODg=
1,015
Pass params into where with kwargs.
{ "login": "alexpantyukhin", "id": 6513121, "node_id": "MDQ6VXNlcjY1MTMxMjE=", "avatar_url": "https://avatars.githubusercontent.com/u/6513121?v=4", "gravatar_id": "", "url": "https://api.github.com/users/alexpantyukhin", "html_url": "https://github.com/alexpantyukhin", "followers_url": "https://api.gith...
[]
closed
false
null
[]
null
[ "Actually, this functionality does exist, but is currently marked as deprecated and no longer documented. You can view the docs [on the 2.0.2 build](http://docs.peewee-orm.com/en/2.0.2/peewee/querying.html#SelectQuery.filter), however.\n\nIf you use the alternative `filter()` API, you can use Django-style kwargs lo...
2016-07-18T17:16:45
2016-07-20T15:35:27
2016-07-20T15:35:27
NONE
null
Hi. Sometimes it's very useful to pass a collection of parameters with `kwargs` into the `where` clause. What if to add some kind of function like `q(class, **kwargs)` into playhouse which gets params and translate it on expressions which are already used in the peewee. (Not sure if such function already exists). Or ma...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1015/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1015/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/1014
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1014/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1014/comments
https://api.github.com/repos/coleifer/peewee/issues/1014/events
https://github.com/coleifer/peewee/issues/1014
166,000,968
MDU6SXNzdWUxNjYwMDA5Njg=
1,014
Minor: logging of queries after final string interpolation
{ "login": "bcattle", "id": 620058, "node_id": "MDQ6VXNlcjYyMDA1OA==", "avatar_url": "https://avatars.githubusercontent.com/u/620058?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bcattle", "html_url": "https://github.com/bcattle", "followers_url": "https://api.github.com/users/bcattle/fo...
[]
closed
false
null
[]
null
[ "It would be much better! If I recall correctly, you can also use psycopg2.mogrify to get the final query. Unfortunately pysqlite doesnt implement this:\n- http://bugs.python.org/issue9506\n- https://github.com/ghaering/pysqlite/issues/20#issuecomment-26258837\n\nLooks like mysql-python doesn't implement this eithe...
2016-07-17T23:07:33
2016-07-18T00:20:31
2016-07-18T00:20:31
CONTRIBUTOR
null
Hey, I love this library. The [docs](http://docs.peewee-orm.com/en/latest/peewee/database.html#logging-queries) say you can turn on logging of queries with ``` # Print all queries to stderr. import logging logger = logging.getLogger('peewee') logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler()) `...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1014/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1014/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/1013
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1013/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1013/comments
https://api.github.com/repos/coleifer/peewee/issues/1013/events
https://github.com/coleifer/peewee/issues/1013
165,507,045
MDU6SXNzdWUxNjU1MDcwNDU=
1,013
Execute a transaction when use Read Slaves
{ "login": "huangzhw", "id": 3366133, "node_id": "MDQ6VXNlcjMzNjYxMzM=", "avatar_url": "https://avatars.githubusercontent.com/u/3366133?v=4", "gravatar_id": "", "url": "https://api.github.com/users/huangzhw", "html_url": "https://github.com/huangzhw", "followers_url": "https://api.github.com/users/huang...
[]
closed
false
null
[]
null
[ "For that case I'd suggest using the [execution context helper](http://docs.peewee-orm.com/en/latest/peewee/api.html#ExecutionContext).\n\nHard to say more, though. So you're using the \"ReadSlaveModel\"...may I ask what for? Do you have a large number of read replicas and a lot of database load?\n", "No. I just ...
2016-07-14T08:33:03
2016-07-15T03:20:51
2016-07-15T03:15:04
NONE
null
When we are executing a transaction, we want the connection stay the same. But if we use Read Slaves, select will use slave connections? So, if we want use master connection, we have to instantiate the SelectQuery by hand?
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1013/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1013/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/1012
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1012/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1012/comments
https://api.github.com/repos/coleifer/peewee/issues/1012/events
https://github.com/coleifer/peewee/issues/1012
165,380,289
MDU6SXNzdWUxNjUzODAyODk=
1,012
null FKs return non-null objects with all-null attributes
{ "login": "neopunisher", "id": 73310, "node_id": "MDQ6VXNlcjczMzEw", "avatar_url": "https://avatars.githubusercontent.com/u/73310?v=4", "gravatar_id": "", "url": "https://api.github.com/users/neopunisher", "html_url": "https://github.com/neopunisher", "followers_url": "https://api.github.com/users/neop...
[]
closed
true
null
[]
null
[ "Here's the plan for the fix:\n\n> If the user selects the foreign key field and it is null, then it's a safe bet to skip object creation. Same, as you mentioned, if they select the related object's primary key. Beyond that it gets murky. I'll look into implementing this.\n\n**Edit: fix has been merged**\n" ]
2016-07-13T17:45:00
2016-07-17T05:27:24
2016-07-14T05:22:10
NONE
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1012/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1012/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/1011
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1011/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1011/comments
https://api.github.com/repos/coleifer/peewee/issues/1011/events
https://github.com/coleifer/peewee/issues/1011
165,227,590
MDU6SXNzdWUxNjUyMjc1OTA=
1,011
Calling Model.save() changes PaswordField passwords
{ "login": "joeyespo", "id": 634573, "node_id": "MDQ6VXNlcjYzNDU3Mw==", "avatar_url": "https://avatars.githubusercontent.com/u/634573?v=4", "gravatar_id": "", "url": "https://api.github.com/users/joeyespo", "html_url": "https://github.com/joeyespo", "followers_url": "https://api.github.com/users/joeyesp...
[]
closed
false
null
[]
null
[ "That was _fast_! How do you do it? :smiley: \n", "Also, thanks!\n" ]
2016-07-13T03:10:42
2016-07-13T03:34:23
2016-07-13T03:19:58
CONTRIBUTOR
null
I have a `User` model with a `PasswordField` and noticed that when I change some fields can call `user.save()`, the password gets regenerated. From skimming the code, it looks like it's re-hashing the password hash. The following is my current workaround: ``` py from playhouse.fields import PasswordField as PasswordF...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1011/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1011/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/1010
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1010/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1010/comments
https://api.github.com/repos/coleifer/peewee/issues/1010/events
https://github.com/coleifer/peewee/issues/1010
165,077,137
MDU6SXNzdWUxNjUwNzcxMzc=
1,010
Support for CASE or FILTER in COUNT
{ "login": "dev-zero", "id": 11307, "node_id": "MDQ6VXNlcjExMzA3", "avatar_url": "https://avatars.githubusercontent.com/u/11307?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dev-zero", "html_url": "https://github.com/dev-zero", "followers_url": "https://api.github.com/users/dev-zero/foll...
[]
closed
false
null
[]
null
[ "I came up with the following hacks/workarounds:\n\n``` python\n q = Task.select(Task.machine,\n fn.COUNT(Task.id).alias('total'),\n fn.COUNT(SQL('t1.id) FILTER (WHERE t1.status = %s', 'running')).alias('running')) \\\n .group_by(Task.machine)\n\n```\n\n``...
2016-07-12T13:14:31
2016-07-13T01:42:57
2016-07-13T01:42:57
NONE
null
Given a table `tas` with the following columns: ``` id | machine | status ``` I would like to count the number of total and running tasks per machine. In PostgreSQL 9.5 this is possible using: ``` sql SELECT machine, COUNT(id) FILTER (WHERE status='running') AS running, COUNT(id) AS total FROM task GROUP BY...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1010/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1010/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/1009
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1009/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1009/comments
https://api.github.com/repos/coleifer/peewee/issues/1009/events
https://github.com/coleifer/peewee/pull/1009
164,757,582
MDExOlB1bGxSZXF1ZXN0NzY4OTc5Nzc=
1,009
Accept DATABASE_URL config variable in flask_utils
{ "login": "joeyespo", "id": 634573, "node_id": "MDQ6VXNlcjYzNDU3Mw==", "avatar_url": "https://avatars.githubusercontent.com/u/634573?v=4", "gravatar_id": "", "url": "https://api.github.com/users/joeyespo", "html_url": "https://github.com/joeyespo", "followers_url": "https://api.github.com/users/joeyesp...
[]
closed
false
null
[]
null
[ "Your implementation is better. :+1: \n\nThank you :smiley:\n" ]
2016-07-11T04:18:32
2016-07-12T17:56:31
2016-07-12T17:50:38
CONTRIBUTOR
null
Makes working with Heroku's `DATABASE_URL` standard slightly more straightforward, since Flask Utils already works with a connection URL out-of-the-box.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1009/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1009/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/1009", "html_url": "https://github.com/coleifer/peewee/pull/1009", "diff_url": "https://github.com/coleifer/peewee/pull/1009.diff", "patch_url": "https://github.com/coleifer/peewee/pull/1009.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/1008
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1008/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1008/comments
https://api.github.com/repos/coleifer/peewee/issues/1008/events
https://github.com/coleifer/peewee/issues/1008
164,581,279
MDU6SXNzdWUxNjQ1ODEyNzk=
1,008
[Bug] Prefetch and limit bug
{ "login": "elkranio", "id": 2633533, "node_id": "MDQ6VXNlcjI2MzM1MzM=", "avatar_url": "https://avatars.githubusercontent.com/u/2633533?v=4", "gravatar_id": "", "url": "https://api.github.com/users/elkranio", "html_url": "https://github.com/elkranio", "followers_url": "https://api.github.com/users/elkra...
[]
closed
false
null
[]
null
[]
2016-07-08T17:46:28
2016-07-08T17:56:35
2016-07-08T17:56:35
NONE
null
Each game can have several platforms. When I use **limit** or **paginate**, some of the games end up without platforms. Acts strangely: `games = Game.select().limit(50)` `platforms = GamePlatform.select()` `games_pf = prefetch(games, platforms)` Works fine `games = Game.select().where(Game.id << [1, 2, 3 ... 50]` `...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1008/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1008/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/1007
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1007/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1007/comments
https://api.github.com/repos/coleifer/peewee/issues/1007/events
https://github.com/coleifer/peewee/issues/1007
164,463,560
MDU6SXNzdWUxNjQ0NjM1NjA=
1,007
Distribute sources instead of requiring Cython to be installed
{ "login": "thedrow", "id": 48936, "node_id": "MDQ6VXNlcjQ4OTM2", "avatar_url": "https://avatars.githubusercontent.com/u/48936?v=4", "gravatar_id": "", "url": "https://api.github.com/users/thedrow", "html_url": "https://github.com/thedrow", "followers_url": "https://api.github.com/users/thedrow/follower...
[]
closed
false
null
[]
null
[]
2016-07-08T05:50:00
2016-07-15T03:34:45
2016-07-15T03:34:45
NONE
null
There's no reason to require Cython to be installed. We can just distribute the sources of the generated Cython code. That will be easier for the users and you'll be able to distribute wheels that way.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1007/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1007/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/1006
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1006/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1006/comments
https://api.github.com/repos/coleifer/peewee/issues/1006/events
https://github.com/coleifer/peewee/issues/1006
164,012,334
MDU6SXNzdWUxNjQwMTIzMzQ=
1,006
peewee create index Error
{ "login": "rfyiamcool", "id": 3785409, "node_id": "MDQ6VXNlcjM3ODU0MDk=", "avatar_url": "https://avatars.githubusercontent.com/u/3785409?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rfyiamcool", "html_url": "https://github.com/rfyiamcool", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "You need a trailing comma after (('article_id', 'content_md5'), False) -- otherwise, since it's the only item in the outer-most parentheses, Python treats it as a normal expression rather than a tuple.\n" ]
2016-07-06T07:07:17
2016-07-06T14:34:37
2016-07-06T14:34:37
NONE
null
I want to create table with index, But raise error. Mysql peewee version = 2.8.1 ``` class ArticleContent(Model): article_id = IntegerField() content = BlobField() content_md5 = CharField(null=True,default=''") class Meta: database = db db_table= 'mirro_article_content' inde...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1006/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1006/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/1005
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1005/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1005/comments
https://api.github.com/repos/coleifer/peewee/issues/1005/events
https://github.com/coleifer/peewee/pull/1005
163,770,381
MDExOlB1bGxSZXF1ZXN0NzYyMTczMzg=
1,005
Added PyPy support
{ "login": "thedrow", "id": 48936, "node_id": "MDQ6VXNlcjQ4OTM2", "avatar_url": "https://avatars.githubusercontent.com/u/48936?v=4", "gravatar_id": "", "url": "https://api.github.com/users/thedrow", "html_url": "https://github.com/thedrow", "followers_url": "https://api.github.com/users/thedrow/follower...
[]
closed
false
null
[]
null
[ "This will require a bit more work.\nOn PyPy we can use psycopg2-cffi.\nLet me clone that branch. The build will pass soon.\n", "I think pip is being silly here. Lemme check.\n", "Now it skips the damm Cython generation step. I'll get back to you on that.\n", "Closing for now, if you plan to re-open would you...
2016-07-05T04:37:05
2016-07-15T16:05:55
2016-07-14T05:43:46
NONE
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1005/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1005/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/1005", "html_url": "https://github.com/coleifer/peewee/pull/1005", "diff_url": "https://github.com/coleifer/peewee/pull/1005.diff", "patch_url": "https://github.com/coleifer/peewee/pull/1005.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/1004
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1004/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1004/comments
https://api.github.com/repos/coleifer/peewee/issues/1004/events
https://github.com/coleifer/peewee/pull/1004
163,769,748
MDExOlB1bGxSZXF1ZXN0NzYyMTY5Mzc=
1,004
Added a pip cache to Travis
{ "login": "thedrow", "id": 48936, "node_id": "MDQ6VXNlcjQ4OTM2", "avatar_url": "https://avatars.githubusercontent.com/u/48936?v=4", "gravatar_id": "", "url": "https://api.github.com/users/thedrow", "html_url": "https://github.com/thedrow", "followers_url": "https://api.github.com/users/thedrow/follower...
[]
closed
false
null
[]
null
[ "What's going on in this PR? I'm not sure I understand the differences here.\n", "It caches the compilation of the C extensions and also doesn't download pip dependencies.\nThe build as a result should be faster.\n", "Just looking at the build times it doesn't appear to have made a difference.\n", "Did a quic...
2016-07-05T04:27:16
2016-07-08T13:45:50
2016-07-08T13:45:50
NONE
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1004/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1004/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/1004", "html_url": "https://github.com/coleifer/peewee/pull/1004", "diff_url": "https://github.com/coleifer/peewee/pull/1004.diff", "patch_url": "https://github.com/coleifer/peewee/pull/1004.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/1003
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1003/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1003/comments
https://api.github.com/repos/coleifer/peewee/issues/1003/events
https://github.com/coleifer/peewee/pull/1003
163,553,431
MDExOlB1bGxSZXF1ZXN0NzYwODQyMjg=
1,003
add "is_not", "not_in" django-style filter support
{ "login": "qulc", "id": 4693764, "node_id": "MDQ6VXNlcjQ2OTM3NjQ=", "avatar_url": "https://avatars.githubusercontent.com/u/4693764?v=4", "gravatar_id": "", "url": "https://api.github.com/users/qulc", "html_url": "https://github.com/qulc", "followers_url": "https://api.github.com/users/qulc/followers", ...
[]
closed
false
null
[]
null
[ "This is a nice PR, very clean, but the Django-style querying is deprecated and I do not plan on adding new functionality as it will be removed soon in the next major version...which hopefully isn't too far away!\n" ]
2016-07-03T08:52:15
2016-07-07T22:14:07
2016-07-07T22:14:07
NONE
null
peewee filter not support `isnull` https://docs.djangoproject.com/en/1.9/ref/models/querysets/#isnull so i want add 'is_not' mapping to `OP.NOT_IN` ``` python Blog.filter(user__username__not_in=['u1', 'u2'], pub_date__is_not=None) ```
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1003/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1003/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/1003", "html_url": "https://github.com/coleifer/peewee/pull/1003", "diff_url": "https://github.com/coleifer/peewee/pull/1003.diff", "patch_url": "https://github.com/coleifer/peewee/pull/1003.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/1002
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1002/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1002/comments
https://api.github.com/repos/coleifer/peewee/issues/1002/events
https://github.com/coleifer/peewee/issues/1002
163,028,958
MDU6SXNzdWUxNjMwMjg5NTg=
1,002
Unique Constraint not being applied after schema migration
{ "login": "beerdedfellow", "id": 13444979, "node_id": "MDQ6VXNlcjEzNDQ0OTc5", "avatar_url": "https://avatars.githubusercontent.com/u/13444979?v=4", "gravatar_id": "", "url": "https://api.github.com/users/beerdedfellow", "html_url": "https://github.com/beerdedfellow", "followers_url": "https://api.githu...
[]
closed
false
null
[]
null
[ "I'm not able to replicate this locally. Here's the code I'm using:\n\n``` python\nimport os\nfrom peewee import *\n\nif os.path.exists('/tmp/x.db'):\n os.unlink('/tmp/x.db')\n\ndb = SqliteDatabase('/tmp/x.db')\n\nclass Ticket(Model):\n number = CharField(unique=True)\n modified = DateTimeField()\n subj...
2016-06-29T21:18:22
2016-07-14T19:47:13
2016-07-14T19:47:13
NONE
null
Hello, I am building a ticket tracking application using peewee to interact with sqlite. I am defining my model as follows ``` python class Ticket(BaseModel): number = CharField(unique=True) modified = DateTimeField() subject = CharField() queue = CharField() assignee = CharField(null=True) st...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1002/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1002/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/1001
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1001/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1001/comments
https://api.github.com/repos/coleifer/peewee/issues/1001/events
https://github.com/coleifer/peewee/pull/1001
162,664,376
MDExOlB1bGxSZXF1ZXN0NzU0NjE3MTI=
1,001
Set composite PK
{ "login": "kepkin", "id": 2153196, "node_id": "MDQ6VXNlcjIxNTMxOTY=", "avatar_url": "https://avatars.githubusercontent.com/u/2153196?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kepkin", "html_url": "https://github.com/kepkin", "followers_url": "https://api.github.com/users/kepkin/foll...
[]
closed
false
null
[]
null
[ "What is the use-case for this?\n" ]
2016-06-28T11:34:48
2018-01-31T12:42:41
2018-01-31T12:42:41
NONE
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1001/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1001/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/1001", "html_url": "https://github.com/coleifer/peewee/pull/1001", "diff_url": "https://github.com/coleifer/peewee/pull/1001.diff", "patch_url": "https://github.com/coleifer/peewee/pull/1001.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/1000
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/1000/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/1000/comments
https://api.github.com/repos/coleifer/peewee/issues/1000/events
https://github.com/coleifer/peewee/issues/1000
162,618,780
MDU6SXNzdWUxNjI2MTg3ODA=
1,000
a error log
{ "login": "rfyiamcool", "id": 3785409, "node_id": "MDQ6VXNlcjM3ODU0MDk=", "avatar_url": "https://avatars.githubusercontent.com/u/3785409?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rfyiamcool", "html_url": "https://github.com/rfyiamcool", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "Not enough info.\n" ]
2016-06-28T07:20:54
2016-06-28T13:27:48
2016-06-28T13:27:48
NONE
null
/Library/Python/2.7/site-packages/peewee.py:3454: Warning: Invalid utf8mb4 character string: '9C0300' cursor.execute(sql, params or ()) mysql5.7
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/1000/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/1000/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/999
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/999/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/999/comments
https://api.github.com/repos/coleifer/peewee/issues/999/events
https://github.com/coleifer/peewee/issues/999
162,580,850
MDU6SXNzdWUxNjI1ODA4NTA=
999
Support cockroachdb?
{ "login": "jet10000", "id": 2258120, "node_id": "MDQ6VXNlcjIyNTgxMjA=", "avatar_url": "https://avatars.githubusercontent.com/u/2258120?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jet10000", "html_url": "https://github.com/jet10000", "followers_url": "https://api.github.com/users/jet10...
[]
closed
false
null
[]
null
[ "[From one of their devs](https://github.com/cockroachdb/cockroachdb-python/issues/21#issuecomment-229755195),\n\n> Cockroach actually supports the Postgres wire protocol, so the Postgres driver builtin to Peewee should work (we support psycopg2 without issue). That said, we have found that a few drivers use some P...
2016-06-28T01:02:22
2016-07-14T09:02:14
2016-07-14T09:02:14
NONE
null
https://www.cockroachlabs.com/blog/building-application-cockroachdb-sqlalchemy-2/
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/999/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/999/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/998
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/998/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/998/comments
https://api.github.com/repos/coleifer/peewee/issues/998/events
https://github.com/coleifer/peewee/issues/998
162,422,837
MDU6SXNzdWUxNjI0MjI4Mzc=
998
db.create_table does not create indexes
{ "login": "sin5th", "id": 7314785, "node_id": "MDQ6VXNlcjczMTQ3ODU=", "avatar_url": "https://avatars.githubusercontent.com/u/7314785?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sin5th", "html_url": "https://github.com/sin5th", "followers_url": "https://api.github.com/users/sin5th/foll...
[]
closed
false
null
[]
null
[ "Hey @sin5 - can you please take the 5 extra seconds and learn how to format your code? Did you even look at your issue after creating it?\n", "Please read the documentation on submitting bugs: http://docs.peewee-orm.com/en/latest/peewee/contributing.html#bugs\n\nHere's a link to GitHub's documentation:\n\nhttps:...
2016-06-27T10:41:40
2016-06-27T22:46:44
2016-06-27T19:05:46
NONE
null
class Client(peewee.Model): """ UNIQUE KEY `rip_rport_stime` (`ip_type`, `remote_ip`, `remote_port`, `start_time`), KEY `app_stream_stime` (`app`, `stream`, `start_time`), KEY `app_stime` (`app`, `start_time`) """ ip_type = UnsignedSmallIntegerField() app = UnsignedIntegerField() s...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/998/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/998/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/997
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/997/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/997/comments
https://api.github.com/repos/coleifer/peewee/issues/997/events
https://github.com/coleifer/peewee/issues/997
161,825,989
MDU6SXNzdWUxNjE4MjU5ODk=
997
get tables commit transaction
{ "login": "kaito-kidd", "id": 9117028, "node_id": "MDQ6VXNlcjkxMTcwMjg=", "avatar_url": "https://avatars.githubusercontent.com/u/9117028?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kaito-kidd", "html_url": "https://github.com/kaito-kidd", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "How does this issue manifest itself?\n", "For example, I have a log table, and is split by date table, every time you insert new data, checks the table exists, then call `create_table` methods, parameters `fail_silently = True`, it does not exist is automatically created to perform the `execute_sql` method.\n\nt...
2016-06-23T02:15:34
2016-06-24T16:57:42
2016-06-24T16:57:42
NONE
null
``` def get_tables(self, schema=None): return [row for row, in self.execute_sql('SHOW TABLES')] ``` execute `execute_sql` method auto commit transaction. but is it necessary to do so? If often call `create_table` method will lead to too many invalid commit.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/997/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/997/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/996
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/996/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/996/comments
https://api.github.com/repos/coleifer/peewee/issues/996/events
https://github.com/coleifer/peewee/issues/996
161,440,906
MDU6SXNzdWUxNjE0NDA5MDY=
996
Peewee throws error on cascade deletion if imports aren't present
{ "login": "Coderdreams", "id": 4738090, "node_id": "MDQ6VXNlcjQ3MzgwOTA=", "avatar_url": "https://avatars.githubusercontent.com/u/4738090?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Coderdreams", "html_url": "https://github.com/Coderdreams", "followers_url": "https://api.github.com/us...
[]
closed
false
null
[]
null
[ "Please read the documentation on submitting bugs: http://docs.peewee-orm.com/en/latest/peewee/contributing.html#bugs\n\nSpecifically, take the extra 5 seconds and please format your code:\n\nhttps://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/\n" ]
2016-06-21T13:45:39
2016-06-24T17:00:13
2016-06-24T17:00:13
NONE
null
I have something similar to this: class Test(BaseModel): name = CharField() class Test2(BaseModel): test = ForeignKeyField(Test) class Test3(BaseModel): test2 = ForeignKeyField(Test2) I had a script that said: from database.model.test import Test test = Test.get(Test.name == testName) test.delete_insta...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/996/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/996/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/995
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/995/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/995/comments
https://api.github.com/repos/coleifer/peewee/issues/995/events
https://github.com/coleifer/peewee/pull/995
161,425,864
MDExOlB1bGxSZXF1ZXN0NzQ2MDM4Mzk=
995
Fix truncate_date for PostgreSQL
{ "login": "Zverik", "id": 766031, "node_id": "MDQ6VXNlcjc2NjAzMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/766031?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Zverik", "html_url": "https://github.com/Zverik", "followers_url": "https://api.github.com/users/Zverik/follow...
[]
closed
false
null
[]
null
[ "Cool, thanks!\n" ]
2016-06-21T12:38:23
2016-06-25T22:47:42
2016-06-25T22:47:37
CONTRIBUTOR
null
The following script doesn't work: ``` python #!/usr/bin/env python import peewee, datetime database = peewee.PostgresqlDatabase('mmwatch', host='localhost') class Number(peewee.Model): date = peewee.DateTimeField(default=datetime.datetime.now) class Meta: database = database database.connect() dat...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/995/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/995/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/995", "html_url": "https://github.com/coleifer/peewee/pull/995", "diff_url": "https://github.com/coleifer/peewee/pull/995.diff", "patch_url": "https://github.com/coleifer/peewee/pull/995.patch", "merged_at": "2016-06-25T22:47:37" }
https://api.github.com/repos/coleifer/peewee/issues/994
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/994/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/994/comments
https://api.github.com/repos/coleifer/peewee/issues/994/events
https://github.com/coleifer/peewee/pull/994
160,911,989
MDExOlB1bGxSZXF1ZXN0NzQyNTkyODM=
994
impl for bring select.get() into parity with model.get()
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[]
2016-06-17T15:17:10
2016-06-17T15:20:17
2016-06-17T15:20:17
CONTRIBUTOR
null
implements https://github.com/keredson/peewee/issues/3 / https://github.com/coleifer/peewee/issues/993
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/994/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/994/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/994", "html_url": "https://github.com/coleifer/peewee/pull/994", "diff_url": "https://github.com/coleifer/peewee/pull/994.diff", "patch_url": "https://github.com/coleifer/peewee/pull/994.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/993
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/993/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/993/comments
https://api.github.com/repos/coleifer/peewee/issues/993/events
https://github.com/coleifer/peewee/issues/993
160,911,945
MDU6SXNzdWUxNjA5MTE5NDU=
993
bring select.get() into parity with model.get()
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "I would appreciate it if you respected my request that you not post things on my project.\n\nYou have your own fork, please use it.\n", "i'm sorry, but you don't own github. i'm allowed to discuss this project with other users/devs (just like anyone else). you don't have to be involved in that discussion.\n", ...
2016-06-17T15:16:57
2016-06-18T01:05:09
2016-06-17T15:20:24
CONTRIBUTOR
null
currently this is allowed: ``` python u = User.get(User.id==1) ``` and this is allowed ``` python u = User.select().where(User.id==1).get() ``` but this is not: ``` python u = User.select().get(User.id==1) ``` i suggest we impl the last option. (ie make it identical to the middle option just like the first optio...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/993/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/993/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/992
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/992/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/992/comments
https://api.github.com/repos/coleifer/peewee/issues/992/events
https://github.com/coleifer/peewee/issues/992
160,880,273
MDU6SXNzdWUxNjA4ODAyNzM=
992
djpeewee has no support for Field.db_column
{ "login": "nschagen", "id": 439159, "node_id": "MDQ6VXNlcjQzOTE1OQ==", "avatar_url": "https://avatars.githubusercontent.com/u/439159?v=4", "gravatar_id": "", "url": "https://api.github.com/users/nschagen", "html_url": "https://github.com/nschagen", "followers_url": "https://api.github.com/users/nschage...
[]
closed
false
null
[]
null
[]
2016-06-17T12:46:19
2016-06-23T03:23:43
2016-06-23T03:23:43
NONE
null
Hi, I would like to use PeeWee in an existing django project to run analytics queries. I tried it in the Django shell, but the queries failed because my model contained a field whose name did not match the actual database column name. This is because I am using `Field.db_column` for many fields. I'm using 2.8.1. It w...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/992/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/992/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/991
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/991/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/991/comments
https://api.github.com/repos/coleifer/peewee/issues/991/events
https://github.com/coleifer/peewee/pull/991
160,749,320
MDExOlB1bGxSZXF1ZXN0NzQxNDM2MDE=
991
Convert readthedocs links for their .org -> .io migration for hosted projects
{ "login": "adamchainz", "id": 857609, "node_id": "MDQ6VXNlcjg1NzYwOQ==", "avatar_url": "https://avatars.githubusercontent.com/u/857609?v=4", "gravatar_id": "", "url": "https://api.github.com/users/adamchainz", "html_url": "https://github.com/adamchainz", "followers_url": "https://api.github.com/users/a...
[]
closed
false
null
[]
null
[]
2016-06-16T20:08:28
2016-06-16T21:27:07
2016-06-16T21:27:07
CONTRIBUTOR
null
As per [their blog post of the 27th April](https://blog.readthedocs.com/securing-subdomains/) ‘Securing subdomains’: > Starting today, Read the Docs will start hosting projects from subdomains on the domain readthedocs.io, instead of on readthedocs.org. This change addresses some security concerns around site cookies ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/991/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/991/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/991", "html_url": "https://github.com/coleifer/peewee/pull/991", "diff_url": "https://github.com/coleifer/peewee/pull/991.diff", "patch_url": "https://github.com/coleifer/peewee/pull/991.patch", "merged_at": "2016-06-16T21:27:07" }
https://api.github.com/repos/coleifer/peewee/issues/990
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/990/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/990/comments
https://api.github.com/repos/coleifer/peewee/issues/990/events
https://github.com/coleifer/peewee/issues/990
160,745,063
MDU6SXNzdWUxNjA3NDUwNjM=
990
Zip argument #2 must support iteration for pk_row
{ "login": "leerobert", "id": 6231418, "node_id": "MDQ6VXNlcjYyMzE0MTg=", "avatar_url": "https://avatars.githubusercontent.com/u/6231418?v=4", "gravatar_id": "", "url": "https://api.github.com/users/leerobert", "html_url": "https://github.com/leerobert", "followers_url": "https://api.github.com/users/le...
[]
closed
false
null
[]
null
[ "That's very odd. So peewee is expecting to get back the primary key, and since Postgres supports the \"RETURNING\" clause, peewee says \"INSERT INTO my_table (cola, colb, colc) VALUES (vala, valb, valc) RETURNING primary_key\".\n\nFor whatever reason, it appears that the database cursor is not returning anything.\...
2016-06-16T19:50:45
2017-02-15T15:39:15
2016-07-14T09:06:34
NONE
null
I cannot figure out this issue for the life of me. On my test database, created primarily by the ORM create_table routines I do not experience this issue. When I deploy the tables to our production database and other users write partitions that listen to one of the ORM databases this issue occurs. # Models ``` python ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/990/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/990/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/989
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/989/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/989/comments
https://api.github.com/repos/coleifer/peewee/issues/989/events
https://github.com/coleifer/peewee/issues/989
160,436,407
MDU6SXNzdWUxNjA0MzY0MDc=
989
Index Creation in Postgresql, create_indexes
{ "login": "mlag", "id": 2061960, "node_id": "MDQ6VXNlcjIwNjE5NjA=", "avatar_url": "https://avatars.githubusercontent.com/u/2061960?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mlag", "html_url": "https://github.com/mlag", "followers_url": "https://api.github.com/users/mlag/followers", ...
[]
closed
false
null
[]
null
[ "I think the \"first version\" you referred to is missing from the comment. I see your table definition and that calling `db.create_indexes()` creates the indexes, but not the part that may not have been working?\n", "Sorry, nevermind.\nAfter having unrelatedly restarted postgres, it works.\nWhat I meant was, tha...
2016-06-15T14:28:47
2016-06-15T19:00:39
2016-06-15T18:29:05
NONE
null
The first version doesn't work, i.e. creates the table but fails to create an index in postgresql. ``` db = PostgresqlDatabase() class TestTable(Model): class Meta: database = db id = PrimaryKeyField() name = CharField(index=True) ``` whereas the following works: `db.create_indexes(TestTable, ['na...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/989/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/989/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/988
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/988/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/988/comments
https://api.github.com/repos/coleifer/peewee/issues/988/events
https://github.com/coleifer/peewee/pull/988
160,425,614
MDExOlB1bGxSZXF1ZXN0NzM5MTM3NjA=
988
Add mention in the doc about calling order_by() without argument to remove the ORDER BY clause.
{ "login": "yohanboniface", "id": 146023, "node_id": "MDQ6VXNlcjE0NjAyMw==", "avatar_url": "https://avatars.githubusercontent.com/u/146023?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yohanboniface", "html_url": "https://github.com/yohanboniface", "followers_url": "https://api.github.co...
[]
closed
false
null
[]
null
[ "I've committed a fix for this, thanks for bringing it to my attention!\n" ]
2016-06-15T13:44:14
2016-06-17T15:23:37
2016-06-17T15:23:36
CONTRIBUTOR
null
Note: my first attempt was to call `order_by(None)`. Would you mind a PR to allow also this signature?
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/988/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/988/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/988", "html_url": "https://github.com/coleifer/peewee/pull/988", "diff_url": "https://github.com/coleifer/peewee/pull/988.diff", "patch_url": "https://github.com/coleifer/peewee/pull/988.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/987
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/987/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/987/comments
https://api.github.com/repos/coleifer/peewee/issues/987/events
https://github.com/coleifer/peewee/issues/987
160,409,214
MDU6SXNzdWUxNjA0MDkyMTQ=
987
Join multiple foreign keys to the same model
{ "login": "rudyryk", "id": 4500, "node_id": "MDQ6VXNlcjQ1MDA=", "avatar_url": "https://avatars.githubusercontent.com/u/4500?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rudyryk", "html_url": "https://github.com/rudyryk", "followers_url": "https://api.github.com/users/rudyryk/followers"...
[]
closed
false
null
[]
null
[ "Aha!\n\nIt seems like we can use `alias()` to resolve \"conflicts\":\n\n``` python\nuser_a = User.alias()\nuser_b = User.alias()\n\nquery = (Match.select(Match, user_a, user_b)\n .join(user_a, on=Match.user_a)\n .switch(Match)\n .join(user_b, on=Match.user_b)\n .where((Match.user_a == user) | (Match.us...
2016-06-15T12:24:42
2016-06-15T14:34:22
2016-06-15T14:34:22
NONE
null
Consider the `Match` model: ``` python class Match(peewee.Model): user_a = peewee.ForeignKeyField(User, index=True, related_name='matches_a') user_b = peewee.ForeignKeyField(User, index=True, related_name='matches_b') ``` How can we perfo...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/987/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/987/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/985
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/985/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/985/comments
https://api.github.com/repos/coleifer/peewee/issues/985/events
https://github.com/coleifer/peewee/issues/985
160,379,451
MDU6SXNzdWUxNjAzNzk0NTE=
985
Requesting item [-1] on the result of select() raises an error.
{ "login": "HughMacdonald", "id": 625512, "node_id": "MDQ6VXNlcjYyNTUxMg==", "avatar_url": "https://avatars.githubusercontent.com/u/625512?v=4", "gravatar_id": "", "url": "https://api.github.com/users/HughMacdonald", "html_url": "https://github.com/HughMacdonald", "followers_url": "https://api.github.co...
[]
closed
false
null
[]
null
[ "Originally this is a design decision I borrowed from Django's ORM. I believe the idea is to that the API should reinforce the concept that the query result wrapper is not a list, and should not be treated as such. That said, I can see how this might cause confusion since the other `__getitem__` behaviors are avail...
2016-06-15T09:39:24
2016-06-15T14:18:43
2016-06-15T14:06:09
NONE
null
I've found something that may or may not be considered an issue, but standard python conventions don't work. If I do: ``` items = MyTable.select() myItem = items[-1] ``` I get: ``` python [code]Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/site-packages/pe...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/985/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/985/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/984
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/984/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/984/comments
https://api.github.com/repos/coleifer/peewee/issues/984/events
https://github.com/coleifer/peewee/issues/984
160,323,359
MDU6SXNzdWUxNjAzMjMzNTk=
984
peewee 2.8.1 blob error
{ "login": "rfyiamcool", "id": 3785409, "node_id": "MDQ6VXNlcjM3ODU0MDk=", "avatar_url": "https://avatars.githubusercontent.com/u/3785409?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rfyiamcool", "html_url": "https://github.com/rfyiamcool", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "So this error indicates that the `mysql` Python driver is not installed or is not import-able. Here is the code peewee executes at the top of the module:\n\n``` python\ntry:\n import MySQLdb as mysql # prefer the C module.\nexcept ImportError:\n try:\n import pymysql as mysql\n except ImportError:...
2016-06-15T02:02:59
2016-06-15T19:10:55
2016-06-15T19:10:55
NONE
null
in peewee 2.8.1 , use BlobField() raise error . my peewee model example: ``` class ArticleContent(Model): article_id = IntegerField() content = BlobField() class Meta: database = db db_table= 'mirro_article_content' ``` error: ``` [operation@wx-buzz-zhihu2 extractor_mirro]$ python core...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/984/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/984/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/983
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/983/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/983/comments
https://api.github.com/repos/coleifer/peewee/issues/983/events
https://github.com/coleifer/peewee/issues/983
160,129,687
MDU6SXNzdWUxNjAxMjk2ODc=
983
Extra `t2` while generating query
{ "login": "blueset", "id": 553831, "node_id": "MDQ6VXNlcjU1MzgzMQ==", "avatar_url": "https://avatars.githubusercontent.com/u/553831?v=4", "gravatar_id": "", "url": "https://api.github.com/users/blueset", "html_url": "https://github.com/blueset", "followers_url": "https://api.github.com/users/blueset/fo...
[]
closed
false
null
[]
null
[ "q = MsgLog.select().where(MsgLog.master_msg_id.startswith(\"%s.\" % chat_id)).order_by(MsgLog.id.desc())\n\nThe problem is you're ordering by MsgLog.id but MsgLog.master_msg_id is the primary key and the model (while it has an \"id\" attribute), does not consider it a valid field.\n\nTo fix this, just change your ...
2016-06-14T08:56:13
2016-07-14T14:41:51
2016-07-14T14:41:51
NONE
null
# Model ``` python class MsgLog(Model): master_msg_id = CharField(unique=True, primary_key=True) text = CharField() slave_origin_uid = CharField() slave_origin_display_name = CharField(null=True) slave_member_uid = CharField(null=True) slave_member_display_name = CharField(null=True) msg_ty...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/983/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/983/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/982
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/982/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/982/comments
https://api.github.com/repos/coleifer/peewee/issues/982/events
https://github.com/coleifer/peewee/pull/982
160,059,076
MDExOlB1bGxSZXF1ZXN0NzM2NTM2NjA=
982
Prevent the silent overwriting of model's attributes e.g. "foo_id" when "foo" foreign key added
{ "login": "quantumdark", "id": 12005883, "node_id": "MDQ6VXNlcjEyMDA1ODgz", "avatar_url": "https://avatars.githubusercontent.com/u/12005883?v=4", "gravatar_id": "", "url": "https://api.github.com/users/quantumdark", "html_url": "https://github.com/quantumdark", "followers_url": "https://api.github.com/...
[]
closed
false
null
[]
null
[ "I'm kind of curious what kind of model structure you'd have to have to run into this kind of thing... I understand that there may be a bug here, but I'm not sure how you would actually encounter it in practice?\n", "I run into it not only once, last time we had save parameters from external API call in the model...
2016-06-13T22:28:35
2016-07-14T08:58:51
2016-07-14T08:58:51
NONE
null
In complex structures with a large number of fields easy to miss the collision, especially if it happened with parrent's model attribute. Considering that the python dict doesn't guarantee the order of items, there are two possibilities: 1. The *_id attr will be overwritten by ObjectIdDescriptor and will no longer avai...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/982/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/982/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/982", "html_url": "https://github.com/coleifer/peewee/pull/982", "diff_url": "https://github.com/coleifer/peewee/pull/982.diff", "patch_url": "https://github.com/coleifer/peewee/pull/982.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/981
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/981/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/981/comments
https://api.github.com/repos/coleifer/peewee/issues/981/events
https://github.com/coleifer/peewee/issues/981
160,054,405
MDU6SXNzdWUxNjAwNTQ0MDU=
981
Column.in_() should allow a set
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ ":+1: thanks!\n" ]
2016-06-13T21:57:56
2016-06-23T01:27:26
2016-06-14T05:22:51
CONTRIBUTOR
null
currently you have to convert the set to a list, which isn't hard, but it should also just accept the set directly.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/981/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/981/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/980
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/980/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/980/comments
https://api.github.com/repos/coleifer/peewee/issues/980/events
https://github.com/coleifer/peewee/issues/980
160,040,587
MDU6SXNzdWUxNjAwNDA1ODc=
980
calling len() on a query should do a database count() rather than load the whole result set into memory
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "so i have a feeling that i'm going to get a response along the lines of \"we preload all the data in case the user wants to access/use it later\", similar to the rationale given for why `first()` doesn't use a `limit 1`. i just would like to point out that both of these are directly counter to the stated \"peewee...
2016-06-13T20:44:09
2016-06-19T19:19:13
2016-06-13T21:57:55
CONTRIBUTOR
null
currently calling `len()` on a query loads all the records from the database, and then calls `len()` on the resulting list of objects. this is hugely sub-optimal. in most instances (ie if it hasn't already been cached, etc.) using `count()` on the database would be both the expected behavior and much more efficient. ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/980/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/980/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/978
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/978/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/978/comments
https://api.github.com/repos/coleifer/peewee/issues/978/events
https://github.com/coleifer/peewee/issues/978
159,983,880
MDU6SXNzdWUxNTk5ODM4ODA=
978
should prefetches all happen inside a transaction?
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "That all would depend on your databases default isolation level. Also recall please how, as a general rule, peewee doesn't use magic or do things based on what it \"thinks\" you might want. You have the tools to do your prefetching in an atomic block. If you always want this behavior, write a wrapper.\n", "> Tha...
2016-06-13T15:52:58
2016-06-13T22:13:42
2016-06-13T17:16:25
CONTRIBUTOR
null
i would argue they should, as otherwise there is no guarantee we're getting a read-consistent view of the data. seems like a simple fix on the face, given that peewee can already handle nesting `atomic()`.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/978/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/978/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/977
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/977/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/977/comments
https://api.github.com/repos/coleifer/peewee/issues/977/events
https://github.com/coleifer/peewee/issues/977
159,971,931
MDU6SXNzdWUxNTk5NzE5MzE=
977
aliasing a FK prevents related objects from being populated
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "Why put an alias on the column when specifying the `on` column? Seems like a pretty contrived example unless I'm misunderstanding how this applies to a larger class of bugs?\n", "It's only contrived because I simplified it to the smallest possible example for the purpose of the bug report. I hit it by accident ...
2016-06-13T15:02:32
2016-06-13T22:01:39
2016-06-13T21:51:37
CONTRIBUTOR
null
aliasing a FK prevents related objects from being populated, which causes O(n) queries. ``` python class Person(pw.Model): name = pw.CharField() class Article(pw.Model): title = pw.CharField() author = pw.ForeignKeyField(db_column='author_id', rel_model=Person, to_field='id') derek = Person.create(name='Derek'...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/977/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/977/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/976
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/976/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/976/comments
https://api.github.com/repos/coleifer/peewee/issues/976/events
https://github.com/coleifer/peewee/issues/976
159,753,925
MDU6SXNzdWUxNTk3NTM5MjU=
976
exception when cloning a FK
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[]
2016-06-11T03:52:22
2016-06-11T04:38:32
2016-06-11T04:38:32
CONTRIBUTOR
null
ran into this today... ``` python class Post(pw.Model): title = pw.CharField() author = pw.ForeignKeyField(Person) Post.author.alias('derek').clone() ``` throws: ``` Traceback (most recent call last): File "test.py", line 30, in <module> Post.author.alias('derek').clone() File "/home/derek/projects/cole...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/976/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/976/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/975
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/975/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/975/comments
https://api.github.com/repos/coleifer/peewee/issues/975/events
https://github.com/coleifer/peewee/issues/975
159,208,354
MDU6SXNzdWUxNTkyMDgzNTQ=
975
Additive order_by
{ "login": "josefdlange", "id": 1062835, "node_id": "MDQ6VXNlcjEwNjI4MzU=", "avatar_url": "https://avatars.githubusercontent.com/u/1062835?v=4", "gravatar_id": "", "url": "https://api.github.com/users/josefdlange", "html_url": "https://github.com/josefdlange", "followers_url": "https://api.github.com/us...
[]
closed
false
null
[]
null
[ "> Maybe we could toss in a extend=False kwarg to the method that\n\ni can see the use, but a definite +1 on not changing the default behavior if this is done.\n", "Of course. Default behavior is critical, especially when considering that this is likely a heavily-used feature of the ORM.\n" ]
2016-06-08T16:17:40
2016-06-09T02:11:16
2016-06-09T02:11:16
CONTRIBUTOR
null
Spent a few hours debugging something in a query only to find that the implementation of `order_by` on `SelectQuery` is: ``` @returns_clone def order_by(self, *args): self._order_by = list(args) ``` This means that if one was composing a query based on a number of inputs (of which more than one might affect order...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/975/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/975/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/974
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/974/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/974/comments
https://api.github.com/repos/coleifer/peewee/issues/974/events
https://github.com/coleifer/peewee/pull/974
159,028,748
MDExOlB1bGxSZXF1ZXN0NzI5NTE0ODM=
974
Test case for RowID + insert_many bug
{ "login": "jberkel", "id": 18891, "node_id": "MDQ6VXNlcjE4ODkx", "avatar_url": "https://avatars.githubusercontent.com/u/18891?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jberkel", "html_url": "https://github.com/jberkel", "followers_url": "https://api.github.com/users/jberkel/follower...
[]
closed
false
null
[]
null
[ "There's some chicanery going on with Peewee in regards to implementing the `rowid` field. I'll take another look at the implementation and see if I can clean it up.\n", "Thanks! Yes, the field gets removed here: \nhttps://github.com/coleifer/peewee/blob/master/playhouse/sqlite_ext.py#L90\n\nDo extension tests no...
2016-06-07T21:27:14
2016-06-09T20:15:19
2016-06-09T13:42:55
CONTRIBUTOR
null
This is the problem I mentioned in #971. Not sure how to fix this properly, for now just added a bunch of tests to document the problem. The first two tests pass, only the last one fails. ``` Traceback (most recent call last): File "/Users/jan/projects/peewee/playhouse/tests/test_sqlite_ext.py", line 818, in test_in...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/974/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/974/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/974", "html_url": "https://github.com/coleifer/peewee/pull/974", "diff_url": "https://github.com/coleifer/peewee/pull/974.diff", "patch_url": "https://github.com/coleifer/peewee/pull/974.patch", "merged_at": "2016-06-09T13:42:55" }
https://api.github.com/repos/coleifer/peewee/issues/973
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/973/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/973/comments
https://api.github.com/repos/coleifer/peewee/issues/973/events
https://github.com/coleifer/peewee/pull/973
159,015,916
MDExOlB1bGxSZXF1ZXN0NzI5NDE5MzY=
973
Impl custom alias names
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "Oof...this implementation feels very fragile and hacky, and I don't think the extra lines of code are worth the feature of being able to specify an alias name.\n\nGoing to pass on this for now. The 3.0 stuff I'm working on can do this as a matter of course, so it'll land then.\n", "+1 on it for the rewrite. inc...
2016-06-07T20:24:05
2016-06-07T20:45:09
2016-06-07T20:39:15
CONTRIBUTOR
null
implements https://github.com/coleifer/peewee/issues/972
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/973/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/973/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/973", "html_url": "https://github.com/coleifer/peewee/pull/973", "diff_url": "https://github.com/coleifer/peewee/pull/973.diff", "patch_url": "https://github.com/coleifer/peewee/pull/973.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/972
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/972/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/972/comments
https://api.github.com/repos/coleifer/peewee/issues/972/events
https://github.com/coleifer/peewee/issues/972
159,015,854
MDU6SXNzdWUxNTkwMTU4NTQ=
972
allow the user to specify the table alias name
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "In rewriting the SQL generation, I've got this feature covered. The implementation of this in peewee 2.8 just feels a bit too hacky to me to want to merge.\n" ]
2016-06-07T20:23:41
2016-06-07T20:40:04
2016-06-07T20:39:23
CONTRIBUTOR
null
currently this: ``` python UA = User.alias() UA.select().where(UA.username=='derek') ``` generates this: ``` sql SELECT "t1"."id", "t1"."username" FROM "users" AS t1 WHERE ("t1"."username" = ?) ``` we should allow the user to optionally specify the table alias. example: ``` python UA = User.alias('u1') UA.select(...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/972/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/972/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/971
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/971/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/971/comments
https://api.github.com/repos/coleifer/peewee/issues/971/events
https://github.com/coleifer/peewee/pull/971
159,007,772
MDExOlB1bGxSZXF1ZXN0NzI5MzU5NDA=
971
insert_many: pass on `validate_fields` parameter
{ "login": "jberkel", "id": 18891, "node_id": "MDQ6VXNlcjE4ODkx", "avatar_url": "https://avatars.githubusercontent.com/u/18891?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jberkel", "html_url": "https://github.com/jberkel", "followers_url": "https://api.github.com/users/jberkel/follower...
[]
closed
false
null
[]
null
[ "I came across this while trying to work around another bug (insert_many + FTS5). Will follow up with another PR.\n", "Awesome catch, thank you!\n" ]
2016-06-07T19:44:14
2016-06-07T20:36:42
2016-06-07T20:36:42
CONTRIBUTOR
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/971/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/971/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/971", "html_url": "https://github.com/coleifer/peewee/pull/971", "diff_url": "https://github.com/coleifer/peewee/pull/971.diff", "patch_url": "https://github.com/coleifer/peewee/pull/971.patch", "merged_at": "2016-06-07T20:36:42" }
https://api.github.com/repos/coleifer/peewee/issues/970
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/970/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/970/comments
https://api.github.com/repos/coleifer/peewee/issues/970/events
https://github.com/coleifer/peewee/pull/970
158,985,438
MDExOlB1bGxSZXF1ZXN0NzI5MTk5MDI=
970
Infer alias when only one interpretation
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[]
2016-06-07T17:56:27
2016-06-07T19:11:09
2016-06-07T19:11:09
CONTRIBUTOR
null
likewise for the alias matching version of that same basic code change for https://github.com/coleifer/peewee/issues/965 not that this is now valid: ``` python User.alias().select().where(User.username=='charlie') ``` but this is still not: ``` python User.alias().select().join(User.alias(), on=User.username=='char...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/970/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/970/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/970", "html_url": "https://github.com/coleifer/peewee/pull/970", "diff_url": "https://github.com/coleifer/peewee/pull/970.diff", "patch_url": "https://github.com/coleifer/peewee/pull/970.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/969
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/969/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/969/comments
https://api.github.com/repos/coleifer/peewee/issues/969/events
https://github.com/coleifer/peewee/pull/969
158,967,859
MDExOlB1bGxSZXF1ZXN0NzI5MDcyNDA=
969
Throw error no alias
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "Thanks for sharing the changes. Closing as wontfix per earlier discussion.\n" ]
2016-06-07T16:30:01
2016-06-07T17:43:49
2016-06-07T17:43:49
CONTRIBUTOR
null
for https://github.com/coleifer/peewee/issues/964. i know you said no interest, but logging here anyway since i was doing it for my own fork regardless. the `_join` wound up being unnecessary as far as i can tell. i couldn't find a path in which it didn't hit the alias_map. also added a unit test for your concat co...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/969/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/969/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/969", "html_url": "https://github.com/coleifer/peewee/pull/969", "diff_url": "https://github.com/coleifer/peewee/pull/969.diff", "patch_url": "https://github.com/coleifer/peewee/pull/969.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/968
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/968/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/968/comments
https://api.github.com/repos/coleifer/peewee/issues/968/events
https://github.com/coleifer/peewee/issues/968
158,963,978
MDU6SXNzdWUxNTg5NjM5Nzg=
968
pwiz generates invalid model name for tables starting with numbers
{ "login": "kennes913", "id": 7109431, "node_id": "MDQ6VXNlcjcxMDk0MzE=", "avatar_url": "https://avatars.githubusercontent.com/u/7109431?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kennes913", "html_url": "https://github.com/kennes913", "followers_url": "https://api.github.com/users/ke...
[]
closed
false
null
[]
null
[]
2016-06-07T16:12:19
2016-06-07T19:15:25
2016-06-07T19:15:25
NONE
null
Modified copy-paste of process to produce error: ``` $ python -m pwiz -e mysql XXXXX -H XXXXX -P -u dbadmin -t 1337_table > db_models.py Password: $ python Python 3.5.1 (v3.5.1:37a07cee5969, Dec 5 2015, 21:12:44) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/968/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/968/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/967
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/967/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/967/comments
https://api.github.com/repos/coleifer/peewee/issues/967/events
https://github.com/coleifer/peewee/issues/967
158,859,125
MDU6SXNzdWUxNTg4NTkxMjU=
967
primary_key on sqlite seems to make table not saveable
{ "login": "daveselinger", "id": 10235862, "node_id": "MDQ6VXNlcjEwMjM1ODYy", "avatar_url": "https://avatars.githubusercontent.com/u/10235862?v=4", "gravatar_id": "", "url": "https://api.github.com/users/daveselinger", "html_url": "https://github.com/daveselinger", "followers_url": "https://api.github.c...
[]
closed
false
null
[]
null
[ "force_insert=True\n" ]
2016-06-07T07:42:13
2016-06-07T07:48:27
2016-06-07T07:48:27
NONE
null
Potentially related to my other issue log. I've found that if I set a column to primary_key=true (I've tried this on a CHAR and UUID columns), I don't get any errors, but the "save()" method returns 0: class SimpleTest(BaseModel): name = CharField(primary_key=True) name2 = CharField() simple = SimpleTest(name="Ch...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/967/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/967/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/966
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/966/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/966/comments
https://api.github.com/repos/coleifer/peewee/issues/966/events
https://github.com/coleifer/peewee/issues/966
158,858,631
MDU6SXNzdWUxNTg4NTg2MzE=
966
primary_key as only column on sqlite
{ "login": "daveselinger", "id": 10235862, "node_id": "MDQ6VXNlcjEwMjM1ODYy", "avatar_url": "https://avatars.githubusercontent.com/u/10235862?v=4", "gravatar_id": "", "url": "https://api.github.com/users/daveselinger", "html_url": "https://github.com/daveselinger", "followers_url": "https://api.github.c...
[]
closed
false
null
[]
null
[ "force_insert=True\nThe logging helped a ton--didn't find that till I looked at https://github.com/coleifer/peewee/issues/961 but super helpful.\n\nThx.\n" ]
2016-06-07T07:39:14
2016-06-07T07:54:22
2016-06-07T07:54:22
NONE
null
Hey there--great library, btw. I'm running into a couple of issues (working directly on head/master): 1. A table with only a primary key as the sole field: class SimpleTest(BaseModel): name = CharField(primary_key=True) When I call: simple = SimpleTest(name="Charlie") print("Saving %d simples" % simple.save())...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/966/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/966/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/965
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/965/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/965/comments
https://api.github.com/repos/coleifer/peewee/issues/965/events
https://github.com/coleifer/peewee/issues/965
158,757,855
MDU6SXNzdWUxNTg3NTc4NTU=
965
peewee can infer alias references where the inference is unambiguous
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "Aliased models are frequently used with correlated subqueries, making the possibility of inferring the correct thing to do quite a bit more complicated than it might seem.\n\nPhilosophically, I'm opposed to adding _any_ heuristics into `peewee`. Peewee is incredibly easy to understand because it does what you tell...
2016-06-06T19:42:20
2016-06-07T16:24:31
2016-06-07T02:18:33
CONTRIBUTOR
null
code like: ``` python Post.alias().select().where(Post.title=='something').get() ``` gens: ``` sql SELECT "t1"."id", "t1"."title", "t1"."author_id" FROM "post" AS t1 WHERE ("t2"."title" = ?) LIMIT 1 OFFSET 0 ``` which throws an exception because the conditional isn't using the alias as a reference. i know the offi...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/965/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/965/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/963
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/963/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/963/comments
https://api.github.com/repos/coleifer/peewee/issues/963/events
https://github.com/coleifer/peewee/issues/963
158,710,910
MDU6SXNzdWUxNTg3MTA5MTA=
963
why does prefetch load results into related_name_prefetch instead of just related_name?
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "This gets into a little bit of a gray area... I'm mainly opposed to stomping on the backref descriptor. Using `related_name_prefetch` isn't the greatest solution, but it's a convention that's been established by the documentation. Adding the ability to specify an alias to use for the prefetched objects seems like ...
2016-06-06T15:49:32
2016-06-07T17:42:25
2016-06-07T01:56:06
CONTRIBUTOR
null
I've looked through the documentation and I can't find anything mentioning why. Just that it does. I can imagine it's because `related_name_prefetch` is a list whereas `related_name` is a `SelectQuery`, and generally it would be unwise to have two different object types returned in the same instance variable. But do...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/963/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/963/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/962
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/962/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/962/comments
https://api.github.com/repos/coleifer/peewee/issues/962/events
https://github.com/coleifer/peewee/pull/962
158,412,922
MDExOlB1bGxSZXF1ZXN0NzI1Mzk3MDE=
962
Get should throw exception if not unique
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "I've commented already that the semantics of get() are not going to change, so I will pass on this change.\n", "3.0 man, 3.0! :-)\n", "It's not changing in 3.0 either man.\n" ]
2016-06-03T17:13:24
2016-06-03T20:19:46
2016-06-03T17:35:51
CONTRIBUTOR
null
again, behavior changing, so not for any point release, but hopefully some future incantation. re: https://github.com/coleifer/peewee/issues/958
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/962/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/962/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/962", "html_url": "https://github.com/coleifer/peewee/pull/962", "diff_url": "https://github.com/coleifer/peewee/pull/962.diff", "patch_url": "https://github.com/coleifer/peewee/pull/962.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/961
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/961/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/961/comments
https://api.github.com/repos/coleifer/peewee/issues/961/events
https://github.com/coleifer/peewee/issues/961
158,412,504
MDU6SXNzdWUxNTg0MTI1MDQ=
961
Problem with MySQL connections
{ "login": "felipevolpone", "id": 1590527, "node_id": "MDQ6VXNlcjE1OTA1Mjc=", "avatar_url": "https://avatars.githubusercontent.com/u/1590527?v=4", "gravatar_id": "", "url": "https://api.github.com/users/felipevolpone", "html_url": "https://github.com/felipevolpone", "followers_url": "https://api.github....
[]
closed
false
null
[]
null
[ "Weird..have you tried enabling the peewee logger and adding logging statements around your db connect/close code? That might help diagnose where things are going wrong.\n\nYou can enable the peewee debugger by following these instructions: http://docs.peewee-orm.com/en/latest/peewee/database.html#logging-queries\n...
2016-06-03T17:10:56
2016-12-07T21:40:24
2016-06-07T13:32:16
NONE
null
Hey guys, I've been facing a problem with peewee in the last days. I'm getting these errors: "Lost connection to MySQL server during query" and "MySQL server has gone away". The problem happens after the timeout time configured on MySQL, I changed it to 120 seconds to test faster. This is my scenario: I run the serve...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/961/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/961/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/960
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/960/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/960/comments
https://api.github.com/repos/coleifer/peewee/issues/960/events
https://github.com/coleifer/peewee/pull/960
158,384,634
MDExOlB1bGxSZXF1ZXN0NzI1MTkzMTY=
960
First limit 1
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "I'd like to preserve the behavior where multiple calls to `first()` does not yield multiple queries. I _do_ agree, though, that there is benefit in applying a limit and that a second `peek()` method might more correctly. I've gone ahead and implemented this in a separate patch. You can compare notes to see how I'v...
2016-06-03T14:49:42
2016-06-03T17:18:08
2016-06-03T16:34:11
CONTRIBUTOR
null
for possible future inclusion (not 2.8.2) regarding https://github.com/coleifer/peewee/issues/959 or if anyone else wants to pull it into their forks.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/960/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/960/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/960", "html_url": "https://github.com/coleifer/peewee/pull/960", "diff_url": "https://github.com/coleifer/peewee/pull/960.diff", "patch_url": "https://github.com/coleifer/peewee/pull/960.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/958
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/958/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/958/comments
https://api.github.com/repos/coleifer/peewee/issues/958/events
https://github.com/coleifer/peewee/issues/958
158,278,165
MDU6SXNzdWUxNTgyNzgxNjU=
958
get() should throw an error if more than one row exists
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "Sorry but that has always been a design decision I've liked, and I'm not going to change it.\n", "This is documented anyways, did you even bother to read it?\n\nhttp://docs.peewee-orm.com/en/latest/peewee/api.html#Model.get\n", "just because the quirkiness of the API is documented doesn't mean there isn't room...
2016-06-03T02:19:41
2016-07-14T01:05:21
2016-06-03T02:34:32
CONTRIBUTOR
null
``` python import peewee as pw class Person(pw.Model): name = pw.CharField() class Meta: database = db alice = Person.create(name='Alice') alice2 = Person.create(name='Alice') print Person.get(Person.name=='Alice') ``` this generates the following SQL: ``` sql SELECT "t1"."id", "t1"."name" FROM "person" AS...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/958/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/958/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/957
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/957/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/957/comments
https://api.github.com/repos/coleifer/peewee/issues/957/events
https://github.com/coleifer/peewee/pull/957
158,208,878
MDExOlB1bGxSZXF1ZXN0NzIzOTUwNTM=
957
refactor _joins to use a defaultdict
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "hah! these unit tests are infuriating. not sure how to reproduce this locally. going to try some test commits...\n", "How is this any better? I'm going to pass.\n", "it's simpler and eliminates a class of bugs where one might forget to do the \"if (does this key exist?) append else set\" conditional check.\...
2016-06-02T18:31:07
2016-06-02T20:01:12
2016-06-02T19:46:11
CONTRIBUTOR
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/957/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/957/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/957", "html_url": "https://github.com/coleifer/peewee/pull/957", "diff_url": "https://github.com/coleifer/peewee/pull/957.diff", "patch_url": "https://github.com/coleifer/peewee/pull/957.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/956
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/956/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/956/comments
https://api.github.com/repos/coleifer/peewee/issues/956/events
https://github.com/coleifer/peewee/issues/956
158,207,384
MDU6SXNzdWUxNTgyMDczODQ=
956
unit test failures
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "This was fixed on May 20th, e4bd8e6cb04abc826143ac64dfd9ef1bc186f070\n", "ic, thanks.\n\ni'm still getting 4 failures in `playhouse.tests.test_extra_fields`:\n\n```\n======================================================================\nERROR: test_valid_password (playhouse.tests.test_extra_fields.TestPasswordF...
2016-06-02T18:24:03
2016-06-03T01:56:02
2016-06-02T19:44:16
CONTRIBUTOR
null
i keep getting semi-random failures in the test suite. example: ``` ====================================================================== ERROR: test_array_iterables (playhouse.tests.test_postgres.TestArrayField) ---------------------------------------------------------------------- Traceback (most recent call last)...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/956/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/956/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/955
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/955/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/955/comments
https://api.github.com/repos/coleifer/peewee/issues/955/events
https://github.com/coleifer/peewee/issues/955
158,046,561
MDU6SXNzdWUxNTgwNDY1NjE=
955
Support MySQL 5.7 JSON data type
{ "login": "ibushong", "id": 9298422, "node_id": "MDQ6VXNlcjkyOTg0MjI=", "avatar_url": "https://avatars.githubusercontent.com/u/9298422?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ibushong", "html_url": "https://github.com/ibushong", "followers_url": "https://api.github.com/users/ibush...
[]
closed
false
null
[]
null
[ "No plans on my part, but I would be willing to accept a patch that implemented it somewhat along the same lines as the `postgres_ext` or `sqlite_ext` playhouse modules.\n" ]
2016-06-02T02:25:16
2016-06-02T12:38:24
2016-06-02T12:38:24
NONE
null
Is there plan to support the [JSON](https://dev.mysql.com/doc/refman/5.7/en/json.html) data type introduced in MySQL 5.7?
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/955/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/955/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/954
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/954/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/954/comments
https://api.github.com/repos/coleifer/peewee/issues/954/events
https://github.com/coleifer/peewee/issues/954
157,977,771
MDU6SXNzdWUxNTc5Nzc3NzE=
954
Can not use PickledField with database proxy
{ "login": "alexpantyukhin", "id": 6513121, "node_id": "MDQ6VXNlcjY1MTMxMjE=", "avatar_url": "https://avatars.githubusercontent.com/u/6513121?v=4", "gravatar_id": "", "url": "https://api.github.com/users/alexpantyukhin", "html_url": "https://github.com/alexpantyukhin", "followers_url": "https://api.gith...
[]
closed
false
null
[]
null
[ "Fixed in b2d52ba7973e6d980ed9efae36322c16e9fec074 see #933 \n" ]
2016-06-01T18:39:00
2016-06-01T20:19:18
2016-06-01T20:19:18
NONE
null
The following code raise an error ``` python from peewee import * from playhouse.fields import * database_proxy = Proxy() db = SqliteDatabase('test.db') class BaseModel(Model): class Meta: database = database_proxy class TestModel(BaseModel): data = PickledField() database_proxy.initialize(db) ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/954/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/954/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/953
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/953/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/953/comments
https://api.github.com/repos/coleifer/peewee/issues/953/events
https://github.com/coleifer/peewee/issues/953
157,968,300
MDU6SXNzdWUxNTc5NjgzMDA=
953
joining on two FKs to the same table doesn't work
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "You need to use a model alias. See the [querying docs -- using model aliases](http://docs.peewee-orm.com/en/latest/peewee/querying.html?highlight=modelalias#using-model-aliases)\n\n``` python\nAuthor = Person.alias()\nEditor = Person.alias()\nquery = (Post\n .select(Post, Author, Editor)\n .join(Au...
2016-06-01T17:53:25
2016-06-05T00:16:18
2016-06-01T19:38:57
CONTRIBUTOR
null
gens bad SQL: ``` python import logging, os import peewee as pw logger = logging.getLogger('peewee') logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler()) db_fn = 'example.db' if os.path.exists(db_fn): os.remove(db_fn) db = pw.SqliteDatabase(db_fn) class Person(pw.Model): name = pw.CharField()...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/953/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/953/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/952
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/952/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/952/comments
https://api.github.com/repos/coleifer/peewee/issues/952/events
https://github.com/coleifer/peewee/pull/952
157,949,627
MDExOlB1bGxSZXF1ZXN0NzIyMTA4NTk=
952
make genned table aliases more human-friendly
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "I'm going to pass on this one as well. Seems like a special-case that really isn't that special. If you want to see an example of a custom query compiler, check out the tests -- there is one that will use the table name instead of `t{\\d}`.\n", "this is just totally bizarre to me. why would you **prefer** meani...
2016-06-01T16:22:09
2017-05-17T04:46:12
2016-06-01T19:43:51
CONTRIBUTOR
null
instead of: `select t1.id from ledger_entry as t1` generate the alias from the table name: `select le1.id from ledger_entry as le1` where the alias is an acronym of the table name. makes it easier to read large joins w/ many tables. @coleifer unit tests not updated yet. i want to know if you're ok-with/opposed to t...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/952/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/952/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/952", "html_url": "https://github.com/coleifer/peewee/pull/952", "diff_url": "https://github.com/coleifer/peewee/pull/952.diff", "patch_url": "https://github.com/coleifer/peewee/pull/952.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/951
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/951/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/951/comments
https://api.github.com/repos/coleifer/peewee/issues/951/events
https://github.com/coleifer/peewee/pull/951
157,833,192
MDExOlB1bGxSZXF1ZXN0NzIxMjkyMDA=
951
workaround for issue 820
{ "login": "dhaase-de", "id": 12261985, "node_id": "MDQ6VXNlcjEyMjYxOTg1", "avatar_url": "https://avatars.githubusercontent.com/u/12261985?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dhaase-de", "html_url": "https://github.com/dhaase-de", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "Is this the right check? I had been operating on the assumption that if Cython was present but too old, that peewee would raise an exception.\n", "Yes, I believe this is the right check.\n\nCurrently, `peewee` can't even be installed under vanilla Debian 8 with Python 3.4.2 and Cython 0.21.1 installed:\n\n**via ...
2016-06-01T06:32:10
2016-06-02T12:32:04
2016-06-02T12:32:04
CONTRIBUTOR
null
For me, issue #820 wasn't really solved yet - I run Debian 8 (stable) on several machines, and it comes with Cython 0.21.1. Because I want to keep program versions on my machines in sync, I tend to not install newer versions manually. This commit proposes a workaround for issue #820 which disables Cython support for Cy...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/951/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/951/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/951", "html_url": "https://github.com/coleifer/peewee/pull/951", "diff_url": "https://github.com/coleifer/peewee/pull/951.diff", "patch_url": "https://github.com/coleifer/peewee/pull/951.patch", "merged_at": "2016-06-02T12:32:04" }
https://api.github.com/repos/coleifer/peewee/issues/950
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/950/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/950/comments
https://api.github.com/repos/coleifer/peewee/issues/950/events
https://github.com/coleifer/peewee/pull/950
157,791,517
MDExOlB1bGxSZXF1ZXN0NzIxMDA5NjY=
950
don't unnecessarily quote entities
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "Human-friendly? What the hell does that mean \n", "example: `select t1.id from posts as t1`\ninstead of: `select \"t1\".\"id\" from \"posts\" as \"t1\"`\n\nhelps esp. w/ longer queries. (obviously identifiers that need them would still be quoted.)\n", "I'd debate the merits of dropping the quotes...seems like...
2016-05-31T23:17:57
2017-05-17T04:40:22
2016-06-01T04:59:30
CONTRIBUTOR
null
as it makes the SQL not very human-friendly.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/950/reactions", "total_count": 3, "+1": 3, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/950/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/950", "html_url": "https://github.com/coleifer/peewee/pull/950", "diff_url": "https://github.com/coleifer/peewee/pull/950.diff", "patch_url": "https://github.com/coleifer/peewee/pull/950.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/949
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/949/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/949/comments
https://api.github.com/repos/coleifer/peewee/issues/949/events
https://github.com/coleifer/peewee/pull/949
157,770,053
MDExOlB1bGxSZXF1ZXN0NzIwODUzMzA=
949
make genned SQL easier on the eyes by removing unnecessary quotes (ex…
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "Just noting for posterity, this is a horrible suggestion because it requires:\r\n\r\n* The maintenance of a cross-vendor list of all SQL keywords to avoid invalid SQL (i.e. only quote names if they correspond to a SQL keyword)\r\n* Inspecting each named entity to see if it contains spaces or other characters that ...
2016-05-31T21:02:50
2017-05-17T04:40:53
2016-05-31T21:10:21
CONTRIBUTOR
null
…: `select id from posts` instead of `select "id" from "posts"`)
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/949/reactions", "total_count": 1, "+1": 0, "-1": 1, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/949/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/949", "html_url": "https://github.com/coleifer/peewee/pull/949", "diff_url": "https://github.com/coleifer/peewee/pull/949.diff", "patch_url": "https://github.com/coleifer/peewee/pull/949.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/948
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/948/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/948/comments
https://api.github.com/repos/coleifer/peewee/issues/948/events
https://github.com/coleifer/peewee/issues/948
157,719,643
MDU6SXNzdWUxNTc3MTk2NDM=
948
insert_many fails when inserting too many rows under Python 3.5.1
{ "login": "zweger", "id": 15678442, "node_id": "MDQ6VXNlcjE1Njc4NDQy", "avatar_url": "https://avatars.githubusercontent.com/u/15678442?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zweger", "html_url": "https://github.com/zweger", "followers_url": "https://api.github.com/users/zweger/fo...
[]
closed
false
null
[]
null
[ "Fortunately, if you run into this, it looks like pysqlite supports modifying the limit.\n- https://www.sqlite.org/limits.html#max_variable_number\n- https://www.sqlite.org/c3ref/limit.html\n- http://pysqlite.readthedocs.io/en/latest/sqlite3.html#sqlite3.Connection.set_limit\n\nSo in your peewee code, you could jus...
2016-05-31T16:53:30
2016-06-10T21:47:00
2016-05-31T19:00:22
NONE
null
It seems the underlying behavior of peewee.Model.insert_many differs when running under more modern versions of sqlite3 (and thus with more recent Python versions). Under older versions of SQLite, peewee's `insert_many` behavior is to insert one row per SQL statement. But under SQLite versions past 3.7.11.0, peewee wi...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/948/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 1, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/948/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/947
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/947/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/947/comments
https://api.github.com/repos/coleifer/peewee/issues/947/events
https://github.com/coleifer/peewee/issues/947
157,309,098
MDU6SXNzdWUxNTczMDkwOTg=
947
Signal models save method is not returning rows affected
{ "login": "jhorman", "id": 323697, "node_id": "MDQ6VXNlcjMyMzY5Nw==", "avatar_url": "https://avatars.githubusercontent.com/u/323697?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jhorman", "html_url": "https://github.com/jhorman", "followers_url": "https://api.github.com/users/jhorman/fo...
[]
closed
false
null
[]
null
[]
2016-05-27T23:56:25
2016-05-30T22:58:44
2016-05-30T22:58:44
CONTRIBUTOR
null
Using the signals model from playhouse, and wanted to get the number of rows affected by my `save` call. It is getting swallowed though. https://github.com/coleifer/peewee/blob/master/playhouse/signals.py#L69
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/947/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/947/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/946
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/946/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/946/comments
https://api.github.com/repos/coleifer/peewee/issues/946/events
https://github.com/coleifer/peewee/issues/946
157,231,647
MDU6SXNzdWUxNTcyMzE2NDc=
946
cannot prefetch on a joined class
{ "login": "keredson", "id": 2049665, "node_id": "MDQ6VXNlcjIwNDk2NjU=", "avatar_url": "https://avatars.githubusercontent.com/u/2049665?v=4", "gravatar_id": "", "url": "https://api.github.com/users/keredson", "html_url": "https://github.com/keredson", "followers_url": "https://api.github.com/users/kered...
[]
closed
false
null
[]
null
[ "First of all this won't work because you need to specifically select values from both the Post and the Person:\n\n``` python\nPost.select().join(Person)\n```\n\nShould be:\n\n``` python\nPost.select(Post, Person).join(Person)\n```\n\nMore importantly, the way to accomplish what you're trying to specify a chain of ...
2016-05-27T15:26:10
2016-05-31T15:11:30
2016-05-30T23:14:41
CONTRIBUTOR
null
I often need to include all the children of a child table. For example, if I have a `Post` that FKs to a `Person`, and that `Person` can have multiple `Pets`, I want to query the post with its author and all of that author's pets populated. Can this be done with peewee? The documentation for `prefetch` doesn't reall...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/946/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/946/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/945
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/945/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/945/comments
https://api.github.com/repos/coleifer/peewee/issues/945/events
https://github.com/coleifer/peewee/issues/945
156,968,423
MDU6SXNzdWUxNTY5Njg0MjM=
945
Perhaps DB connection URI retrieval in playhouse.flask_utils.FlaskDB can be deferred (init_app) until db_connect
{ "login": "nad2000", "id": 177266, "node_id": "MDQ6VXNlcjE3NzI2Ng==", "avatar_url": "https://avatars.githubusercontent.com/u/177266?v=4", "gravatar_id": "", "url": "https://api.github.com/users/nad2000", "html_url": "https://github.com/nad2000", "followers_url": "https://api.github.com/users/nad2000/fo...
[]
closed
false
null
[]
null
[ "Well, you can always just initialize your FlaskDB object by specifying `app=None`. Then when you're ready, you can call `init_app()` on it. That is the standard pattern for doing plugins and plugin factories with Flask.\n\nFor anything more than that you'll probably want to look at the following docs:\n- [Run-time...
2016-05-26T12:05:43
2016-05-30T23:01:20
2016-05-30T23:01:20
NONE
null
I run into a configuration problem doing testing. FlaskDB ignores Flask configuration changes made in **setUp**, eg, `app.config["DATABASE"] = ...`. FlaskDB uses the "global" (original application configurations). I'd done testing **flask-sqlalchemy** and it has lazy DB connection initialization. Perhaps DB connection ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/945/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/945/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/944
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/944/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/944/comments
https://api.github.com/repos/coleifer/peewee/issues/944/events
https://github.com/coleifer/peewee/pull/944
156,347,818
MDExOlB1bGxSZXF1ZXN0NzExMDY4MzI=
944
fix the support of schema for PostgreSQL when we try to create a new table
{ "login": "matrixise", "id": 38737, "node_id": "MDQ6VXNlcjM4NzM3", "avatar_url": "https://avatars.githubusercontent.com/u/38737?v=4", "gravatar_id": "", "url": "https://api.github.com/users/matrixise", "html_url": "https://github.com/matrixise", "followers_url": "https://api.github.com/users/matrixise/...
[]
closed
false
null
[]
null
[ "ok, my branch has some issues with travis, I will try to fix it asap\n" ]
2016-05-23T19:27:22
2016-07-14T08:59:20
2016-07-14T08:59:20
CONTRIBUTOR
null
In the Meta data of a class, we can specify the `schema` attribute, but this one is not used when we try to create the table. in fact the schema must be existing. in this case, we will create it after the creation of the table. I prefer to propose a solution, I can rewrite it if necessary.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/944/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/944/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/944", "html_url": "https://github.com/coleifer/peewee/pull/944", "diff_url": "https://github.com/coleifer/peewee/pull/944.diff", "patch_url": "https://github.com/coleifer/peewee/pull/944.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/943
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/943/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/943/comments
https://api.github.com/repos/coleifer/peewee/issues/943/events
https://github.com/coleifer/peewee/issues/943
156,162,951
MDU6SXNzdWUxNTYxNjI5NTE=
943
peewee.fn.Lower / Upper do not work correctly for some unicode characters
{ "login": "anqxyr", "id": 1102094, "node_id": "MDQ6VXNlcjExMDIwOTQ=", "avatar_url": "https://avatars.githubusercontent.com/u/1102094?v=4", "gravatar_id": "", "url": "https://api.github.com/users/anqxyr", "html_url": "https://github.com/anqxyr", "followers_url": "https://api.github.com/users/anqxyr/foll...
[]
closed
false
null
[]
null
[ "You need to load the ICU extension, which can be compiled in automatically or built as a loadable extension. Check the sqlite docs on the subject. This is a database-specific problem as opposed to a peewee issue.\n" ]
2016-05-22T17:31:13
2016-05-23T15:14:42
2016-05-23T15:14:42
NONE
null
Table Q looks like this: | id | user | | --- | --- | | 1 | À | | 2 | à | And here is some code doing stuff to it. ``` python In [1]: [i.id for i in Q.select().where(Q.user == 'À')] Out[1]: [1] In [2]: [i.id for i in Q.select().where(Q.user == 'à')] Out[2]: [2] In [3]: [i.id for i in Q.select().where(peewee.fn.Lowe...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/943/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/943/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/942
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/942/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/942/comments
https://api.github.com/repos/coleifer/peewee/issues/942/events
https://github.com/coleifer/peewee/issues/942
155,902,499
MDU6SXNzdWUxNTU5MDI0OTk=
942
Postgresql ON CONFLICT
{ "login": "paulfariello", "id": 273684, "node_id": "MDQ6VXNlcjI3MzY4NA==", "avatar_url": "https://avatars.githubusercontent.com/u/273684?v=4", "gravatar_id": "", "url": "https://api.github.com/users/paulfariello", "html_url": "https://github.com/paulfariello", "followers_url": "https://api.github.com/u...
[]
closed
false
null
[]
null
[ "Well... so for one, I am working in the background on a rewrite of all the sql generation, cleaning it up quite a bit in the process. So I don't know that it'd be worth the effort. \n", "Ok so I'll wait for the complete rewrite.\n\nThanks\n\nLe 20 mai 2016 16:32:12 GMT+02:00, Charles Leifer notifications@github....
2016-05-20T07:23:12
2017-07-05T04:23:10
2017-07-05T04:23:10
NONE
null
Hi, we can read in documentation that `INSERT … ON CONFLICT` is planed to be supported soon. I'm currently using some home made query to do it, but I think it would be more stable to add support for it in peewee. I would be glad to give a try but I have some question before creating a merge request. Looking at `gener...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/942/reactions", "total_count": 2, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/942/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/941
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/941/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/941/comments
https://api.github.com/repos/coleifer/peewee/issues/941/events
https://github.com/coleifer/peewee/issues/941
155,739,952
MDU6SXNzdWUxNTU3Mzk5NTI=
941
"is_null" and ">> None" operator is parsed as "IS None" instead of "IS NULL"
{ "login": "iraklikhitarishvili", "id": 7589748, "node_id": "MDQ6VXNlcjc1ODk3NDg=", "avatar_url": "https://avatars.githubusercontent.com/u/7589748?v=4", "gravatar_id": "", "url": "https://api.github.com/users/iraklikhitarishvili", "html_url": "https://github.com/iraklikhitarishvili", "followers_url": "h...
[]
closed
false
null
[]
null
[ "Since the value is parameterized, it will go in as the string 'NULL'.\n", "thank you very mach. you are right. issue was that i tried to run it with `django_model.objects.raw(sql_query,params)` and django orm putted `None` from `params` as `None` instead of `NULL`.\n" ]
2016-05-19T13:43:24
2016-05-19T15:39:50
2016-05-19T15:04:26
NONE
null
`column_name.is_null(True)` and `column_name >> None` expressions in `where` clause are returning `WHERE column_name IS None` in postgresql query. i think just changing [`db_value`](https://github.com/coleifer/peewee/blob/master/peewee.py#L928) to ``` python def db_value(self, value): """Convert the python ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/941/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/941/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/940
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/940/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/940/comments
https://api.github.com/repos/coleifer/peewee/issues/940/events
https://github.com/coleifer/peewee/issues/940
155,596,400
MDU6SXNzdWUxNTU1OTY0MDA=
940
Pass through field default values to SQL schema, or allow explicit creation of default values in model Meta class
{ "login": "bcattle", "id": 620058, "node_id": "MDQ6VXNlcjYyMDA1OA==", "avatar_url": "https://avatars.githubusercontent.com/u/620058?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bcattle", "html_url": "https://github.com/bcattle", "followers_url": "https://api.github.com/users/bcattle/fo...
[]
closed
false
null
[]
null
[ "Oh, I see you can already do this. From the [docs](http://docs.peewee-orm.com/en/latest/peewee/models.html#default-field-values): \n\n> The database can also provide the default value for a field. While peewee does not explicitly provide an API for setting a server-side default value, you can use the constraints p...
2016-05-18T20:41:17
2016-05-19T21:26:03
2016-05-18T20:42:28
CONTRIBUTOR
null
Currently you can specify a model field's default value like ``` new_users = peewee.IntegerField(default=0) ``` Currently this default is applied at the application level, in the [`add_field`](https://github.com/coleifer/peewee/blob/master/peewee.py#L4304) method of the ModelOptions class. It would be nice if this...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/940/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/940/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/939
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/939/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/939/comments
https://api.github.com/repos/coleifer/peewee/issues/939/events
https://github.com/coleifer/peewee/pull/939
154,992,164
MDExOlB1bGxSZXF1ZXN0NzAxNzA4ODY=
939
fix:playhouse connect database_url error
{ "login": "jmpews", "id": 4661301, "node_id": "MDQ6VXNlcjQ2NjEzMDE=", "avatar_url": "https://avatars.githubusercontent.com/u/4661301?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jmpews", "html_url": "https://github.com/jmpews", "followers_url": "https://api.github.com/users/jmpews/foll...
[]
closed
false
null
[]
null
[]
2016-05-16T09:26:00
2016-05-16T19:43:57
2016-05-16T19:43:57
NONE
null
fix:playhouse connect database_url, the max_connections is mistaken for the type of 'str', so the error occur at https://github.com/coleifer/peewee/blob/master/playhouse/pool.py#L126 example: ``` BACKEND_MYSQL="mysql+pool://root:root@127.0.0.1/torweb?max_connections=20&stale_timeout=300" ``` `max_connections` and `s...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/939/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/939/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/939", "html_url": "https://github.com/coleifer/peewee/pull/939", "diff_url": "https://github.com/coleifer/peewee/pull/939.diff", "patch_url": "https://github.com/coleifer/peewee/pull/939.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/938
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/938/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/938/comments
https://api.github.com/repos/coleifer/peewee/issues/938/events
https://github.com/coleifer/peewee/issues/938
154,893,377
MDU6SXNzdWUxNTQ4OTMzNzc=
938
PostgreSQL Full text search failing on multiple words and/or special characters
{ "login": "ZucchiniZe", "id": 5256942, "node_id": "MDQ6VXNlcjUyNTY5NDI=", "avatar_url": "https://avatars.githubusercontent.com/u/5256942?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ZucchiniZe", "html_url": "https://github.com/ZucchiniZe", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "Sorry, after some debugging I found out that you have to do some weird quoting on the variables or use `plainto_tsquery` for it to recognize spacing. my bad\n", "http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#pg-fts\n\nThe docs say:\n\n> The [Match()](http://docs.peewee-orm.com/en/latest/peewee/playh...
2016-05-15T06:30:00
2016-05-16T01:38:03
2016-05-15T07:10:39
NONE
null
I am trying to use the full text search feature offered by peewee and when I run the `Match()` function on something that contains special characters or spaces it fails and give the error `peewee.ProgrammingError: syntax error in tsquery:`. Looking through the traceback it looks like the %s is not getting quoted when r...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/938/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/938/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/937
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/937/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/937/comments
https://api.github.com/repos/coleifer/peewee/issues/937/events
https://github.com/coleifer/peewee/issues/937
154,774,343
MDU6SXNzdWUxNTQ3NzQzNDM=
937
Cyclic ManyToManyField issues
{ "login": "maciej-irl", "id": 2553960, "node_id": "MDQ6VXNlcjI1NTM5NjA=", "avatar_url": "https://avatars.githubusercontent.com/u/2553960?v=4", "gravatar_id": "", "url": "https://api.github.com/users/maciej-irl", "html_url": "https://github.com/maciej-irl", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "It's actually not necessary to add a \"backref\" `ManyToManyField` as Peewee already does this. What you want is something like:\n\n``` python\nclass Author(BaseModel):\n author = TextField(unique=True)\n\nclass Software(BaseModel):\n program = TextField()\n contributors = ManyToManyField(Author, through_...
2016-05-13T18:34:08
2016-05-19T15:25:52
2016-05-19T15:25:52
NONE
null
Code below produces, instead of expected "1". Running Peewee 2.8.1. Same result when running HEAD. ``` Traceback (most recent call last): File "orm.py", line 26, in <module> DeferredAuthor.set_model(Software) File "/usr/local/lib/python3.5/site-packages/peewee.py", line 422, in set_model self.field.rel_mod...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/937/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/937/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/936
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/936/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/936/comments
https://api.github.com/repos/coleifer/peewee/issues/936/events
https://github.com/coleifer/peewee/issues/936
154,772,802
MDU6SXNzdWUxNTQ3NzI4MDI=
936
Postgres syntax error while using db.execute_sql
{ "login": "hkarasek", "id": 1782618, "node_id": "MDQ6VXNlcjE3ODI2MTg=", "avatar_url": "https://avatars.githubusercontent.com/u/1782618?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hkarasek", "html_url": "https://github.com/hkarasek", "followers_url": "https://api.github.com/users/hkara...
[]
closed
false
null
[]
null
[ "Where are the single-quotes coming from? I'm kinda confused.\n", "There are a few weird things going on in the code you shared:\n- Parameterizing the table name: typically you don't want to parameterize things like table names or other things that exist as part of the schema...it's more for external data.\n- Pos...
2016-05-13T18:25:57
2016-05-14T00:28:06
2016-05-14T00:28:06
NONE
null
I have problem with the ' (single quote) in SQL query when passing arguments. I am doing something wrong or it's a bug? ### Reproducer: ``` python import peewee as pw EVENTS_TABLE_PREFIX = 'events_' db = pw.PostgresqlDatabase('events_api', user='test', password='passwd', host='localhost') sql = 'CREATE TABLE %s (id...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/936/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/936/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/935
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/935/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/935/comments
https://api.github.com/repos/coleifer/peewee/issues/935/events
https://github.com/coleifer/peewee/issues/935
154,316,835
MDU6SXNzdWUxNTQzMTY4MzU=
935
DateTimeField fetched with scalar() has different type in Postgres vs. SQLite
{ "login": "jonklein", "id": 194568, "node_id": "MDQ6VXNlcjE5NDU2OA==", "avatar_url": "https://avatars.githubusercontent.com/u/194568?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jonklein", "html_url": "https://github.com/jonklein", "followers_url": "https://api.github.com/users/jonklei...
[]
closed
false
null
[]
null
[ "Whoa...what version of SQLite is your Python driver using? You can run `from peewee import sqlite3; print sqlite3.sqlite_version_info` I believe. Are the sqlite values being inserted as timestamps? You can open a sqlite shell and check. \n", "As an example, here's what I get when I run a similar query against my...
2016-05-11T18:58:15
2016-05-11T20:37:19
2016-05-11T20:37:19
NONE
null
Fetching a DateTimeField with scalar() yields a datetime for Postgres, and a float for SQLite. While SQLite does not have a distinct storage type for dates/times, I'd still expect the same type to be returned from Peewee. With Postgres ``` >>> Profiles.select(fn.Max(Profiles.updated_at)).scalar() datetime.datetime(2...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/935/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/935/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/934
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/934/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/934/comments
https://api.github.com/repos/coleifer/peewee/issues/934/events
https://github.com/coleifer/peewee/issues/934
154,274,972
MDU6SXNzdWUxNTQyNzQ5NzI=
934
Id field is not created with AUTOINCREMENT
{ "login": "mamcx", "id": 238983, "node_id": "MDQ6VXNlcjIzODk4Mw==", "avatar_url": "https://avatars.githubusercontent.com/u/238983?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mamcx", "html_url": "https://github.com/mamcx", "followers_url": "https://api.github.com/users/mamcx/followers"...
[]
closed
false
null
[]
null
[ "It appears you are using Sqlite. Please read http://sqlite.org/autoinc.html for an explanation why this is not the default behavior. If you want autoincrement with Sqlite, you can use [PrimaryKeyAutoIncrementField](http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#PrimaryKeyAutoIncrementField) in `playhou...
2016-05-11T15:38:37
2016-05-11T16:02:50
2016-05-11T16:02:30
NONE
null
I have a normal model and the tables have the ID marked as not AUTOINCREMENT. This is the code: ``` python class BaseModel(Model): class Meta: database = db class Cobro(BaseModel): nombre = CharField() ``` ``` sql CREATE TABLE "cobro"( "id" Integer NOT NULL PRIMARY KEY, "nombre" Text NOT...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/934/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/934/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/933
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/933/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/933/comments
https://api.github.com/repos/coleifer/peewee/issues/933/events
https://github.com/coleifer/peewee/issues/933
154,263,885
MDU6SXNzdWUxNTQyNjM4ODU=
933
BlobField cannot be used with uninitialized Proxy
{ "login": "vkrizan", "id": 7695766, "node_id": "MDQ6VXNlcjc2OTU3NjY=", "avatar_url": "https://avatars.githubusercontent.com/u/7695766?v=4", "gravatar_id": "", "url": "https://api.github.com/users/vkrizan", "html_url": "https://github.com/vkrizan", "followers_url": "https://api.github.com/users/vkrizan/...
[]
closed
false
null
[]
null
[ "Nice catch and fantastic issue report. I'll work on a solution.\n", "Thank you. I resolved it with lazy imports, right after Proxy initialization.\n", "The proxy should have a way to attach callbacks if I remember correctly, so I just need to move the binary type binding to a hook. I'll fix it regardless, but ...
2016-05-11T14:53:51
2022-01-06T14:18:50
2016-05-20T14:44:45
NONE
null
BlobField determines its binary type on its initialization. BlobField then cannot be used with Proxied database that is not initialized. An `AttributeError` is risen right after module execution/import. Reproducer: ``` import peewee class NonWorkingBlobFieldOnProxy(peewee.Model): class Meta: database = p...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/933/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/933/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/932
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/932/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/932/comments
https://api.github.com/repos/coleifer/peewee/issues/932/events
https://github.com/coleifer/peewee/issues/932
154,172,565
MDU6SXNzdWUxNTQxNzI1NjU=
932
MySQL: peewee adds extra characters to table name when db.create_tables()
{ "login": "Eric-hjy", "id": 19300603, "node_id": "MDQ6VXNlcjE5MzAwNjAz", "avatar_url": "https://avatars.githubusercontent.com/u/19300603?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Eric-hjy", "html_url": "https://github.com/Eric-hjy", "followers_url": "https://api.github.com/users/Eri...
[]
closed
false
null
[]
null
[]
2016-05-11T06:54:05
2016-05-11T07:10:52
2016-05-11T07:10:52
NONE
null
As the title, when I used peewee to create mysql tables, some characters were added by peewee and that made table creation fail. To make sure it was not my python codes making the error, I printed out the table names before calling db.create_tables() Below are the logs of my codes plus the reported error traces: Conn...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/932/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/932/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/931
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/931/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/931/comments
https://api.github.com/repos/coleifer/peewee/issues/931/events
https://github.com/coleifer/peewee/issues/931
154,135,249
MDU6SXNzdWUxNTQxMzUyNDk=
931
Peewee and custom primary keys
{ "login": "SegFaultAX", "id": 87773, "node_id": "MDQ6VXNlcjg3Nzcz", "avatar_url": "https://avatars.githubusercontent.com/u/87773?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SegFaultAX", "html_url": "https://github.com/SegFaultAX", "followers_url": "https://api.github.com/users/SegFaul...
[]
closed
false
null
[]
null
[ "> Of course setting force_insert=True works as expected, but why is that necessary in this context?\n\nIt's [explained in the documentation](http://docs.peewee-orm.com/en/latest/peewee/models.html#id3).\n\nPerhaps showing the SQL will help:\n\n``` python\nimport logging\nlogger=logging.getLogger('peewee')\nlogger....
2016-05-11T00:22:07
2016-05-11T17:03:11
2016-05-11T16:16:22
NONE
null
Hello peewee team! I'm trying to understand some odd behavior when using custom primary keys with peewee. Kindly consider the following snippet: ``` python # dependencies: peewee==2.8.1 import peewee db = peewee.SqliteDatabase(":memory:") class BaseModel(peewee.Model): class Meta: database = db class Ex...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/931/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/931/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/930
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/930/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/930/comments
https://api.github.com/repos/coleifer/peewee/issues/930/events
https://github.com/coleifer/peewee/issues/930
154,068,615
MDU6SXNzdWUxNTQwNjg2MTU=
930
pwiz fails to generate correct code: UnknownField
{ "login": "james-lawrence", "id": 2835871, "node_id": "MDQ6VXNlcjI4MzU4NzE=", "avatar_url": "https://avatars.githubusercontent.com/u/2835871?v=4", "gravatar_id": "", "url": "https://api.github.com/users/james-lawrence", "html_url": "https://github.com/james-lawrence", "followers_url": "https://api.gith...
[]
closed
false
null
[]
null
[]
2016-05-10T17:58:03
2016-05-11T16:01:05
2016-05-11T16:01:05
CONTRIBUTOR
null
``` createdb psql <<EOF CREATE TABLE example ( address inet DEFAULT '0.0.0.0'::inet NOT NULL PRIMARY KEY ); EOF python -m pwiz -e postgresql -u $USER $USER ``` generates the following code: ``` class UnknownField(object): pass class BaseModel(Model): class Meta: database = database class Example(B...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/930/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/930/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/929
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/929/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/929/comments
https://api.github.com/repos/coleifer/peewee/issues/929/events
https://github.com/coleifer/peewee/issues/929
154,067,115
MDU6SXNzdWUxNTQwNjcxMTU=
929
pwiz fails to generate correct code: missing extension import.
{ "login": "james-lawrence", "id": 2835871, "node_id": "MDQ6VXNlcjI4MzU4NzE=", "avatar_url": "https://avatars.githubusercontent.com/u/2835871?v=4", "gravatar_id": "", "url": "https://api.github.com/users/james-lawrence", "html_url": "https://github.com/james-lawrence", "followers_url": "https://api.gith...
[]
closed
false
null
[]
null
[ "Not the author but I'll answer anyways.\n\n`JSONField` is contained in `playhouse.postgres_ext` so you need another import, i.e\n\n``` python\nfrom peewee import *\nfrom playhouse.postgres_ext import JSONField # <----------\n\ndatabase = PostgresqlDatabase('user', **{'user': 'user'})\n\nclass UnknownField(object):...
2016-05-10T17:50:58
2016-05-30T23:26:50
2016-05-30T23:26:50
CONTRIBUTOR
null
if a table contains a json field, NameError: name 'JSONField' is not defined is raised. pwiz should just include the import, it shouldn't generate code that doesn't work. ``` createdb psql <<EOF CREATE TABLE example ( field1 json ); EOF python -m pwiz -e postgresql -u $USER $USER ``` generated the following code: ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/929/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/929/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/928
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/928/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/928/comments
https://api.github.com/repos/coleifer/peewee/issues/928/events
https://github.com/coleifer/peewee/issues/928
153,936,898
MDU6SXNzdWUxNTM5MzY4OTg=
928
How to use "select distinct binary content from table;" in peewee?
{ "login": "ladder1984", "id": 3875374, "node_id": "MDQ6VXNlcjM4NzUzNzQ=", "avatar_url": "https://avatars.githubusercontent.com/u/3875374?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ladder1984", "html_url": "https://github.com/ladder1984", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "You can do a couple things, but think the simplest would be something like:\n\n``` python\nfrom peewee import *\n\nMyModel.select(Clause(SQL('distinct binary'), MyModel.content))\n\n# select distinct binary t1.content from ...\n```\n\nYou may need to attach an alias to the clause so peewee knows what attribute the...
2016-05-10T07:02:48
2016-05-11T15:14:04
2016-05-11T15:14:04
NONE
null
How to use "select distinct binary content from table;" in peewee? I want to use "binary" when "select distinct " . What's more,I use peewee 2.6.4.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/928/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/928/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/927
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/927/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/927/comments
https://api.github.com/repos/coleifer/peewee/issues/927/events
https://github.com/coleifer/peewee/issues/927
153,385,802
MDU6SXNzdWUxNTMzODU4MDI=
927
peewee-versioned 0.1
{ "login": "kramer65", "id": 596581, "node_id": "MDQ6VXNlcjU5NjU4MQ==", "avatar_url": "https://avatars.githubusercontent.com/u/596581?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kramer65", "html_url": "https://github.com/kramer65", "followers_url": "https://api.github.com/users/kramer6...
[]
closed
false
null
[]
null
[ "Looks nice! I'll leave it to Google to help people find your project but if someone should ask about similar work I'll certainly keep this in mind. I'm kind of curious how foreign keys / referential integrity works when you delete a model but older versions of another table relate to the now-deleted object. There ...
2016-05-06T06:22:11
2016-05-06T19:59:09
2016-05-06T19:59:09
NONE
null
Hi @coleifer - after using the code in our own website for a little while I've now released the code for peewee versioned on my github account here: https://github.com/kramer65/peewee-versioned It would be great if you can have a look at it and possibly test it. I'd appreciate feedback on how to usage works now and ho...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/927/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/927/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/926
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/926/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/926/comments
https://api.github.com/repos/coleifer/peewee/issues/926/events
https://github.com/coleifer/peewee/issues/926
153,239,747
MDU6SXNzdWUxNTMyMzk3NDc=
926
Extra Parenthesis
{ "login": "stanep", "id": 3240661, "node_id": "MDQ6VXNlcjMyNDA2NjE=", "avatar_url": "https://avatars.githubusercontent.com/u/3240661?v=4", "gravatar_id": "", "url": "https://api.github.com/users/stanep", "html_url": "https://github.com/stanep", "followers_url": "https://api.github.com/users/stanep/foll...
[]
closed
false
null
[]
null
[ "Sorry, you'll need to write a tool to strip them out or extend the QueryCompiler class.\n" ]
2016-05-05T14:07:33
2016-05-05T14:29:01
2016-05-05T14:29:01
NONE
null
Hi if I have query like this qr = Cwle.select(Cwle.WaitlistEntryID).filter( (Cwle.WaitlistEntryID == 1) & (Cwle.WaitlistEntryID == 4) ) print qr , will give you SELECT CWLE.WaitlistEntryID FROM WCPRDDB1.dbo.CardiacWaitListEntry AS CWLE WHERE ((CWLE.WaitlistEntryID = ?) AND (CWLE.Wa...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/926/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/926/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/925
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/925/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/925/comments
https://api.github.com/repos/coleifer/peewee/issues/925/events
https://github.com/coleifer/peewee/issues/925
153,074,396
MDU6SXNzdWUxNTMwNzQzOTY=
925
Alias doesn't work if it's not the first join
{ "login": "Pirheas", "id": 15324922, "node_id": "MDQ6VXNlcjE1MzI0OTIy", "avatar_url": "https://avatars.githubusercontent.com/u/15324922?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Pirheas", "html_url": "https://github.com/Pirheas", "followers_url": "https://api.github.com/users/Pirhea...
[]
closed
false
null
[]
null
[ "Dude, I'm not going to read all that crap. Can you distill this into a short model or two and a query that fails?\n", "Well, yeah, only the tests are important, the \"crap\" was only there to make it easier to reproduce.\n\n``` python\ndef test2():\n # It doesn't work. \"teacher\" alias is not present in data...
2016-05-04T17:47:56
2016-05-06T19:35:21
2016-05-06T19:35:21
NONE
null
Hello, It seems that aliases only works if they are used on the first join. Well, a small example will explain better: SQL database creation: ``` sql CREATE TABLE Student( id_student INTEGER PRIMARY KEY, name TEXT NOT NULL ); CREATE TABLE Teacher( id_teacher INTEGER PRIMARY KEY, name TE...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/925/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/925/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/924
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/924/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/924/comments
https://api.github.com/repos/coleifer/peewee/issues/924/events
https://github.com/coleifer/peewee/issues/924
153,039,833
MDU6SXNzdWUxNTMwMzk4MzM=
924
Abstract Model database metadata inheritance doesn't work
{ "login": "erwagasore", "id": 1290048, "node_id": "MDQ6VXNlcjEyOTAwNDg=", "avatar_url": "https://avatars.githubusercontent.com/u/1290048?v=4", "gravatar_id": "", "url": "https://api.github.com/users/erwagasore", "html_url": "https://github.com/erwagasore", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "First off, where did you get the `meta.abstract` thing? That is a django orm thing, not peewee.\n", "Oh. I thought peewee have similar implementation. My mistake.\nDoes peewee have something like this?\n", "I should close this issue then\n", "Also the code works fine for me:\n\n``` python\n\nIn [5]: from pee...
2016-05-04T15:21:57
2019-05-18T10:59:57
2016-05-04T17:07:07
NONE
null
``` python db = PostgresqlDatabase(...) class BaseModel(Model): created_at = DateTimeField(default=datetime.now) modified_at = DateTimeField(default=datetime.now) class Meta: abstract = True db_table_func = lambda model_cls: tableize(model_cls.__name__) database = db class Foo(Bas...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/924/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/924/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/923
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/923/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/923/comments
https://api.github.com/repos/coleifer/peewee/issues/923/events
https://github.com/coleifer/peewee/issues/923
153,014,439
MDU6SXNzdWUxNTMwMTQ0Mzk=
923
PooledMySQL is not working with connect
{ "login": "gfreezy", "id": 510012, "node_id": "MDQ6VXNlcjUxMDAxMg==", "avatar_url": "https://avatars.githubusercontent.com/u/510012?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gfreezy", "html_url": "https://github.com/gfreezy", "followers_url": "https://api.github.com/users/gfreezy/fo...
[]
closed
false
null
[]
null
[ "I've (finally) released 2.8.1. Thanks!\n" ]
2016-05-04T13:39:42
2016-05-04T18:04:20
2016-05-04T18:04:20
NONE
null
`PooledMySQL.ping()` is not working with the latest release. Please issue a new release.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/923/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/923/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/922
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/922/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/922/comments
https://api.github.com/repos/coleifer/peewee/issues/922/events
https://github.com/coleifer/peewee/issues/922
152,939,152
MDU6SXNzdWUxNTI5MzkxNTI=
922
RetryOperationalError should raise peewee.OperationalError
{ "login": "yami", "id": 77224, "node_id": "MDQ6VXNlcjc3MjI0", "avatar_url": "https://avatars.githubusercontent.com/u/77224?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yami", "html_url": "https://github.com/yami", "followers_url": "https://api.github.com/users/yami/followers", "follo...
[]
closed
false
null
[]
null
[ "What will happen, if there are several statements in one transaction, and in the middle of execution, an operation error is raised?\n", "> What will happen, if there are several statements in one transaction, and in the middle of execution, an operation error is raised?\n\nYou can read the code to find out!\n\nI...
2016-05-04T06:28:51
2016-07-20T16:49:36
2016-05-04T18:07:29
NONE
null
With current RetryOperationalError implementation, for mysql, a second operation error will cause _mysql_exceptions.OperationalError being re-raised. I'd expect peewee.OperationalError in this case. ``` python class RetryOperationalError(object): def execute_sql(self, sql, params=None, require_commit=True): ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/922/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/922/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/921
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/921/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/921/comments
https://api.github.com/repos/coleifer/peewee/issues/921/events
https://github.com/coleifer/peewee/issues/921
151,903,260
MDU6SXNzdWUxNTE5MDMyNjA=
921
Is there an API on ForeignKeyField to generate dynamically related_name
{ "login": "erwagasore", "id": 1290048, "node_id": "MDQ6VXNlcjEyOTAwNDg=", "avatar_url": "https://avatars.githubusercontent.com/u/1290048?v=4", "gravatar_id": "", "url": "https://api.github.com/users/erwagasore", "html_url": "https://github.com/erwagasore", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "I would question the usefulness of dynamically generated backrefs, but whatever.\n\nPushed a commit 5f7078929b8731b74ab2bf0dede28d7bc103c8e1 that allows foreign key related_name init param to be a callable that accepts the field as it's only param.\n" ]
2016-04-29T15:55:17
2016-04-29T16:47:31
2016-04-29T16:47:31
NONE
null
I would like to create a base model with some dynamically generated foreignkeyfield `related_name`. I was hoping for a way to deal with it without touching the model constructor. Same thing you did with `db_table` by providing `db_table_func` ``` python class AwareModel(Model): created_by = ForeignKeyField(User, r...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/921/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/921/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/920
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/920/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/920/comments
https://api.github.com/repos/coleifer/peewee/issues/920/events
https://github.com/coleifer/peewee/issues/920
151,818,529
MDU6SXNzdWUxNTE4MTg1Mjk=
920
Dynamically generate db_table name
{ "login": "erwagasore", "id": 1290048, "node_id": "MDQ6VXNlcjEyOTAwNDg=", "avatar_url": "https://avatars.githubusercontent.com/u/1290048?v=4", "gravatar_id": "", "url": "https://api.github.com/users/erwagasore", "html_url": "https://github.com/erwagasore", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "You could do something like this:\n\n``` python\nimport peewee as p\nfrom inflection import tableize\n\nclass BaseModelMeta(p.BaseModel):\n def __new__(cls, name, bases, attrs):\n cls = super(BaseModel, cls).__new__(cls, name, bases, attrs)\n\n # overwrite db_table name\n cls._meta.db_table...
2016-04-29T08:36:51
2016-04-29T13:46:49
2016-04-29T13:43:56
NONE
null
I want to create an abstract base model which will generate db_table name dynamically. Below is an illustration of what I need to accomplish. ``` python from inflection import tableize ... class User(Model): pass ... class BaseModel(Model): class Meta: abstract = True # make db_table dynami...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/920/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/920/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/919
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/919/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/919/comments
https://api.github.com/repos/coleifer/peewee/issues/919/events
https://github.com/coleifer/peewee/pull/919
151,670,670
MDExOlB1bGxSZXF1ZXN0NjgyMzk1Mjk=
919
Add configuration check for sqlite
{ "login": "M157q", "id": 1645228, "node_id": "MDQ6VXNlcjE2NDUyMjg=", "avatar_url": "https://avatars.githubusercontent.com/u/1645228?v=4", "gravatar_id": "", "url": "https://api.github.com/users/M157q", "html_url": "https://github.com/M157q", "followers_url": "https://api.github.com/users/M157q/follower...
[]
closed
false
null
[]
null
[ "Thanks, good idea!\n" ]
2016-04-28T15:21:15
2018-07-02T13:38:41
2016-04-28T15:36:53
CONTRIBUTOR
null
Some operating systems don't have sqlite3 module within python3. without this commit, they will get unclear error message like this: ``` File "/usr/local/lib/python3.4/site-packages/peewee.py", line 3371, in connect **self.connect_kwargs) File "/usr/local/lib/python3.4/site-packages/peewee.py", line 3609, in _co...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/919/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/919/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/919", "html_url": "https://github.com/coleifer/peewee/pull/919", "diff_url": "https://github.com/coleifer/peewee/pull/919.diff", "patch_url": "https://github.com/coleifer/peewee/pull/919.patch", "merged_at": "2016-04-28T15:36:53" }
https://api.github.com/repos/coleifer/peewee/issues/918
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/918/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/918/comments
https://api.github.com/repos/coleifer/peewee/issues/918/events
https://github.com/coleifer/peewee/issues/918
151,231,279
MDU6SXNzdWUxNTEyMzEyNzk=
918
Many to many relationship within itself
{ "login": "ghost", "id": 10137, "node_id": "MDQ6VXNlcjEwMTM3", "avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ghost", "html_url": "https://github.com/ghost", "followers_url": "https://api.github.com/users/ghost/followers", "f...
[]
closed
false
null
[]
null
[ "and throw in an .aggregate_rows() at the end, though i'm not sure how it'd respond with so many joins.\n", "@Thomaxo -- what you want is to probably use a combination of model aliases and explicit join predicates.\n\nFirst off, it might make better sense to query the \"B\" table (the junction table). For example...
2016-04-26T20:28:29
2016-04-28T20:24:04
2016-04-28T15:19:07
NONE
null
Not sure if this is an issue rather than a question, but here it goes.. Given a model A, and a model B (a many to many table) ``` python class B(Model): original_A = ForeignKeyField( A, related_name='AB' ) related_A = ForeignKeyField( A, related_name='BA' ) clas...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/918/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/918/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/917
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/917/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/917/comments
https://api.github.com/repos/coleifer/peewee/issues/917/events
https://github.com/coleifer/peewee/issues/917
150,924,527
MDU6SXNzdWUxNTA5MjQ1Mjc=
917
get_or_create with 'self' ForeignKeyField : fails due to ambiguous column name
{ "login": "1bpm", "id": 6190541, "node_id": "MDQ6VXNlcjYxOTA1NDE=", "avatar_url": "https://avatars.githubusercontent.com/u/6190541?v=4", "gravatar_id": "", "url": "https://api.github.com/users/1bpm", "html_url": "https://github.com/1bpm", "followers_url": "https://api.github.com/users/1bpm/followers", ...
[]
closed
false
null
[]
null
[ "This is working in master:\n\n``` python\n>>> parent, new = TM.get_or_create(data='parent')\n('SELECT \"t1\".\"id\", \"t1\".\"data\", \"t1\".\"parent_id\" FROM \"tm\" AS t1 WHERE (\"t1\".\"data\" = ?) LIMIT 1 OFFSET 0', [u'parent'])\n('BEGIN DEFERRED', None)\n('INSERT INTO \"tm\" (\"data\") VALUES (?)', [u'parent'...
2016-04-25T16:55:31
2016-04-26T09:28:26
2016-04-26T09:28:26
NONE
null
When using a ForeignKeyField referring to 'self', get_or_create fails with 'ambiguous column name', as it produces a statement with two "t1" aliases. Peewee 2.8.0 using Postgresql, tested with Sqlite and example here using Sqlite. ``` python from peewee import * db = SqliteDatabase("sqlite.db") class TestModel(Mode...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/917/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/917/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/916
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/916/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/916/comments
https://api.github.com/repos/coleifer/peewee/issues/916/events
https://github.com/coleifer/peewee/issues/916
149,990,765
MDU6SXNzdWUxNDk5OTA3NjU=
916
Using date_part on an aliased field generates new alias
{ "login": "CorverDevelopment", "id": 15232654, "node_id": "MDEyOk9yZ2FuaXphdGlvbjE1MjMyNjU0", "avatar_url": "https://avatars.githubusercontent.com/u/15232654?v=4", "gravatar_id": "", "url": "https://api.github.com/users/CorverDevelopment", "html_url": "https://github.com/CorverDevelopment", "followers_...
[]
closed
false
null
[]
null
[ "I'm confused...what's different in the 2nd and 3rd queries? I can see that in the first it uses t3 for the alias, but don't understand why it uses t4 in the last query.\n", "Oops, I see: it's using Person in the second example query. I swear I looked at them for a minute and didn't see that. Ok, makes sense.\n",...
2016-04-21T07:28:39
2017-07-07T04:12:58
2017-07-07T04:12:58
NONE
null
When using the `date_part` functionality (and others, e.g. `contains_any` in ArrayField), the field is passed as `self`. This works beautifully if you are using the model it is defined in, but, when using it on an aliased table, it generates a new alias. Below is a very crude example from how I found this "problem". T...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/916/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/916/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/915
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/915/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/915/comments
https://api.github.com/repos/coleifer/peewee/issues/915/events
https://github.com/coleifer/peewee/pull/915
149,690,300
MDExOlB1bGxSZXF1ZXN0NjcxNDMwMjQ=
915
doc_fix
{ "login": "piperck", "id": 8776176, "node_id": "MDQ6VXNlcjg3NzYxNzY=", "avatar_url": "https://avatars.githubusercontent.com/u/8776176?v=4", "gravatar_id": "", "url": "https://api.github.com/users/piperck", "html_url": "https://github.com/piperck", "followers_url": "https://api.github.com/users/piperck/...
[]
closed
false
null
[]
null
[]
2016-04-20T07:57:12
2016-04-20T15:29:40
2016-04-20T15:29:40
CONTRIBUTOR
null
doc_fix Pass by to repair
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/915/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/915/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/915", "html_url": "https://github.com/coleifer/peewee/pull/915", "diff_url": "https://github.com/coleifer/peewee/pull/915.diff", "patch_url": "https://github.com/coleifer/peewee/pull/915.patch", "merged_at": "2016-04-20T15:29:40" }