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/414
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/414/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/414/comments
https://api.github.com/repos/coleifer/peewee/issues/414/events
https://github.com/coleifer/peewee/issues/414
40,221,597
MDU6SXNzdWU0MDIyMTU5Nw==
414
No quotes are put around "user" table name
{ "login": "extesy", "id": 65872, "node_id": "MDQ6VXNlcjY1ODcy", "avatar_url": "https://avatars.githubusercontent.com/u/65872?v=4", "gravatar_id": "", "url": "https://api.github.com/users/extesy", "html_url": "https://github.com/extesy", "followers_url": "https://api.github.com/users/extesy/followers", ...
[]
closed
false
null
[]
null
[ "What SQL was generated previously? Was an alias used? Sorry I don't recall.\n", "I don't know, probably just quotes around the table name, just like right after UPDATE word.\n", "This should be fixed by bb48ca37fcdd2728c469c50aee8cb824a8aff4f1\n" ]
2014-08-14T04:12:04
2014-08-19T20:17:37
2014-08-19T18:17:54
NONE
null
Upgrading peewee from 2.2.5 to 2.3.0 broke something since now I get syntax error exception for this postgres query: ``` UPDATE "user" SET "last_active_at" = %s WHERE (user."id" = %s) ``` The problem is that "user" table name is a reserved keyword so it must be put in quotes.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/414/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/414/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/413
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/413/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/413/comments
https://api.github.com/repos/coleifer/peewee/issues/413/events
https://github.com/coleifer/peewee/pull/413
39,919,985
MDExOlB1bGxSZXF1ZXN0MTk1Nzg2NDI=
413
Add in support for passing in JSON dumps functions
{ "login": "alexlatchford", "id": 628146, "node_id": "MDQ6VXNlcjYyODE0Ng==", "avatar_url": "https://avatars.githubusercontent.com/u/628146?v=4", "gravatar_id": "", "url": "https://api.github.com/users/alexlatchford", "html_url": "https://github.com/alexlatchford", "followers_url": "https://api.github.co...
[]
closed
false
null
[]
null
[ "Nice, thanks for this!\n" ]
2014-08-10T23:45:38
2014-09-06T12:49:50
2014-09-06T12:49:47
CONTRIBUTOR
null
Hi Charles, I've added in support for passing through a `json.dumps` function to psycopg2. I need it to serialise datetime formats going into the db, but obviously this is nice and generic. Let me know what you think. Cheers, Alex
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/413/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/413/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/413", "html_url": "https://github.com/coleifer/peewee/pull/413", "diff_url": "https://github.com/coleifer/peewee/pull/413.diff", "patch_url": "https://github.com/coleifer/peewee/pull/413.patch", "merged_at": "2014-09-06T12:49:46" }
https://api.github.com/repos/coleifer/peewee/issues/412
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/412/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/412/comments
https://api.github.com/repos/coleifer/peewee/issues/412/events
https://github.com/coleifer/peewee/issues/412
39,698,915
MDU6SXNzdWUzOTY5ODkxNQ==
412
Getting size of a ResultSet without using count()
{ "login": "arski", "id": 904818, "node_id": "MDQ6VXNlcjkwNDgxOA==", "avatar_url": "https://avatars.githubusercontent.com/u/904818?v=4", "gravatar_id": "", "url": "https://api.github.com/users/arski", "html_url": "https://github.com/arski", "followers_url": "https://api.github.com/users/arski/followers"...
[]
closed
false
null
[]
null
[ "You were very close -- the best way to get the result size if you plan to iterate anyways, is to call `list()` on the query and then take the length of that.\n\n``` python\nquery = User.select()\nnum_results = len(list(query))\nfor item in query:\n print item\n```\n\nThis will only result in a single select que...
2014-08-07T07:11:39
2014-08-07T13:12:53
2014-08-07T13:10:33
NONE
null
Basically the reason is that I don't want to run another query when I know that I will be iterating over the ResultSet anyway, so I'd be happy to load it into memory and use `len()` or something like that. I'm used to Django doing this automatically when you call `len()` on a query/resultset, but here even if I do `.e...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/412/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/412/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/411
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/411/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/411/comments
https://api.github.com/repos/coleifer/peewee/issues/411/events
https://github.com/coleifer/peewee/issues/411
39,455,591
MDU6SXNzdWUzOTQ1NTU5MQ==
411
include sql command when sql/programmer error raised
{ "login": "Amleto", "id": 2996796, "node_id": "MDQ6VXNlcjI5OTY3OTY=", "avatar_url": "https://avatars.githubusercontent.com/u/2996796?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Amleto", "html_url": "https://github.com/Amleto", "followers_url": "https://api.github.com/users/Amleto/foll...
[]
closed
false
null
[]
null
[ "You can try logging: http://docs.peewee-orm.com/en/latest/peewee/cookbook.html#logging-queries\n\nOr you can implement `Database.sql_error_handler` http://docs.peewee-orm.com/en/latest/peewee/api.html?highlight=sql_error_handler#Database.sql_error_handler\n\nPlease comment if you find that this is an error in peew...
2014-08-04T20:04:44
2014-08-04T20:06:50
2014-08-04T20:06:50
NONE
null
Hi, I have tens or hundreds of thousands of rows to commit (MySQL) and I had db connection issues when trying to commit them all in one go. The data is provided by a generator and I take slices (itertools.islice) that are passed in to an insert_many(...).execute() call. When calling insert_many(...).execute() for the...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/411/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/411/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/410
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/410/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/410/comments
https://api.github.com/repos/coleifer/peewee/issues/410/events
https://github.com/coleifer/peewee/issues/410
39,281,532
MDU6SXNzdWUzOTI4MTUzMg==
410
sql_error_handler not called
{ "login": "tfeldmann", "id": 385566, "node_id": "MDQ6VXNlcjM4NTU2Ng==", "avatar_url": "https://avatars.githubusercontent.com/u/385566?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tfeldmann", "html_url": "https://github.com/tfeldmann", "followers_url": "https://api.github.com/users/tfel...
[]
closed
false
null
[]
null
[ "Yeah, I think you're right... Perhaps the `ExceptionWrapper` code is getting in the way. Let me look into it.\n\nPS, you can use the `playhouse.pool.PooledMySQLDatabase` with a stale timeout and it will automatically recycle connections for you. Docs: http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#pool...
2014-08-01T11:23:57
2015-08-22T12:59:49
2014-08-04T12:26:34
NONE
null
Hi! After connecting to a mysql database and waiting for a long time (>8h) subsequent database calls fail with a "2006 MySQL has gone away". To work around this problem I want to implement a "ReconnectingMySQLDatabase" that reconnects if this exception is detected. For testing purposes I created the BaseModel tables a...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/410/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/410/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/409
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/409/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/409/comments
https://api.github.com/repos/coleifer/peewee/issues/409/events
https://github.com/coleifer/peewee/issues/409
39,249,447
MDU6SXNzdWUzOTI0OTQ0Nw==
409
Ability to change query_context when joining
{ "login": "alexlatchford", "id": 628146, "node_id": "MDQ6VXNlcjYyODE0Ng==", "avatar_url": "https://avatars.githubusercontent.com/u/628146?v=4", "gravatar_id": "", "url": "https://api.github.com/users/alexlatchford", "html_url": "https://github.com/alexlatchford", "followers_url": "https://api.github.co...
[]
closed
false
null
[]
null
[ "I'm presuming the raw SQL produced should be something like this, which shows it's possible:\n\n``` sql\nSELECT\n a.title\nFROM\n article a,\n INNER JOIN news_feed nf ON a.news_feed_id = a.uuid\n INNER JOIN article_state ars ON ars.article_id = a.uuid\nWHERE\n nf.enabled = 1\n AND ars.state = 'a'...
2014-07-31T23:38:04
2014-08-04T06:54:50
2014-08-01T12:51:44
CONTRIBUTOR
null
Hi Charles, Just been writing a query that I think should be functionally possible in SQL but isn't currently supported in peewee. The query is looking to select any articles that are in an enabled news feed, with at least one entry with a specific state in the article_state table. ``` python class NewsFeed(Model): ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/409/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/409/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/408
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/408/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/408/comments
https://api.github.com/repos/coleifer/peewee/issues/408/events
https://github.com/coleifer/peewee/issues/408
38,721,517
MDU6SXNzdWUzODcyMTUxNw==
408
Auto-incrementing BigIntegerField
{ "login": "tfeldmann", "id": 385566, "node_id": "MDQ6VXNlcjM4NTU2Ng==", "avatar_url": "https://avatars.githubusercontent.com/u/385566?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tfeldmann", "html_url": "https://github.com/tfeldmann", "followers_url": "https://api.github.com/users/tfel...
[]
closed
false
null
[]
null
[ "As a workaround I overrode the `create` method. Please let me know if there is a better way.\n\n``` python\nclass Dataset(BaseModel):\n id = BigIntegerField(primary_key=True)\n\n @classmethod\n def create(cls, *args, **kwargs):\n next_id = cls.select(fn.Max(cls.id)).scalar() + 1\n return sup...
2014-07-25T11:40:46
2014-07-25T12:27:30
2014-07-25T12:27:30
NONE
null
Hello, I'm working on an application with a mysql database. Several hundred loggers will each send a measurement value every second for three years - so I have to use a BigIntegerField. `id = BigIntegerField(primary_key=True)` works, but doesn't auto-increment. Is there any way to do this in peewee? Thanks!
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/408/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/408/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/407
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/407/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/407/comments
https://api.github.com/repos/coleifer/peewee/issues/407/events
https://github.com/coleifer/peewee/issues/407
38,715,476
MDU6SXNzdWUzODcxNTQ3Ng==
407
Not unique table/alias in a single INNER JOIN query
{ "login": "lalstef", "id": 1503661, "node_id": "MDQ6VXNlcjE1MDM2NjE=", "avatar_url": "https://avatars.githubusercontent.com/u/1503661?v=4", "gravatar_id": "", "url": "https://api.github.com/users/lalstef", "html_url": "https://github.com/lalstef", "followers_url": "https://api.github.com/users/lalstef/...
[]
closed
false
null
[]
null
[ "Just an FYI that the `filter()` API is actually deprecated.\n\nThat aside, it looks like it's interpreting the foreign key as a column requiring a join. This query should accomplish what you want:\n\n``` python\nDataRow.select().where(DataRow.parent == 1234)\n```\n\nAlso, if you find yourself wanting to perform a ...
2014-07-25T10:06:38
2014-07-25T12:33:38
2014-07-25T12:33:38
NONE
null
Hi, I have a model DataRow which has a foreign key to itself (you can see it below). This query ``` DataRow.filter(parent=1864) ``` caused the following error: ``` InternalError: (1066, u"Not unique table/alias: 't1'") ``` Here is the SQL that was executed: ``` Error executing query SELECT t1.`id`, t1.`data`, t1...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/407/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/407/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/406
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/406/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/406/comments
https://api.github.com/repos/coleifer/peewee/issues/406/events
https://github.com/coleifer/peewee/issues/406
38,581,277
MDU6SXNzdWUzODU4MTI3Nw==
406
Question: why does clear_limit default to True (simply for backwards compatibility?)
{ "login": "bryhoyt", "id": 4769854, "node_id": "MDQ6VXNlcjQ3Njk4NTQ=", "avatar_url": "https://avatars.githubusercontent.com/u/4769854?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bryhoyt", "html_url": "https://github.com/bryhoyt", "followers_url": "https://api.github.com/users/bryhoyt/...
[]
closed
false
null
[]
null
[ "I agree and have updated wrapped_count() to have `clear_limit` default to `False`. I also added the option to pass that parameter through the call to `count()`. Finally, I made it so that calls to `count()` for queries that have a limit or offset will use wrapped_count() instead.\n", "If for some reason I have m...
2014-07-23T22:59:36
2014-07-24T02:57:08
2014-07-24T02:16:48
CONTRIBUTOR
null
I realise it may well break backwards compatibility to change anything at this point, but I'm interested in understanding the rationale, if any, for the way things are, so I can grok the API better. As far as I see it, LIMIT and OFFSET are genuinely part of a given query -- if I want to know the total number of result...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/406/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/406/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/405
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/405/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/405/comments
https://api.github.com/repos/coleifer/peewee/issues/405/events
https://github.com/coleifer/peewee/issues/405
38,580,178
MDU6SXNzdWUzODU4MDE3OA==
405
Should count() default to wrapped_count() when query contains a limit or offset?
{ "login": "bryhoyt", "id": 4769854, "node_id": "MDQ6VXNlcjQ3Njk4NTQ=", "avatar_url": "https://avatars.githubusercontent.com/u/4769854?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bryhoyt", "html_url": "https://github.com/bryhoyt", "followers_url": "https://api.github.com/users/bryhoyt/...
[]
closed
false
null
[]
null
[ "Additionally, I think count() should have a clear_limit parameter which it passes through to wrapped_count() -- I'm mentioning this as a comment here, not a separate issue, because it would only make sense if count deferred to wrapped_count for limits and offsets.\n", "> I think that's nice; exactly what you wan...
2014-07-23T22:43:39
2014-07-24T02:53:51
2014-07-24T02:13:18
CONTRIBUTOR
null
As far as I can tell, count() returns meaningless results when the query contains a limit or offset (neither the total, nor the limited, number of results). As per the docs, "count() will automatically default to wrapped_count() in the event the query is distinct or has a grouping". I think that's nice; exactly what ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/405/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/405/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/404
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/404/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/404/comments
https://api.github.com/repos/coleifer/peewee/issues/404/events
https://github.com/coleifer/peewee/issues/404
38,579,889
MDU6SXNzdWUzODU3OTg4OQ==
404
wrapped_count() parameter clear_limit is undocumented
{ "login": "bryhoyt", "id": 4769854, "node_id": "MDQ6VXNlcjQ3Njk4NTQ=", "avatar_url": "https://avatars.githubusercontent.com/u/4769854?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bryhoyt", "html_url": "https://github.com/bryhoyt", "followers_url": "https://api.github.com/users/bryhoyt/...
[]
closed
false
null
[]
null
[ "Thanks for pointing this out.\n" ]
2014-07-23T22:40:03
2014-07-24T02:03:16
2014-07-24T02:03:11
CONTRIBUTOR
null
I was confused when count() was behaving unexpectedly, and discovered wrapped_count() by trawling the issues page, but it took me a bit more probing to find the clear_limit parameter to get the actual number of results in the query, rather than the total without limit/offset. Would be helpful if clear_limit were docum...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/404/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/404/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/403
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/403/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/403/comments
https://api.github.com/repos/coleifer/peewee/issues/403/events
https://github.com/coleifer/peewee/pull/403
38,552,936
MDExOlB1bGxSZXF1ZXN0MTg3OTA2MTA=
403
Adding PyMySQL to the error message
{ "login": "denilsonsa", "id": 121676, "node_id": "MDQ6VXNlcjEyMTY3Ng==", "avatar_url": "https://avatars.githubusercontent.com/u/121676?v=4", "gravatar_id": "", "url": "https://api.github.com/users/denilsonsa", "html_url": "https://github.com/denilsonsa", "followers_url": "https://api.github.com/users/d...
[]
closed
false
null
[]
null
[]
2014-07-23T17:38:40
2014-07-23T17:39:38
2014-07-23T17:39:38
CONTRIBUTOR
null
Since `peewee` supports both `MySQLdb` and `PyMySQL` modules, it makes sense to report them both at the error message.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/403/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/403/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/403", "html_url": "https://github.com/coleifer/peewee/pull/403", "diff_url": "https://github.com/coleifer/peewee/pull/403.diff", "patch_url": "https://github.com/coleifer/peewee/pull/403.patch", "merged_at": "2014-07-23T17:39:38" }
https://api.github.com/repos/coleifer/peewee/issues/402
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/402/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/402/comments
https://api.github.com/repos/coleifer/peewee/issues/402/events
https://github.com/coleifer/peewee/pull/402
38,543,940
MDExOlB1bGxSZXF1ZXN0MTg3ODQ5Njc=
402
Added support for postgres raw encryption functions.
{ "login": "stas", "id": 112147, "node_id": "MDQ6VXNlcjExMjE0Nw==", "avatar_url": "https://avatars.githubusercontent.com/u/112147?v=4", "gravatar_id": "", "url": "https://api.github.com/users/stas", "html_url": "https://github.com/stas", "followers_url": "https://api.github.com/users/stas/followers", ...
[]
closed
false
null
[]
null
[]
2014-07-23T16:02:42
2014-09-06T13:36:34
2014-09-06T12:48:22
NONE
null
This introduces a new field type for `playhouse.postgres_ext` to handle encrypted columns. This should work with AES and Blowfish algorithms. The encryption is handled by the [pgcrypto](http://www.postgresql.org/docs/9.3/static/pgcrypto.html) module. Although this works, this is not very optimized. See #401 I opened ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/402/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/402/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/402", "html_url": "https://github.com/coleifer/peewee/pull/402", "diff_url": "https://github.com/coleifer/peewee/pull/402.diff", "patch_url": "https://github.com/coleifer/peewee/pull/402.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/401
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/401/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/401/comments
https://api.github.com/repos/coleifer/peewee/issues/401/events
https://github.com/coleifer/peewee/issues/401
38,542,628
MDU6SXNzdWUzODU0MjYyOA==
401
Database functions fields support
{ "login": "stas", "id": 112147, "node_id": "MDQ6VXNlcjExMjE0Nw==", "avatar_url": "https://avatars.githubusercontent.com/u/112147?v=4", "gravatar_id": "", "url": "https://api.github.com/users/stas", "html_url": "https://github.com/stas", "followers_url": "https://api.github.com/users/stas/followers", ...
[]
closed
false
null
[]
null
[ "I think I'm going to pass on merging this, but thank you for your hard work!\n", "@coleifer It would be great if you could share your opinions on this.\n\nBtw, this issue is not directly relevant to the PR #402 you just closed, which is fine tbh.\n", "> It would be great if you could share your opinions on thi...
2014-07-23T15:50:21
2014-09-06T15:02:49
2014-09-06T12:48:17
NONE
null
The issue is related to the way field nodes are parsed. At this moment there's no way you can dynamically embed a function in the field `SelectQuery` (although this is partially achievable through psycopg2 API for PostgreSQL, other database adapters are very unlikely to provide the same functionality). A good example ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/401/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/401/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/400
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/400/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/400/comments
https://api.github.com/repos/coleifer/peewee/issues/400/events
https://github.com/coleifer/peewee/issues/400
38,538,748
MDU6SXNzdWUzODUzODc0OA==
400
Add support for MySQL TIMESTAMP field
{ "login": "denilsonsa", "id": 121676, "node_id": "MDQ6VXNlcjEyMTY3Ng==", "avatar_url": "https://avatars.githubusercontent.com/u/121676?v=4", "gravatar_id": "", "url": "https://api.github.com/users/denilsonsa", "html_url": "https://github.com/denilsonsa", "followers_url": "https://api.github.com/users/d...
[]
closed
false
null
[]
null
[ "You can always implement a custom field type: http://peewee.readthedocs.org/en/latest/peewee/models.html#creating-a-custom-field\n\nI do not have any plans at the moment to implement the timestamp field, however.\n", "For future reference, MySQL's `TIMESTAMP` field behaves almost like `DateTimeField`, so a trivi...
2014-07-23T15:12:34
2014-07-24T03:11:13
2014-07-24T02:18:29
CONTRIBUTOR
null
Peewee already has support for `datetime` field, but if I'm working with a "legacy" database, it would be desirable to also have [`timestamp` field](https://dev.mysql.com/doc/refman/5.5/en/datetime.html).
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/400/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/400/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/399
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/399/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/399/comments
https://api.github.com/repos/coleifer/peewee/issues/399/events
https://github.com/coleifer/peewee/issues/399
38,314,718
MDU6SXNzdWUzODMxNDcxOA==
399
Request: joining subqueries
{ "login": "alvra", "id": 470642, "node_id": "MDQ6VXNlcjQ3MDY0Mg==", "avatar_url": "https://avatars.githubusercontent.com/u/470642?v=4", "gravatar_id": "", "url": "https://api.github.com/users/alvra", "html_url": "https://github.com/alvra", "followers_url": "https://api.github.com/users/alvra/followers"...
[]
closed
false
null
[]
null
[ "``` python\nthings = Thing.select().alias('j1')\nRelated.select().join(things, on=(Related.thing == things.c.id))\n```\n", "Thanks :)\n" ]
2014-07-21T15:36:47
2014-08-14T06:35:24
2014-08-14T03:44:27
NONE
null
I'd like to be able to construct queries like ``` sql SELECT * FROM t1 INNER JOIN ( SELECT * FROM t2 ) ON t2.rel_id = t2.id ``` so that's joining a subquery (`peewee.SelectQuery`) instead of a table (`peewee.Model` or `peewee.ModelAlias`). (Of course, this makes more sense if the subquery is a bit more complex, b...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/399/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/399/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/398
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/398/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/398/comments
https://api.github.com/repos/coleifer/peewee/issues/398/events
https://github.com/coleifer/peewee/issues/398
38,275,408
MDU6SXNzdWUzODI3NTQwOA==
398
Support Request: Nested dicts (1 -> n) select query
{ "login": "alexlatchford", "id": 628146, "node_id": "MDQ6VXNlcjYyODE0Ng==", "avatar_url": "https://avatars.githubusercontent.com/u/628146?v=4", "gravatar_id": "", "url": "https://api.github.com/users/alexlatchford", "html_url": "https://github.com/alexlatchford", "followers_url": "https://api.github.co...
[]
closed
false
null
[]
null
[ "Unfortunately this is not currently supported using `.dicts()`. Searching 1 -> N can be accomplished using the special `prefetch` API. Behind-the-scenes, `prefetch` will construct the appropriate subqueries to ensure you don't have O(n) queries when fetching \"keywords\" in your example.\n\nYour best bet is to wri...
2014-07-21T04:05:56
2014-07-22T02:36:06
2014-07-22T02:36:06
CONTRIBUTOR
null
Hi Charles, I'm looking to produce a list of dictionaries from a query so it's easy to serialise to json for API output.. The twist over the conventional usage of `dicts()` is that I'd like to perform a join and have that aggregate into a sub-list.. Puesdo-code example: ``` python class Filter(Model): uuid = UUI...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/398/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/398/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/397
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/397/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/397/comments
https://api.github.com/repos/coleifer/peewee/issues/397/events
https://github.com/coleifer/peewee/pull/397
38,234,424
MDExOlB1bGxSZXF1ZXN0MTg2MjExMjE=
397
Add support for conditional saving model.
{ "login": "yadutaf", "id": 739985, "node_id": "MDQ6VXNlcjczOTk4NQ==", "avatar_url": "https://avatars.githubusercontent.com/u/739985?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yadutaf", "html_url": "https://github.com/yadutaf", "followers_url": "https://api.github.com/users/yadutaf/fo...
[]
closed
false
null
[]
null
[ "Thank you but I will pass on this, since it can be accomplished with an `UpdateQuery`.\n" ]
2014-07-19T14:34:37
2014-07-20T12:31:02
2014-07-20T12:31:02
NONE
null
Concurrent nodes of an application attempting to update the same record might result in data corruption/loss. To help with this scenario, this PR adds an optional `conditions` parameter on `Model.Save`. When the conditions are not met, updated record count will be `0` letting the application know the failure.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/397/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/397/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/397", "html_url": "https://github.com/coleifer/peewee/pull/397", "diff_url": "https://github.com/coleifer/peewee/pull/397.diff", "patch_url": "https://github.com/coleifer/peewee/pull/397.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/396
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/396/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/396/comments
https://api.github.com/repos/coleifer/peewee/issues/396/events
https://github.com/coleifer/peewee/issues/396
38,156,305
MDU6SXNzdWUzODE1NjMwNQ==
396
SQLite doesn't like double parens
{ "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
[ "``` sql\nSELECT t1.\"id\"\nFROM \"users\" AS t1 \nWHERE Exists((SELECT t2.\"id\" FROM \"users\" AS t2))\n```\n", "Nice, thanks!\n" ]
2014-07-18T08:14:40
2014-07-18T17:20:44
2014-07-18T15:28:55
CONTRIBUTOR
null
This sample program shows the problem ``` python from peewee import Model from peewee import fn from peewee import SqliteDatabase db = SqliteDatabase(':memory:') class User(Model): class Meta: db = db User.create_table() list(User.select().where(fn.Exists(User.select(User.id)))) ``` Func always wraps ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/396/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/396/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/395
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/395/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/395/comments
https://api.github.com/repos/coleifer/peewee/issues/395/events
https://github.com/coleifer/peewee/issues/395
38,154,078
MDU6SXNzdWUzODE1NDA3OA==
395
problem with Model.select(SQL('*'))...
{ "login": "goir", "id": 586209, "node_id": "MDQ6VXNlcjU4NjIwOQ==", "avatar_url": "https://avatars.githubusercontent.com/u/586209?v=4", "gravatar_id": "", "url": "https://api.github.com/users/goir", "html_url": "https://github.com/goir", "followers_url": "https://api.github.com/users/goir/followers", ...
[]
closed
false
null
[]
null
[ "Peewee does not currently support this, unfortunately. You can always pass in the model class to `.select()` and it will select the appropriate columns.\n" ]
2014-07-18T07:34:05
2014-07-18T12:46:55
2014-07-18T12:46:55
NONE
null
Hi, I have a very complex Query and want to use SQL('*') to select all fields to avoid specifying all fields and making the query even longer. Very basic example: ``` from peewee import SqliteDatabase, PrimaryKeyField, CharField, Model, SQL, fn db = SqliteDatabase(':memory:') class Model1(Model): id = PrimaryKe...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/395/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/395/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/394
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/394/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/394/comments
https://api.github.com/repos/coleifer/peewee/issues/394/events
https://github.com/coleifer/peewee/pull/394
37,939,947
MDExOlB1bGxSZXF1ZXN0MTg0NDQyNjE=
394
UUID fixes
{ "login": "alexlatchford", "id": 628146, "node_id": "MDQ6VXNlcjYyODE0Ng==", "avatar_url": "https://avatars.githubusercontent.com/u/628146?v=4", "gravatar_id": "", "url": "https://api.github.com/users/alexlatchford", "html_url": "https://github.com/alexlatchford", "followers_url": "https://api.github.co...
[]
closed
false
null
[]
null
[ "Awesome cheers Charles. \n\nThis is amazing, I've already taken your code and am currently building and about to push to live :)\n" ]
2014-07-16T00:43:42
2014-07-16T01:15:51
2014-07-16T01:05:09
CONTRIBUTOR
null
Hi Charles, Found another couple of bugs in the UUID implementation. 1. Finish off the UUIDField ForeignKeyField fixes, forgot to do the python_value implementation.. `UUID(None)` fails hard :( 2. Using a model as a query param fails for UUID primary key models with the following error: ``` [16/Jul/2014:10:05:35] HTT...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/394/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/394/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/394", "html_url": "https://github.com/coleifer/peewee/pull/394", "diff_url": "https://github.com/coleifer/peewee/pull/394.diff", "patch_url": "https://github.com/coleifer/peewee/pull/394.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/393
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/393/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/393/comments
https://api.github.com/repos/coleifer/peewee/issues/393/events
https://github.com/coleifer/peewee/issues/393
37,874,286
MDU6SXNzdWUzNzg3NDI4Ng==
393
create_table() got an unexpected keyword argument 'options'
{ "login": "danieldiekmeier", "id": 2098462, "node_id": "MDQ6VXNlcjIwOTg0NjI=", "avatar_url": "https://avatars.githubusercontent.com/u/2098462?v=4", "gravatar_id": "", "url": "https://api.github.com/users/danieldiekmeier", "html_url": "https://github.com/danieldiekmeier", "followers_url": "https://api.g...
[]
closed
false
null
[]
null
[ "Your models need to be using the `playhouse.sqlite_ext.SqliteExtDatabase` instead of the normal `peewee.SqliteDatabase`.\n", "So:\n\n``` python\nclass FTSBook(FTSModel):\n content = TextField()\n class Meta:\n database = <some SqliteExtDatabase() instance>\n```\n" ]
2014-07-15T11:39:33
2014-07-15T13:49:21
2014-07-15T13:49:21
NONE
null
Okay, so I'm trying to create a FTSModel according to the instructions here: http://peewee.readthedocs.org/en/latest/peewee/playhouse.html#FTSModel I have a model `Book` and a model ``` class FTSBook(FTSModel): content = TextField() ``` that should be created and filled with ``` FTSBook.create_table(content=Boo...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/393/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/393/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/392
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/392/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/392/comments
https://api.github.com/repos/coleifer/peewee/issues/392/events
https://github.com/coleifer/peewee/issues/392
37,860,276
MDU6SXNzdWUzNzg2MDI3Ng==
392
meta_options are overwritten by clauses in child-classes
{ "login": "alexlatchford", "id": 628146, "node_id": "MDQ6VXNlcjYyODE0Ng==", "avatar_url": "https://avatars.githubusercontent.com/u/628146?v=4", "gravatar_id": "", "url": "https://api.github.com/users/alexlatchford", "html_url": "https://github.com/alexlatchford", "followers_url": "https://api.github.co...
[]
closed
false
null
[]
null
[ "Thanks for reporting this -- yes, peewee replaces the `order_by` string with a clause, but this is acting up in the chlid-classes. I will get a fix out soon.\n" ]
2014-07-15T08:13:13
2014-07-15T14:14:18
2014-07-15T14:14:18
CONTRIBUTOR
null
Hi Charles, I think this example should be valid but is having difficulties: ``` python from peewee import * db = SqliteDatabase(':memory:') db.connect() class BaseModel(Model): created = DateTimeField() class Meta: database = db order_by = ('-created',) class Extension(BaseModel): som...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/392/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/392/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/391
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/391/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/391/comments
https://api.github.com/repos/coleifer/peewee/issues/391/events
https://github.com/coleifer/peewee/issues/391
37,751,856
MDU6SXNzdWUzNzc1MTg1Ng==
391
Chaining separate .where() clauses with OR instead of AND
{ "login": "bryhoyt", "id": 4769854, "node_id": "MDQ6VXNlcjQ3Njk4NTQ=", "avatar_url": "https://avatars.githubusercontent.com/u/4769854?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bryhoyt", "html_url": "https://github.com/bryhoyt", "followers_url": "https://api.github.com/users/bryhoyt/...
[]
closed
false
null
[]
null
[ "I think I'm going to leave the API as-is, but thank you for the suggestion.\n", "Thanks for getting back to me really quickly. This does leave me with a couple questions:\n\nI love Peewee, and I love how using an ORM means I can factor my queries by using separate functions to further refine a query, without the...
2014-07-13T23:40:26
2021-04-30T05:01:34
2014-07-14T03:21:36
CONTRIBUTOR
null
I have an existing query in my code that I wish to further extend the query with additional WHERE criteria, but chained with OR instead of AND. I can't find a way to do this in peewee. Am I missing something? I am aware that I can dynamically chain multiple clauses with OR using `reduce(operator.or_, clauses)`, but th...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/391/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/391/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/390
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/390/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/390/comments
https://api.github.com/repos/coleifer/peewee/issues/390/events
https://github.com/coleifer/peewee/issues/390
37,547,955
MDU6SXNzdWUzNzU0Nzk1NQ==
390
ImproperlyConfigured: MySQLdb must be installed.
{ "login": "Casyfill", "id": 2675621, "node_id": "MDQ6VXNlcjI2NzU2MjE=", "avatar_url": "https://avatars.githubusercontent.com/u/2675621?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Casyfill", "html_url": "https://github.com/Casyfill", "followers_url": "https://api.github.com/users/Casyf...
[]
closed
false
null
[]
null
[ "Hi\n\nAre you using Python3? This may be a case for PyMySQL.\n\nMaybe the error message should be edited.\n", "no, python 2.7\n", "I installed PyMySQL already – still same issue(\n", "This is not a peewee bug. You need to install one of the mysql python drivers:\n- mysql-python\n- pymysql\n\nYou can verify ...
2014-07-10T09:58:29
2018-03-14T13:57:51
2014-07-10T14:34:42
NONE
null
I am getting this any time I am trying to create a table or do something with connected DB, althrough I installed MySQL-python lib and it looks working
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/390/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/390/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/389
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/389/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/389/comments
https://api.github.com/repos/coleifer/peewee/issues/389/events
https://github.com/coleifer/peewee/issues/389
37,435,917
MDU6SXNzdWUzNzQzNTkxNw==
389
Dirty field not set in RelationDescriptor __set__ override
{ "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
[ "Another related question is just, why not default to always only saving dirty fields. Just wondering if I am missing something where that would be unsafe? That does seem to be the behavior when you have a CompositeKey? https://github.com/coleifer/peewee/blob/2.2.5/peewee.py#L3159\n", "> Another related question ...
2014-07-09T05:50:32
2014-07-09T17:36:03
2014-07-09T17:32:07
CONTRIBUTOR
null
Setting foreign key values doesn't mark those fields dirty. https://github.com/coleifer/peewee/blob/2.2.5/peewee.py#L885 I am also wondering if Model.prepared should clear dirty fields. As is, just fetching objects from the DB ends up marking all the fields dirty. https://github.com/coleifer/peewee/blob/2.2.5/peewee...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/389/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/389/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/388
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/388/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/388/comments
https://api.github.com/repos/coleifer/peewee/issues/388/events
https://github.com/coleifer/peewee/issues/388
37,431,839
MDU6SXNzdWUzNzQzMTgzOQ==
388
Duplicate results when iterating a select query and creating unrelated models
{ "login": "moloney", "id": 1376566, "node_id": "MDQ6VXNlcjEzNzY1NjY=", "avatar_url": "https://avatars.githubusercontent.com/u/1376566?v=4", "gravatar_id": "", "url": "https://api.github.com/users/moloney", "html_url": "https://github.com/moloney", "followers_url": "https://api.github.com/users/moloney/...
[]
closed
false
null
[]
null
[ "I found that wrapping the for loop in a transaction solves the problem, so I guess this is expected behavior. It does still seem worth it to make this more clear in the documentation.\n", "Check out:\n- https://github.com/coleifer/peewee/issues/12#issuecomment-5614404\n- https://github.com/coleifer/peewee/issue...
2014-07-09T03:46:51
2014-10-01T20:16:47
2014-07-09T12:50:30
NONE
null
I know modification of an iterable while iterating over it can cause problems, but it seems surprising that I can't iterate a select query while creating completely unrelated model instances. ``` python import peewee as pw class DatabaseModel(pw.Model): class Meta: database = pw.SqliteDatabase(':memory:')...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/388/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/388/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/387
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/387/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/387/comments
https://api.github.com/repos/coleifer/peewee/issues/387/events
https://github.com/coleifer/peewee/pull/387
37,242,972
MDExOlB1bGxSZXF1ZXN0MTgwMjg4ODI=
387
Fix nullable UUID foreign keys
{ "login": "alexlatchford", "id": 628146, "node_id": "MDQ6VXNlcjYyODE0Ng==", "avatar_url": "https://avatars.githubusercontent.com/u/628146?v=4", "gravatar_id": "", "url": "https://api.github.com/users/alexlatchford", "html_url": "https://github.com/alexlatchford", "followers_url": "https://api.github.co...
[]
closed
false
null
[]
null
[ "Looks good, thanks for this!\n", "Awesome cheers Charles. Just me being cheeky but what's your release schedule normally? Is it just when it hits a critical mass or is timed etc., obviously looking to get this into my product officially (I'll use a git dependency for now though :))\n\nThanks again,\nAlex\n", "...
2014-07-07T06:48:30
2014-07-08T22:37:57
2014-07-07T11:41:17
CONTRIBUTOR
null
Hi guys, Found a bug in the PostgresExt implementation of UUIDField for foreign keys. Let me know if the patch is satisfactory, it fixes my bug but not sure of the impact, would be great to get this in from my point of view :) Example: ``` python class Entity(Model): uuid = UUIDField(primary_key=True) name =...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/387/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/387/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/387", "html_url": "https://github.com/coleifer/peewee/pull/387", "diff_url": "https://github.com/coleifer/peewee/pull/387.diff", "patch_url": "https://github.com/coleifer/peewee/pull/387.patch", "merged_at": "2014-07-07T11:41:17" }
https://api.github.com/repos/coleifer/peewee/issues/386
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/386/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/386/comments
https://api.github.com/repos/coleifer/peewee/issues/386/events
https://github.com/coleifer/peewee/issues/386
37,208,743
MDU6SXNzdWUzNzIwODc0Mw==
386
pylint doesn't see .id members of model instances
{ "login": "pitchforks", "id": 4378791, "node_id": "MDQ6VXNlcjQzNzg3OTE=", "avatar_url": "https://avatars.githubusercontent.com/u/4378791?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pitchforks", "html_url": "https://github.com/pitchforks", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "I'm not sure what to do about this on the peewee side -- perhaps you could just add the following to your models:\n\n``` python\nid = PrimaryKeyField()\n```\n", "This works. Thank you.\n" ]
2014-07-06T00:16:45
2014-07-07T03:31:28
2014-07-07T00:30:17
NONE
null
I am not sure this is a peewee issue, so feel free to close it if you think it's invalid (or if you are confident this is a pylint bug) I am using peewee-2.2.4 Everytime I have a line like myModelInstance.id in the code, pylint complains that "[E1101] Instance of 'MyModel' has no 'id' member". I don't want to turn t...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/386/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/386/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/385
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/385/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/385/comments
https://api.github.com/repos/coleifer/peewee/issues/385/events
https://github.com/coleifer/peewee/issues/385
37,189,655
MDU6SXNzdWUzNzE4OTY1NQ==
385
How to set threadlocals when using peewee with Flask?
{ "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
[ "In your `DATABASE` declaration just put `'threadlocals': True` -- that's all you need to do.\n" ]
2014-07-05T00:01:55
2014-07-05T18:12:21
2014-07-05T18:12:21
NONE
null
I'm using Peewee with Flask (which is an awesome combination) and because I use threading I want to set `threadlocals=True`. In [the documentation](http://peewee.readthedocs.org/en/latest/peewee/cookbook.html#multi-threaded-applications), it is suggested that I use it like so: ``` concurrent_db = SqliteDatabase('stats...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/385/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/385/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/384
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/384/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/384/comments
https://api.github.com/repos/coleifer/peewee/issues/384/events
https://github.com/coleifer/peewee/issues/384
37,140,341
MDU6SXNzdWUzNzE0MDM0MQ==
384
UUID primary keys
{ "login": "alexlatchford", "id": 628146, "node_id": "MDQ6VXNlcjYyODE0Ng==", "avatar_url": "https://avatars.githubusercontent.com/u/628146?v=4", "gravatar_id": "", "url": "https://api.github.com/users/alexlatchford", "html_url": "https://github.com/alexlatchford", "followers_url": "https://api.github.co...
[]
closed
false
null
[]
null
[ "Aha, scratch that I found the 1.0 -> 2.0 upgrade notes. My bad, closing...\n\nFor anyone finding this:\n\n``` python\nclass MyModel(Model):\n uuid = UUIDField(primary_key=True)\n ...\n```\n" ]
2014-07-04T03:45:09
2014-07-04T03:52:06
2014-07-04T03:52:06
CONTRIBUTOR
null
I'd like to have `playhouse.postgres_ext.UUIDField` as the primary key for a table. https://github.com/coleifer/peewee/issues/9 seems to suggest that this should be possible, but seems to have been deprecated since it's first introduction in 2012. Any suggestions? Cheers, Alex PS. Awesome ORM, switched over from SQL...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/384/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/384/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/383
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/383/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/383/comments
https://api.github.com/repos/coleifer/peewee/issues/383/events
https://github.com/coleifer/peewee/issues/383
36,959,483
MDU6SXNzdWUzNjk1OTQ4Mw==
383
Does peewee work with Gevent?
{ "login": "yueyoum", "id": 2081686, "node_id": "MDQ6VXNlcjIwODE2ODY=", "avatar_url": "https://avatars.githubusercontent.com/u/2081686?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yueyoum", "html_url": "https://github.com/yueyoum", "followers_url": "https://api.github.com/users/yueyoum/...
[]
closed
false
null
[]
null
[ "Yes it does, You need to set Threadlocals to True\n\n```\n# app configuration\nDATABASE = {\n 'name': 'my_db',\n 'engine': 'peewee.PostgresqlDatabase',\n 'user': 'postgres',\n 'threadlocals': True, # <-- this\n}\n```\n\nand then just monkey patch the thread module.\n", "If you're using it with postgr...
2014-07-02T07:56:38
2014-07-02T13:35:10
2014-07-02T13:35:10
NONE
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/383/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/383/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/382
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/382/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/382/comments
https://api.github.com/repos/coleifer/peewee/issues/382/events
https://github.com/coleifer/peewee/issues/382
36,836,910
MDU6SXNzdWUzNjgzNjkxMA==
382
Unable to reach foreign key when doing an 'join on' with table
{ "login": "jonathan-s", "id": 2124818, "node_id": "MDQ6VXNlcjIxMjQ4MTg=", "avatar_url": "https://avatars.githubusercontent.com/u/2124818?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jonathan-s", "html_url": "https://github.com/jonathan-s", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "Try adding `UserOrder.link_to_id` to the select clause:\n\n``` python\n(ExtensionData.\n select(\n ExtensionData, UserOrder.avg_user, UserOrder.link_to_id)\n .join(UserOrder, on=(ExtensionData.id == UserOrder.link_to_id))\n .order_by(UserOrder.avg_user.desc()))\n```\n\nIf that doesn't work, could you share a mi...
2014-06-30T20:44:48
2014-07-01T20:32:41
2014-07-01T19:42:47
NONE
null
So when I join the ExtensionData and UserOrder together I'm unable to access the foreign key relationship (data_entries) with DailyData. It seems as if it doesn't get the primary key from ExtensionData because of [None] at the end of the SQL query. This does not happen when you the ExtensionData by itself. ``` output...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/382/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/382/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/381
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/381/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/381/comments
https://api.github.com/repos/coleifer/peewee/issues/381/events
https://github.com/coleifer/peewee/pull/381
36,812,371
MDExOlB1bGxSZXF1ZXN0MTc3ODIzNDA=
381
MySQL Prefetch with Limit Fix
{ "login": "jpttrssn", "id": 194305, "node_id": "MDQ6VXNlcjE5NDMwNQ==", "avatar_url": "https://avatars.githubusercontent.com/u/194305?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jpttrssn", "html_url": "https://github.com/jpttrssn", "followers_url": "https://api.github.com/users/jpttrss...
[]
closed
false
null
[]
null
[ "I'm going to pass on merging this changeset. Even though MySQL does not support LIMIT on subqueries, you still could perform the limit prior to calling `prefetch()`, e.g.:\n\n``` python\nq1 = User.select()\nq2 = Blog.select().limit(10)\nprefetch(q1, q2) # does not work on mysql\n```\n\nInstead do:\n\n``` python\nq...
2014-06-30T16:11:52
2014-07-02T19:54:48
2014-07-02T19:20:33
CONTRIBUTOR
null
MySQL does not support using LIMIT and IN subquery. To fix you have to run the subquery first and then pass in the result. This will add 1 additional query for every subquery passed to prefetch. This approach causes errors in test_prefetch_non_pk_fk, test_prefetch_subquery and test_prefetch_subquery_same_depth due to t...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/381/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/381/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/381", "html_url": "https://github.com/coleifer/peewee/pull/381", "diff_url": "https://github.com/coleifer/peewee/pull/381.diff", "patch_url": "https://github.com/coleifer/peewee/pull/381.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/380
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/380/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/380/comments
https://api.github.com/repos/coleifer/peewee/issues/380/events
https://github.com/coleifer/peewee/issues/380
36,289,035
MDU6SXNzdWUzNjI4OTAzNQ==
380
SQLite migration bug?
{ "login": "coleifer", "id": 119974, "node_id": "MDQ6VXNlcjExOTk3NA==", "avatar_url": "https://avatars.githubusercontent.com/u/119974?v=4", "gravatar_id": "", "url": "https://api.github.com/users/coleifer", "html_url": "https://github.com/coleifer", "followers_url": "https://api.github.com/users/coleife...
[]
closed
false
null
[]
null
[ "I can confirm the weird behavior with the testcase above and on my code too. In my case the models are similar: a Feed model and an Entry model, with the latter having a FK to Feed. \n\nOn my machine it gives this error:\n\n> peewee.OperationalError: table page__tmp__ has no column named FOREIGN\n\nI'm using:\n\n`...
2014-06-23T13:11:32
2014-07-09T18:24:02
2014-07-09T18:24:02
OWNER
null
``` python class User(BaseModel): id = peewee.CharField(primary_key=True, max_length=20) class Page(BaseModel): id = peewee.PrimaryKeyField() name = peewee.TextField(unique=True, null=True) user = peewee.ForeignKeyField(User, null=True, related_name='pages') ``` Migration Script: ``` python from play...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/380/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/380/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/379
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/379/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/379/comments
https://api.github.com/repos/coleifer/peewee/issues/379/events
https://github.com/coleifer/peewee/pull/379
36,181,559
MDExOlB1bGxSZXF1ZXN0MTc0MTQzODY=
379
Enable automated testing with Python 3.4
{ "login": "frewsxcv", "id": 416575, "node_id": "MDQ6VXNlcjQxNjU3NQ==", "avatar_url": "https://avatars.githubusercontent.com/u/416575?v=4", "gravatar_id": "", "url": "https://api.github.com/users/frewsxcv", "html_url": "https://github.com/frewsxcv", "followers_url": "https://api.github.com/users/frewsxc...
[]
closed
false
null
[]
null
[]
2014-06-20T16:20:07
2014-06-20T19:07:11
2014-06-20T16:35:33
CONTRIBUTOR
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/379/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/379/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/379", "html_url": "https://github.com/coleifer/peewee/pull/379", "diff_url": "https://github.com/coleifer/peewee/pull/379.diff", "patch_url": "https://github.com/coleifer/peewee/pull/379.patch", "merged_at": "2014-06-20T16:35:33" }
https://api.github.com/repos/coleifer/peewee/issues/378
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/378/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/378/comments
https://api.github.com/repos/coleifer/peewee/issues/378/events
https://github.com/coleifer/peewee/issues/378
36,012,862
MDU6SXNzdWUzNjAxMjg2Mg==
378
Is it possible to create a view peewee or join a created query with model?
{ "login": "jonathan-s", "id": 2124818, "node_id": "MDQ6VXNlcjIxMjQ4MTg=", "avatar_url": "https://avatars.githubusercontent.com/u/2124818?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jonathan-s", "html_url": "https://github.com/jonathan-s", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "Ok, I solved it. \n\nI created a view in my database and then in my models.py I created a model for it. \n\n```\nclass UserOrder(BaseModel):\n link_to_id = PrimaryKeyField()\n avg_user = FloatField()\n\n class Meta:\n db_table = 'user_order'\n```\n\nWhere db_table is the reference to the actual vie...
2014-06-18T18:18:50
2014-06-19T15:20:22
2014-06-19T15:07:31
NONE
null
I tried doing this. But got an error. ``` daily = DailyData.select(DailyData.link_to, fn.avg(DailyData.nr_users).alias('avg_user')).group_by(DailyData.link_to) output = ExtensionData.select(ExtensionData.name).join(daily).order_by(sql('avg_user DESC')).limit(500) Traceback (most recent call last): File "<stdin>",...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/378/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/378/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/377
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/377/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/377/comments
https://api.github.com/repos/coleifer/peewee/issues/377/events
https://github.com/coleifer/peewee/issues/377
35,996,050
MDU6SXNzdWUzNTk5NjA1MA==
377
pwiz.py fails for postgres when schemas have cross-dependencies
{ "login": "demongoo", "id": 941459, "node_id": "MDQ6VXNlcjk0MTQ1OQ==", "avatar_url": "https://avatars.githubusercontent.com/u/941459?v=4", "gravatar_id": "", "url": "https://api.github.com/users/demongoo", "html_url": "https://github.com/demongoo", "followers_url": "https://api.github.com/users/demongo...
[]
closed
false
null
[]
null
[ "pwiz certainly has limitations and it's very possible cross-schema foreign keys are one of them. I think I will close this as wontfix but feel free to submit a patch.\n" ]
2014-06-18T15:18:27
2014-06-19T18:02:17
2014-06-19T18:02:17
NONE
null
I have a large PostgreSQL database, with multiple schemas. Some foreign keys involve cross-schema references. Currently `pwiz` just fails with `KeyError` here and there. In my case I've just quick-fixed script to ignore some missing keys and to spit out `UNDEFINED` instead of missing information, but of course it is no...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/377/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/377/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/376
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/376/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/376/comments
https://api.github.com/repos/coleifer/peewee/issues/376/events
https://github.com/coleifer/peewee/issues/376
35,871,976
MDU6SXNzdWUzNTg3MTk3Ng==
376
Created signal is not triggered.
{ "login": "soasme", "id": 369081, "node_id": "MDQ6VXNlcjM2OTA4MQ==", "avatar_url": "https://avatars.githubusercontent.com/u/369081?v=4", "gravatar_id": "", "url": "https://api.github.com/users/soasme", "html_url": "https://github.com/soasme", "followers_url": "https://api.github.com/users/soasme/follow...
[]
closed
false
null
[]
null
[ ":+1: \n" ]
2014-06-17T09:29:37
2014-06-18T14:54:46
2014-06-18T14:51:16
CONTRIBUTOR
null
Signal in playhouse/signal.py: ``` python def save(self, *args, **kwargs): created = not bool(self.get_id()) pre_save.send(self, created=created) super(Model, self).save(*args, **kwargs) post_save.send(self, created=created) ``` If I create a model via ``` python model = Model() model...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/376/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/376/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/375
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/375/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/375/comments
https://api.github.com/repos/coleifer/peewee/issues/375/events
https://github.com/coleifer/peewee/pull/375
35,871,686
MDExOlB1bGxSZXF1ZXN0MTcyMjQ0NTg=
375
Fix `count`, refs #350: default count changed to COUNT(*)
{ "login": "demongoo", "id": 941459, "node_id": "MDQ6VXNlcjk0MTQ1OQ==", "avatar_url": "https://avatars.githubusercontent.com/u/941459?v=4", "gravatar_id": "", "url": "https://api.github.com/users/demongoo", "html_url": "https://github.com/demongoo", "followers_url": "https://api.github.com/users/demongo...
[]
closed
false
null
[]
null
[ "Nice, I've added your changes.\n" ]
2014-06-17T09:25:58
2014-06-18T14:49:44
2014-06-18T14:49:44
NONE
null
Tests pass. Is there a strong reason to COUNT by primary keys rather than `COUNT(*)` ?
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/375/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/375/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/375", "html_url": "https://github.com/coleifer/peewee/pull/375", "diff_url": "https://github.com/coleifer/peewee/pull/375.diff", "patch_url": "https://github.com/coleifer/peewee/pull/375.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/374
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/374/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/374/comments
https://api.github.com/repos/coleifer/peewee/issues/374/events
https://github.com/coleifer/peewee/issues/374
35,735,471
MDU6SXNzdWUzNTczNTQ3MQ==
374
Row not inserted into table when using CompositeKey
{ "login": "scls19fr", "id": 109167, "node_id": "MDQ6VXNlcjEwOTE2Nw==", "avatar_url": "https://avatars.githubusercontent.com/u/109167?v=4", "gravatar_id": "", "url": "https://api.github.com/users/scls19fr", "html_url": "https://github.com/scls19fr", "followers_url": "https://api.github.com/users/scls19f...
[]
closed
false
null
[]
null
[ "Try reading\nhttp://peewee.readthedocs.org/en/latest/peewee/models.html#non-integer-primary-keys\nOn Jun 14, 2014 2:56 PM, \"scls19fr\" notifications@github.com wrote:\n\n> Hello,\n> \n> I'm new to Peewee.\n> \n> I did this code:\n> \n> from peewee import *\n> \n> db = SqliteDatabase('json_rpc.sqlite')\n> \n> clas...
2014-06-14T19:56:06
2014-06-16T02:32:59
2014-06-16T02:32:59
NONE
null
Hello, I'm new to Peewee. I did this code: ``` from peewee import * db = SqliteDatabase('json_rpc.sqlite') class RPC(Model): terminal_id = CharField() request_id = CharField() request = CharField() response = CharField() class Meta: database = db primary_key = CompositeKey('ter...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/374/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/374/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/373
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/373/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/373/comments
https://api.github.com/repos/coleifer/peewee/issues/373/events
https://github.com/coleifer/peewee/issues/373
35,735,018
MDU6SXNzdWUzNTczNTAxOA==
373
Row not inserted into table when using CompositeKey in Meta Model
{ "login": "scls19fr", "id": 109167, "node_id": "MDQ6VXNlcjEwOTE2Nw==", "avatar_url": "https://avatars.githubusercontent.com/u/109167?v=4", "gravatar_id": "", "url": "https://api.github.com/users/scls19fr", "html_url": "https://github.com/scls19fr", "followers_url": "https://api.github.com/users/scls19f...
[]
closed
false
null
[]
null
[]
2014-06-14T19:32:22
2014-06-16T02:33:03
2014-06-16T02:33:03
NONE
null
Hello, I'm new to Peewee. I did this code: ``` from peewee import * db = SqliteDatabase('json_rpc.sqlite') class RPC(Model): terminal_id = CharField() request_id = CharField() request = CharField() response = CharField() class Meta: database = db # this model uses the people database ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/373/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/373/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/372
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/372/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/372/comments
https://api.github.com/repos/coleifer/peewee/issues/372/events
https://github.com/coleifer/peewee/issues/372
35,733,318
MDU6SXNzdWUzNTczMzMxOA==
372
playhouse.migrate should use Database.compiler_class when possible
{ "login": "stas", "id": 112147, "node_id": "MDQ6VXNlcjExMjE0Nw==", "avatar_url": "https://avatars.githubusercontent.com/u/112147?v=4", "gravatar_id": "", "url": "https://api.github.com/users/stas", "html_url": "https://github.com/stas", "followers_url": "https://api.github.com/users/stas/followers", ...
[]
closed
false
null
[]
null
[ "Good catch, thanks I will look into fixing this.\n", "The thing is that the migrator methods for adding indexes are not aware of the column types, so this doesn't really make sense. Maybe it would be better to subclass `Migrator` and allow the `add_index` operation to accept some additional arguments?\n\nFor now...
2014-06-14T18:02:00
2014-07-11T08:22:17
2014-07-09T18:27:23
NONE
null
There're some inconsistencies between database compiler and migrator methods. A good example is the `add_index` method where when using Postgres, array and hstore fields won't get gist index types. Delegating these methods to the compiler class fixes the issue. This will also reduce the duplication.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/372/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/372/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/371
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/371/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/371/comments
https://api.github.com/repos/coleifer/peewee/issues/371/events
https://github.com/coleifer/peewee/pull/371
35,315,964
MDExOlB1bGxSZXF1ZXN0MTY5MDMyNjk=
371
correct variable name in insert_many example
{ "login": "amedeedaboville", "id": 826619, "node_id": "MDQ6VXNlcjgyNjYxOQ==", "avatar_url": "https://avatars.githubusercontent.com/u/826619?v=4", "gravatar_id": "", "url": "https://api.github.com/users/amedeedaboville", "html_url": "https://github.com/amedeedaboville", "followers_url": "https://api.git...
[]
closed
false
null
[]
null
[]
2014-06-09T19:31:45
2014-06-13T13:31:25
2014-06-10T00:44:53
CONTRIBUTOR
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/371/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/371/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/371", "html_url": "https://github.com/coleifer/peewee/pull/371", "diff_url": "https://github.com/coleifer/peewee/pull/371.diff", "patch_url": "https://github.com/coleifer/peewee/pull/371.patch", "merged_at": "2014-06-10T00:44:53" }
https://api.github.com/repos/coleifer/peewee/issues/370
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/370/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/370/comments
https://api.github.com/repos/coleifer/peewee/issues/370/events
https://github.com/coleifer/peewee/pull/370
35,262,638
MDExOlB1bGxSZXF1ZXN0MTY4NzI4MDc=
370
Updated Google Cloud SQL Documentation
{ "login": "jpttrssn", "id": 194305, "node_id": "MDQ6VXNlcjE5NDMwNQ==", "avatar_url": "https://avatars.githubusercontent.com/u/194305?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jpttrssn", "html_url": "https://github.com/jpttrssn", "followers_url": "https://api.github.com/users/jpttrss...
[]
closed
false
null
[]
null
[ "Nice, could you rebase your commits into a single commit?\n", "Done.\n", "Nice, thank you very much!\n" ]
2014-06-09T06:16:52
2014-06-20T17:41:56
2014-06-09T19:36:13
CONTRIBUTOR
null
I updated the Google Cloud SQL documentation section to reflect how to use peewee in both development and production.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/370/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/370/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/370", "html_url": "https://github.com/coleifer/peewee/pull/370", "diff_url": "https://github.com/coleifer/peewee/pull/370.diff", "patch_url": "https://github.com/coleifer/peewee/pull/370.patch", "merged_at": "2014-06-09T19:36:13" }
https://api.github.com/repos/coleifer/peewee/issues/369
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/369/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/369/comments
https://api.github.com/repos/coleifer/peewee/issues/369/events
https://github.com/coleifer/peewee/pull/369
35,219,209
MDExOlB1bGxSZXF1ZXN0MTY4NTc5MDA=
369
Resolved issues with using peewee on app engine.
{ "login": "jpttrssn", "id": 194305, "node_id": "MDQ6VXNlcjE5NDMwNQ==", "avatar_url": "https://avatars.githubusercontent.com/u/194305?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jpttrssn", "html_url": "https://github.com/jpttrssn", "followers_url": "https://api.github.com/users/jpttrss...
[]
closed
false
null
[]
null
[ "I think I might take a crack at this myself. I'm surprised that there's no sqlite on GAE!\n", "Fixed in 6838d8ec54093ebefca4b436abff601e14f94795 -- thanks for the diff and bringing this to my attention! Look forward to more PRs in the future!\n" ]
2014-06-07T21:37:06
2014-07-06T01:49:55
2014-06-08T11:33:44
CONTRIBUTOR
null
App Engine does not support sqlite3 so in order to get peewee to work I had to add in checks for it. This was my quick and dirty solution. There's probably a more elegant way to handle this.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/369/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/369/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/369", "html_url": "https://github.com/coleifer/peewee/pull/369", "diff_url": "https://github.com/coleifer/peewee/pull/369.diff", "patch_url": "https://github.com/coleifer/peewee/pull/369.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/368
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/368/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/368/comments
https://api.github.com/repos/coleifer/peewee/issues/368/events
https://github.com/coleifer/peewee/issues/368
34,857,316
MDU6SXNzdWUzNDg1NzMxNg==
368
Model.__getattribute__
{ "login": "jonathan-s", "id": 2124818, "node_id": "MDQ6VXNlcjIxMjQ4MTg=", "avatar_url": "https://avatars.githubusercontent.com/u/2124818?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jonathan-s", "html_url": "https://github.com/jonathan-s", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "Where is the `TypeError` originating from? Can you include the full traceback?\n", "Actually I think I know what might be happening.\n\nTry changing your `__getattribute__()` to `getattr`, e.g.\n\n``` python\nExtensionData.select().order_by(getattr(DailyData, prop).desc()).limit(500).iterator()\n```\n", "Thank...
2014-06-03T12:10:03
2014-06-03T13:56:42
2014-06-03T13:53:06
NONE
null
The following works as expected: ``` prop = 'nr_users' datapoints = entry.data_entries.order_by(DailyData.date_scraped.desc()).limit(10) data = data + [str(entry.__getattribute__(prop)) for entry in datapoints] ``` However the following does not work. I'm not sure if that is expected or not. But I expected it to work...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/368/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/368/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/367
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/367/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/367/comments
https://api.github.com/repos/coleifer/peewee/issues/367/events
https://github.com/coleifer/peewee/issues/367
34,746,365
MDU6SXNzdWUzNDc0NjM2NQ==
367
test failures under py3 in latest release
{ "login": "idella", "id": 1655078, "node_id": "MDQ6VXNlcjE2NTUwNzg=", "avatar_url": "https://avatars.githubusercontent.com/u/1655078?v=4", "gravatar_id": "", "url": "https://api.github.com/users/idella", "html_url": "https://github.com/idella", "followers_url": "https://api.github.com/users/idella/foll...
[]
closed
false
null
[]
null
[ "I run continuous integration with python versions 2.6, 2.7, 3.2 and 3.3 and both sqlite and postgresql backends. All appear to be passing:\n\nhttps://travis-ci.org/coleifer/peewee\n", "On current Gentoo (unstable), I observe the same test failures and output as idella attached above when running `PEEWEE_TEST_BAC...
2014-06-02T05:03:56
2014-06-02T13:41:03
2014-06-02T09:57:12
NONE
null
On the presumption peewee is intended to support py3. we have the following; Running with system python 3.3; ``` python ====================================================================== ERROR: test_slicing_dicing (tests.QueryResultWrapperTestCase) ------------------------------------------------------------------...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/367/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/367/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/366
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/366/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/366/comments
https://api.github.com/repos/coleifer/peewee/issues/366/events
https://github.com/coleifer/peewee/issues/366
34,727,608
MDU6SXNzdWUzNDcyNzYwOA==
366
How to get foreign key column itself?
{ "login": "ayang", "id": 556676, "node_id": "MDQ6VXNlcjU1NjY3Ng==", "avatar_url": "https://avatars.githubusercontent.com/u/556676?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ayang", "html_url": "https://github.com/ayang", "followers_url": "https://api.github.com/users/ayang/followers"...
[]
closed
false
null
[]
null
[ "You can use `Pet._data['owner']`.\n", "Thank you\n" ]
2014-06-01T12:35:32
2014-06-01T14:28:42
2014-06-01T13:51:33
NONE
null
Example for this: class Person(Model): name = CharField() birthday = DateField() class Pet(Model): owner = ForeignKeyField(Person, related_name='pets') name = CharField() I want to get pet.owner_id, but I can only use pet.owner.id, which will execute a sql query extraly.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/366/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/366/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/365
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/365/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/365/comments
https://api.github.com/repos/coleifer/peewee/issues/365/events
https://github.com/coleifer/peewee/issues/365
34,718,411
MDU6SXNzdWUzNDcxODQxMQ==
365
How to do deferred engine selection?
{ "login": "arnuschky", "id": 179920, "node_id": "MDQ6VXNlcjE3OTkyMA==", "avatar_url": "https://avatars.githubusercontent.com/u/179920?v=4", "gravatar_id": "", "url": "https://api.github.com/users/arnuschky", "html_url": "https://github.com/arnuschky", "followers_url": "https://api.github.com/users/arnu...
[]
closed
false
null
[]
null
[ "I am now monkey-patching my models (see issue mentioned above). Would be great if we could come up with a less 'hacky' solutions, though.\n", "Check out these docs: http://peewee.readthedocs.org/en/latest/peewee/cookbook.html#dynamically-defining-a-database\n", "Ah. D'oh. Thank you. Works like a charm.\n", "...
2014-06-01T00:13:55
2018-03-15T16:07:48
2014-06-01T13:49:33
NONE
null
How can one do deferred engine selection? For example, if I use a class similarly as `Database` of `flask-peewee`, I would like to select the engine/configure peewee after creation of the instance (ie, the commong `init_app()` approach). Unfortunately, all my models need to know their baseclass to reference the databa...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/365/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/365/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/364
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/364/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/364/comments
https://api.github.com/repos/coleifer/peewee/issues/364/events
https://github.com/coleifer/peewee/issues/364
34,495,696
MDU6SXNzdWUzNDQ5NTY5Ng==
364
DISTINCT ON
{ "login": "coleifer", "id": 119974, "node_id": "MDQ6VXNlcjExOTk3NA==", "avatar_url": "https://avatars.githubusercontent.com/u/119974?v=4", "gravatar_id": "", "url": "https://api.github.com/users/coleifer", "html_url": "https://github.com/coleifer", "followers_url": "https://api.github.com/users/coleife...
[]
closed
false
null
[]
null
[ "I did a bit of digging and it looks like you can write:\n\n```\nSELECT DISTINCT(col1, col2), col1, ... FROM\n```\n\nSo I'm going to close this since you can emulate this:\n\n``` python\nMyModel.select(fn.DISTINCT(MyModel.col1, MyModel.col2), MyModel.col1)...\n```\n", "Actually it turns out the semantics are a bi...
2014-05-28T18:54:13
2014-05-29T03:32:17
2014-05-29T03:32:07
OWNER
null
First-class support for this feature.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/364/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/364/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/363
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/363/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/363/comments
https://api.github.com/repos/coleifer/peewee/issues/363/events
https://github.com/coleifer/peewee/pull/363
34,462,355
MDExOlB1bGxSZXF1ZXN0MTY0MjQ2MDQ=
363
Created a new parameter 'reconnect' to indicate if MySQLAdapter can try ...
{ "login": "andmart", "id": 303252, "node_id": "MDQ6VXNlcjMwMzI1Mg==", "avatar_url": "https://avatars.githubusercontent.com/u/303252?v=4", "gravatar_id": "", "url": "https://api.github.com/users/andmart", "html_url": "https://github.com/andmart", "followers_url": "https://api.github.com/users/andmart/fo...
[]
closed
false
null
[]
null
[ "I am going to pass on this, but if you would like you can always subclass `MySQLDatabase` and implement this logic yourself. Catching `Exception` is far too broad and I believe this will lead to unpredictable behavior.\n", "It's true. I created a MySQLWithReconnectDatabase and narrowed the exception to _mysql_ex...
2014-05-28T12:42:52
2015-09-30T03:40:31
2014-05-28T15:22:24
NONE
null
Created a new parameter 'reconnect' to indicate if MySQLAdapter can try reconnect to server. In long time connections, timeout makes connection to drop. I have an app that faces too many "MySQL server has gone away" errors. So, this can try reconnect to the server in case of timeout.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/363/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/363/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/363", "html_url": "https://github.com/coleifer/peewee/pull/363", "diff_url": "https://github.com/coleifer/peewee/pull/363.diff", "patch_url": "https://github.com/coleifer/peewee/pull/363.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/362
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/362/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/362/comments
https://api.github.com/repos/coleifer/peewee/issues/362/events
https://github.com/coleifer/peewee/issues/362
34,407,470
MDU6SXNzdWUzNDQwNzQ3MA==
362
Having to declare database path as static global is harmful
{ "login": "mchaput", "id": 362643, "node_id": "MDQ6VXNlcjM2MjY0Mw==", "avatar_url": "https://avatars.githubusercontent.com/u/362643?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mchaput", "html_url": "https://github.com/mchaput", "followers_url": "https://api.github.com/users/mchaput/fo...
[]
closed
false
null
[]
null
[ "Docs:\n- http://peewee.readthedocs.org/en/latest/peewee/cookbook.html#deferring-initialization\n- http://peewee.readthedocs.org/en/latest/peewee/cookbook.html#dynamically-defining-a-database\n\n> If the only way to use it is with globals, I don't think I can use peewee at all and I'll have to try something else.\...
2014-05-27T20:01:13
2014-05-27T20:12:16
2014-05-27T20:12:16
NONE
null
It's a real problem for me that I have to hardcode the path to the database as a global. This basically makes it impossible to use peewee in a library where I expect to have the database path passed to me. I can work around hardcoding the value by gymnastics stuffing a value into a global location before I import peew...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/362/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/362/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/361
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/361/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/361/comments
https://api.github.com/repos/coleifer/peewee/issues/361/events
https://github.com/coleifer/peewee/issues/361
34,252,927
MDU6SXNzdWUzNDI1MjkyNw==
361
test failures in -0.2.1; test_choices test_null_form_saving
{ "login": "idella", "id": 1655078, "node_id": "MDQ6VXNlcjE2NTUwNzg=", "avatar_url": "https://avatars.githubusercontent.com/u/1655078?v=4", "gravatar_id": "", "url": "https://api.github.com/users/idella", "html_url": "https://github.com/idella", "followers_url": "https://api.github.com/users/idella/foll...
[]
closed
false
null
[]
null
[ "The latest version, 0.2.3, is passing for me.\n", "sorry, still get 1 fail; Updated to peewee>=2.0.0, also wtforms.\n$ python -V\nPython 2.7.6\n\n``` python\nwtf-peewee-0.2.3 $ PYTHONPATH=. python ./runtests.py \ntest_blog_form (wtfpeewee.tests.WTFPeeweeTestCase) ... ok\ntest_blog_form_saving (wtfpeewee.tests.W...
2014-05-25T03:11:34
2014-07-07T02:41:13
2014-05-25T09:33:44
NONE
null
tested under only py2.7. ``` python ====================================================== FAIL: test_choices (wtfpeewee.tests.WTFPeeweeTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/mnt/gen2/TmpDir/portage/dev-python/wtf-peewee-0.2.1/work/w...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/361/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/361/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/360
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/360/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/360/comments
https://api.github.com/repos/coleifer/peewee/issues/360/events
https://github.com/coleifer/peewee/issues/360
34,173,362
MDU6SXNzdWUzNDE3MzM2Mg==
360
Compiler interpolation
{ "login": "oz123", "id": 1083045, "node_id": "MDQ6VXNlcjEwODMwNDU=", "avatar_url": "https://avatars.githubusercontent.com/u/1083045?v=4", "gravatar_id": "", "url": "https://api.github.com/users/oz123", "html_url": "https://github.com/oz123", "followers_url": "https://api.github.com/users/oz123/follower...
[]
closed
false
null
[]
null
[ "The `Database` class has an `interpolation` attribute which you could set:\n\n``` python\nclass OracleDatabase(Database):\n interpolation = '%s'\n```\n\nUnfortunately there is no support for automatically numbering parameters. Will `%s` work?\n" ]
2014-05-23T13:12:56
2014-05-23T17:02:47
2014-05-23T17:02:47
NONE
null
Hi, I am trying to use peewee with cx_Oracle. So far with limited success. When I issue `inst.save()` it compiles an expression with `?`. e.g I have a model : ``` class TestDBOz(pw.BaseModel): sessionid = pw.IntegerField() action = pw.Charfield() sid=TestDbOz(sessionid=123, action='Test')...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/360/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/360/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/359
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/359/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/359/comments
https://api.github.com/repos/coleifer/peewee/issues/359/events
https://github.com/coleifer/peewee/issues/359
33,768,414
MDU6SXNzdWUzMzc2ODQxNA==
359
peewee.IntegrityErro no fallback to update
{ "login": "DarkRedman", "id": 367844, "node_id": "MDQ6VXNlcjM2Nzg0NA==", "avatar_url": "https://avatars.githubusercontent.com/u/367844?v=4", "gravatar_id": "", "url": "https://api.github.com/users/DarkRedman", "html_url": "https://github.com/DarkRedman", "followers_url": "https://api.github.com/users/D...
[]
closed
false
null
[]
null
[ "> could it be updated to work with unique constraint too?\n\nThat would be a couple line function to write, so I think I will leave it out of peewee for now.\n" ]
2014-05-19T03:09:43
2014-05-19T14:53:30
2014-05-19T14:53:30
NONE
null
When I read this section : http://peewee.readthedocs.org/en/latest/peewee/api.html?highlight=save#Model.save I see the force_insert only work for the primary key, could it be updated to work with unique constraint too ? For example if I create a sql object with a varchar field with unique constraint (and the has a dup...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/359/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/359/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/358
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/358/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/358/comments
https://api.github.com/repos/coleifer/peewee/issues/358/events
https://github.com/coleifer/peewee/issues/358
33,707,702
MDU6SXNzdWUzMzcwNzcwMg==
358
Create a test_database
{ "login": "jonathan-s", "id": 2124818, "node_id": "MDQ6VXNlcjIxMjQ4MTg=", "avatar_url": "https://avatars.githubusercontent.com/u/2124818?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jonathan-s", "html_url": "https://github.com/jonathan-s", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "You have many options, actually. You can:\n1. Set `ModelClass._meta.database` by hand, changing it to a test database.\n2. Use a `Proxy` for your `Database` and initialize it with a different database when testing [how-to](http://peewee.readthedocs.org/en/latest/peewee/cookbook.html#dynamically-defining-a-database...
2014-05-16T20:41:17
2014-05-16T21:49:49
2014-05-16T21:43:03
NONE
null
When you create a model, the database is tightly coupled with the model itself. When testing a model it doesn't seem to be possible to create a test_database which you then destroy at the end of the test.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/358/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/358/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/357
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/357/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/357/comments
https://api.github.com/repos/coleifer/peewee/issues/357/events
https://github.com/coleifer/peewee/issues/357
33,677,954
MDU6SXNzdWUzMzY3Nzk1NA==
357
Override 'AS' in 'FROM table AS t1'
{ "login": "devsli", "id": 3928644, "node_id": "MDQ6VXNlcjM5Mjg2NDQ=", "avatar_url": "https://avatars.githubusercontent.com/u/3928644?v=4", "gravatar_id": "", "url": "https://api.github.com/users/devsli", "html_url": "https://github.com/devsli", "followers_url": "https://api.github.com/users/devsli/foll...
[]
closed
false
null
[]
null
[ "Interesting, I think this should be fixable but will require a quick code change.\n\n``` python\n def parse_node(self, node, alias_map=None, conv=None):\n sql, params, unknown = self._parse(node, alias_map, conv)\n if unknown and conv and params:\n params = [conv.db_value(i) for i in pa...
2014-05-16T14:13:45
2014-05-17T18:33:25
2014-05-17T18:30:02
NONE
null
Seems like 'AS' is hardcoded [here](https://github.com/coleifer/peewee/blob/master/peewee.py#L1179). Is it possible to override it in database subclass? Firebird [doesn't use](http://www.firebirdsql.org/refdocs/langrefupd21-select.html) 'AS' for aliases. EDIT: worksforme in firebird2.5 test case, need clarification
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/357/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/357/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/356
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/356/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/356/comments
https://api.github.com/repos/coleifer/peewee/issues/356/events
https://github.com/coleifer/peewee/issues/356
33,596,116
MDU6SXNzdWUzMzU5NjExNg==
356
Using PostgreSQL, Model.create() leaves connection idle in transaction
{ "login": "gmcnutt", "id": 1097321, "node_id": "MDQ6VXNlcjEwOTczMjE=", "avatar_url": "https://avatars.githubusercontent.com/u/1097321?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gmcnutt", "html_url": "https://github.com/gmcnutt", "followers_url": "https://api.github.com/users/gmcnutt/...
[]
closed
false
null
[]
null
[ "Duplicate of #353. The latest pypi release (2.2.4) has the fix.\n", "Confirmed, thanks.\n" ]
2014-05-15T15:23:47
2014-05-15T16:25:09
2014-05-15T15:27:28
NONE
null
peewee==2.1.7 psycopg2==2.5.1 psql (9.3.4) Python 3.4.0 (default, Apr 28 2014, 13:52:15) The following code snippet will reproduce it: ``` python from peewee import * db = PostgresqlDatabase('dbname', user='user', password='password', host='localhost') db.connect() class Test(Model): cla...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/356/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/356/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/355
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/355/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/355/comments
https://api.github.com/repos/coleifer/peewee/issues/355/events
https://github.com/coleifer/peewee/issues/355
33,578,449
MDU6SXNzdWUzMzU3ODQ0OQ==
355
IntegrityError
{ "login": "tfeldmann", "id": 385566, "node_id": "MDQ6VXNlcjM4NTU2Ng==", "avatar_url": "https://avatars.githubusercontent.com/u/385566?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tfeldmann", "html_url": "https://github.com/tfeldmann", "followers_url": "https://api.github.com/users/tfel...
[]
closed
false
null
[]
null
[ "The issue is that the samples are instantiated before the `Group` has an ID. Peewee looks at the group passed in (`group=self`) and attempts to read an ID off it. Since it has no ID at the time of assignment, you get the error you're seeing. Put the call to `g.save()` before `g.samples()[0].name` and you'll be set...
2014-05-15T11:54:47
2014-05-15T14:00:28
2014-05-15T13:44:59
NONE
null
Example code: ``` python from peewee import * database = SqliteDatabase(':memory:', threadlocals=True) class BaseModel(Model): class Meta: database = database class Group(BaseModel): name = IntegerField() _samples = None def samples(self): """Samples are generated the first time t...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/355/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/355/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/354
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/354/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/354/comments
https://api.github.com/repos/coleifer/peewee/issues/354/events
https://github.com/coleifer/peewee/issues/354
33,532,378
MDU6SXNzdWUzMzUzMjM3OA==
354
Race condition in example
{ "login": "kmarekspartz", "id": 969868, "node_id": "MDQ6VXNlcjk2OTg2OA==", "avatar_url": "https://avatars.githubusercontent.com/u/969868?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kmarekspartz", "html_url": "https://github.com/kmarekspartz", "followers_url": "https://api.github.com/u...
[]
closed
false
null
[]
null
[ "That's too bad you found a \"code smell\".\n\nThe example app is meant to be very simple and approachable, especially for someone new to peewee. The fact that it doesn't handle concurrent requests to create a new account was acceptable to me when I wrote it, but I guess that is a code smell.\n\nSince you point it ...
2014-05-14T20:57:41
2014-05-14T23:03:50
2014-05-14T22:42:31
NONE
null
I was trying out peewee and reading through the documentation when I came across a code smell. The [documentation](http://peewee.readthedocs.org/en/latest/peewee/example.html?#creating-new-objects) gives an example as follows: ``` Python try: user = User.get(User.username == request.form['username']) ... exce...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/354/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/354/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/353
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/353/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/353/comments
https://api.github.com/repos/coleifer/peewee/issues/353/events
https://github.com/coleifer/peewee/issues/353
33,450,220
MDU6SXNzdWUzMzQ1MDIyMA==
353
PostgresqlDatabase.last_insert_id w/ autocommit=True leaves open transactions
{ "login": "justinrosenthal", "id": 804338, "node_id": "MDQ6VXNlcjgwNDMzOA==", "avatar_url": "https://avatars.githubusercontent.com/u/804338?v=4", "gravatar_id": "", "url": "https://api.github.com/users/justinrosenthal", "html_url": "https://github.com/justinrosenthal", "followers_url": "https://api.git...
[]
closed
false
null
[]
null
[ "Are you sure about this? Any way you can demonstrate this behavior?\nOn May 13, 2014 6:58 PM, \"Justin Rosenthal\" notifications@github.com\nwrote:\n\n> If you do a Model.create with a PostgresqlDatabase that has autocommit\n> enabled, you'll be left with an unclosed transaction. Since it's in\n> autocommit mode, ...
2014-05-13T23:58:14
2014-05-15T15:27:28
2014-05-14T02:22:35
NONE
null
If you do a `Model.create` with a PostgresqlDatabase that has autocommit enabled, you'll be left with an unclosed transaction. Since it's in autocommit mode, it's most likely the case that you won't close it yourself. `InsertQuery.execute` returns `self.database.last_insert_id(self._execute(), self.model_class)`. Th...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/353/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/353/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/352
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/352/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/352/comments
https://api.github.com/repos/coleifer/peewee/issues/352/events
https://github.com/coleifer/peewee/issues/352
33,319,614
MDU6SXNzdWUzMzMxOTYxNA==
352
Show sql feature
{ "login": "andmart", "id": 303252, "node_id": "MDQ6VXNlcjMwMzI1Mg==", "avatar_url": "https://avatars.githubusercontent.com/u/303252?v=4", "gravatar_id": "", "url": "https://api.github.com/users/andmart", "html_url": "https://github.com/andmart", "followers_url": "https://api.github.com/users/andmart/fo...
[]
closed
false
null
[]
null
[]
2014-05-12T15:44:58
2014-05-12T16:14:22
2014-05-12T16:14:22
NONE
null
Is there a feature that write to console in debug mode or not the sql created?
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/352/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/352/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/351
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/351/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/351/comments
https://api.github.com/repos/coleifer/peewee/issues/351/events
https://github.com/coleifer/peewee/issues/351
33,138,473
MDU6SXNzdWUzMzEzODQ3Mw==
351
peewee mysql gone away error
{ "login": "FashtimeDotCom", "id": 3240392, "node_id": "MDQ6VXNlcjMyNDAzOTI=", "avatar_url": "https://avatars.githubusercontent.com/u/3240392?v=4", "gravatar_id": "", "url": "https://api.github.com/users/FashtimeDotCom", "html_url": "https://github.com/FashtimeDotCom", "followers_url": "https://api.gith...
[]
closed
false
null
[]
null
[ "This is not a bug with peewee per-se. This has been brought up a few times.\n- #225\n- #239 \n- #67 \n\nPlease search before creating new issues in the future!\n", "## http://docs.peewee-orm.com/en/latest/peewee/database.html#error-2006-mysql-server-has-gone-away\n", "An alternate fix is implemented in 017e4e4...
2014-05-09T01:09:13
2019-09-13T16:26:05
2014-05-09T13:21:26
NONE
null
when i use peewee,and try to fix this error, but try more ways failed! the error always occured! exception:: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1141, in _when_complete callback() File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", li...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/351/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/351/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/350
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/350/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/350/comments
https://api.github.com/repos/coleifer/peewee/issues/350/events
https://github.com/coleifer/peewee/issues/350
33,127,819
MDU6SXNzdWUzMzEyNzgxOQ==
350
count() and exists() don't work when primary_key is a CompositeKey
{ "login": "PatSmuk", "id": 75297, "node_id": "MDQ6VXNlcjc1Mjk3", "avatar_url": "https://avatars.githubusercontent.com/u/75297?v=4", "gravatar_id": "", "url": "https://api.github.com/users/PatSmuk", "html_url": "https://github.com/PatSmuk", "followers_url": "https://api.github.com/users/PatSmuk/follower...
[]
closed
false
null
[]
null
[ "Is this example code related to bitcoin in some way?\n", "It is. We're using peewee to power [our website](http://blackcoinpool.com/). If you drop a wallet address I'd be happy to send some Bitcoin or Blackcoin your way. :smiley: \n", "> It is. We're using peewee to power our website. If you drop a wallet addr...
2014-05-08T21:57:47
2014-06-18T21:19:07
2014-06-18T14:47:09
NONE
null
I have a table that has its primary_key set to a CompositeKey, and attempting to use count() or exists() with that table causes a **peewee.ProgrammingError**. Here's the trace: ``` Traceback (most recent call last): File "C:\Python27\lib\site-packages\flask\app.py", line 1836, in __call__ return self.wsgi_app(e...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/350/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/350/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/349
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/349/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/349/comments
https://api.github.com/repos/coleifer/peewee/issues/349/events
https://github.com/coleifer/peewee/issues/349
32,464,735
MDU6SXNzdWUzMjQ2NDczNQ==
349
delete_instance() deletes multiple rows in a table
{ "login": "nullism", "id": 730290, "node_id": "MDQ6VXNlcjczMDI5MA==", "avatar_url": "https://avatars.githubusercontent.com/u/730290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/nullism", "html_url": "https://github.com/nullism", "followers_url": "https://api.github.com/users/nullism/fo...
[]
closed
false
null
[]
null
[ "I added a testcase in deef4531b9fc0c87cbecdec8d059650d6e83936c and it is passing. You may need to upgrade your peewee version. What version are you using currently?\n", "I'm currently on 2.2.2. I'll test with the upgrade ASAP. Thanks for the assistance ;)\n\n```\n>>> import peewee\n>>> peewee.__version__\n'2.2.2...
2014-04-29T17:05:19
2014-04-29T20:22:55
2014-04-29T20:22:55
NONE
null
Hello, I've poured over the documentation for delete_instance(), but I found no reference for this behavior I'm currently seeing. I have two models. `Project` and `ProjectBranch`. `Project` is just a CharField. `ProjectBranch` is as follows: ``` python class ProjectBranch(DBModel): name = CharField() proje...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/349/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/349/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/348
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/348/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/348/comments
https://api.github.com/repos/coleifer/peewee/issues/348/events
https://github.com/coleifer/peewee/issues/348
32,350,573
MDU6SXNzdWUzMjM1MDU3Mw==
348
Sqlite and ESCAPE
{ "login": "ticapix", "id": 3089662, "node_id": "MDQ6VXNlcjMwODk2NjI=", "avatar_url": "https://avatars.githubusercontent.com/u/3089662?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ticapix", "html_url": "https://github.com/ticapix", "followers_url": "https://api.github.com/users/ticapix/...
[]
closed
false
null
[]
null
[ "You can put together a clause:\n\n``` python\n>>> query = User.select().where(User.username ** Clause('t\\_t', SQL(\"ESCAPE '\\\\'\")))\n>>> print query.sql()\n('SELECT t1.\"id\", t1.\"username\" FROM \"user\" AS t1 WHERE (t1.\"username\" LIKE ? ESCAPE \\'\\\\\\')', [u't\\\\_t'])\n\n```\n" ]
2014-04-28T11:18:20
2014-04-28T16:34:41
2014-04-28T16:34:41
NONE
null
Hi, I'm trying to use the LIKE operator to match entries containing underscore '_' and percent '%'. If I understood correctly the Sqlite doc [1], I have to add the ESCAPE 'my escape char' The common escape char is '\' (I saw '!' too in some online examples) ``` sqlite> SELECT 't_t' LIKE 't\_t' ESCAPE '\'; 1 sqlite> S...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/348/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/348/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/347
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/347/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/347/comments
https://api.github.com/repos/coleifer/peewee/issues/347/events
https://github.com/coleifer/peewee/issues/347
32,200,713
MDU6SXNzdWUzMjIwMDcxMw==
347
pwiz not iterating columns for the correct database
{ "login": "caelx", "id": 1686351, "node_id": "MDQ6VXNlcjE2ODYzNTE=", "avatar_url": "https://avatars.githubusercontent.com/u/1686351?v=4", "gravatar_id": "", "url": "https://api.github.com/users/caelx", "html_url": "https://github.com/caelx", "followers_url": "https://api.github.com/users/caelx/follower...
[]
closed
false
null
[]
null
[ "I'm not very familiar with MySQL's handling of `table_schema`. What is the effect of saying `table_schema = DATABASE()`?\n", "Also, fwiw, I just pushed a rewrite of pwiz (183cf77cb9446d428f12612c8a0e47a5279a0fcc), so any changes will be against that code.\n", "the table_schema is the database that the table co...
2014-04-25T01:48:16
2014-05-03T14:54:05
2014-05-03T14:54:05
NONE
null
We have two databases with tables that have the same name, this can sometimes cause pwiz to fail when inspecting the columns because the database is not specified. This is what causes the issue: ``` python def get_columns(self, table): pk_col = self.get_primary_key(table) # Get basic metadata abo...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/347/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/347/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/346
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/346/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/346/comments
https://api.github.com/repos/coleifer/peewee/issues/346/events
https://github.com/coleifer/peewee/issues/346
32,104,019
MDU6SXNzdWUzMjEwNDAxOQ==
346
Count() returns 0 with pagination > 1, else it returns the full result set.
{ "login": "nullism", "id": 730290, "node_id": "MDQ6VXNlcjczMDI5MA==", "avatar_url": "https://avatars.githubusercontent.com/u/730290?v=4", "gravatar_id": "", "url": "https://api.github.com/users/nullism", "html_url": "https://github.com/nullism", "followers_url": "https://api.github.com/users/nullism/fo...
[]
closed
false
null
[]
null
[ "When performing a LIMIT or OFFSET you need to wrap the call to count:\n\n``` python\nCommit.select().paginate(1, 5).count() # 8\nCommit.select().paginate(1, 5).wrapped_count(False) # 5\n```\n", "Ah understood. I apologize for submitting this. Apparently I assume too much ;)\n" ]
2014-04-23T22:05:33
2014-04-24T01:17:43
2014-04-23T22:14:33
NONE
null
Is this expected behavior? It seems strange to me, but I acknowledge that there may be some reason for it which I don't fully understand. Example: ``` python def print_commits(commits): print "="*20 total = 0 for c in commits: total += 1 #print c.id print "Total:", total, "Count():", c...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/346/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/346/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/345
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/345/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/345/comments
https://api.github.com/repos/coleifer/peewee/issues/345/events
https://github.com/coleifer/peewee/pull/345
31,886,590
MDExOlB1bGxSZXF1ZXN0MTQ5NjE4MzE=
345
Typo fix
{ "login": "thedod", "id": 225574, "node_id": "MDQ6VXNlcjIyNTU3NA==", "avatar_url": "https://avatars.githubusercontent.com/u/225574?v=4", "gravatar_id": "", "url": "https://api.github.com/users/thedod", "html_url": "https://github.com/thedod", "followers_url": "https://api.github.com/users/thedod/follow...
[]
closed
false
null
[]
null
[]
2014-04-21T08:41:29
2014-07-06T01:49:58
2014-04-21T14:04:17
CONTRIBUTOR
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/345/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/345/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/345", "html_url": "https://github.com/coleifer/peewee/pull/345", "diff_url": "https://github.com/coleifer/peewee/pull/345.diff", "patch_url": "https://github.com/coleifer/peewee/pull/345.patch", "merged_at": "2014-04-21T14:04:17" }
https://api.github.com/repos/coleifer/peewee/issues/344
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/344/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/344/comments
https://api.github.com/repos/coleifer/peewee/issues/344/events
https://github.com/coleifer/peewee/issues/344
31,835,906
MDU6SXNzdWUzMTgzNTkwNg==
344
Feature request: provide feedback if Model.save() succeeded
{ "login": "CodeZombieCH", "id": 729017, "node_id": "MDQ6VXNlcjcyOTAxNw==", "avatar_url": "https://avatars.githubusercontent.com/u/729017?v=4", "gravatar_id": "", "url": "https://api.github.com/users/CodeZombieCH", "html_url": "https://github.com/CodeZombieCH", "followers_url": "https://api.github.com/u...
[]
closed
false
null
[]
null
[ "Peewee doesn't try to be too clever here, but you're right, the update statement will fail silently, which I agree is bad.\n", "Fixed in e73d3db12fb370c48cca8f45514a7fed9637949c -- returns number of rows affected (1 always in case of inserts, but could be 0/1 for updates).\n", "Cool, thanks a lot.\n" ]
2014-04-19T02:18:21
2014-04-22T12:50:11
2014-04-20T12:14:57
NONE
null
The current implementation of [Model.save()](https://github.com/coleifer/peewee/blob/master/peewee.py#L3071) does not provide any feedback if the save operation failed or succeeded. In the case a retrieved record has been deleted by a concurrent process in the meantime, the executed UPDATE statement finds no matching r...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/344/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/344/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/343
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/343/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/343/comments
https://api.github.com/repos/coleifer/peewee/issues/343/events
https://github.com/coleifer/peewee/pull/343
31,830,805
MDExOlB1bGxSZXF1ZXN0MTQ5Mzc2OTg=
343
playhouse.sqlcipher_ext.SqlCipherDatabase
{ "login": "thedod", "id": 225574, "node_id": "MDQ6VXNlcjIyNTU3NA==", "avatar_url": "https://avatars.githubusercontent.com/u/225574?v=4", "gravatar_id": "", "url": "https://api.github.com/users/thedod", "html_url": "https://github.com/thedod", "followers_url": "https://api.github.com/users/thedod/follow...
[]
closed
false
null
[]
null
[ "Ouch :cold_sweat: forgot to test _without_ `-e pysqlcipher`. Sorting it out now...\n", "If you take a look at peewee's source code you will see that I have tried to stick to pep8 in most places. I've also tried to have uniform formatting of comments.\n", "I believe your tests are failing because you have not r...
2014-04-18T23:06:38
2014-06-19T08:10:04
2014-05-03T15:37:22
CONTRIBUTOR
null
Tests pass with `-e pysqcipher` and with `--pysqlcipher`
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/343/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/343/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/343", "html_url": "https://github.com/coleifer/peewee/pull/343", "diff_url": "https://github.com/coleifer/peewee/pull/343.diff", "patch_url": "https://github.com/coleifer/peewee/pull/343.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/342
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/342/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/342/comments
https://api.github.com/repos/coleifer/peewee/issues/342/events
https://github.com/coleifer/peewee/issues/342
31,694,294
MDU6SXNzdWUzMTY5NDI5NA==
342
Coersion failing because of function type conversion
{ "login": "caelx", "id": 1686351, "node_id": "MDQ6VXNlcjE2ODYzNTE=", "avatar_url": "https://avatars.githubusercontent.com/u/1686351?v=4", "gravatar_id": "", "url": "https://api.github.com/users/caelx", "html_url": "https://github.com/caelx", "followers_url": "https://api.github.com/users/caelx/follower...
[]
closed
false
null
[]
null
[ "Unfortunately that code is there for a reason. Consider a field like this:\n\n``` python\nclass CSVField(CharField):\n def db_value(self, value):\n return ','.join(value)\n\n def python_value(self, value):\n return value.split(',')\n```\n\nThis field would be used to store or retrieve lists of ...
2014-04-17T01:25:53
2014-04-17T22:06:53
2014-04-17T12:45:49
NONE
null
I'm trying to use the mysql function 'INET_ATON' which takes a string representation of an IP address and returns an integer, and the comparing that integer to a integer stored in my database. The issue is that when I do peewee is trying to coerce the original string input into an integer before executing the query an...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/342/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/342/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/341
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/341/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/341/comments
https://api.github.com/repos/coleifer/peewee/issues/341/events
https://github.com/coleifer/peewee/issues/341
31,534,022
MDU6SXNzdWUzMTUzNDAyMg==
341
Low performance compared to plain sqlite3
{ "login": "piacias", "id": 7080293, "node_id": "MDQ6VXNlcjcwODAyOTM=", "avatar_url": "https://avatars.githubusercontent.com/u/7080293?v=4", "gravatar_id": "", "url": "https://api.github.com/users/piacias", "html_url": "https://github.com/piacias", "followers_url": "https://api.github.com/users/piacias/...
[]
closed
false
null
[]
null
[ "Have you tried running the import in a transaction? Peewee calls `commit()` after issuing `INSERT` by default, which may not be happening with sqlite by itself.\n\nYou would basically:\n\n``` python\nwith db.transaction():\n process_entries()\n```\n\nPlease give that a shot and let me know.\n", "Ok, I've chan...
2014-04-15T08:19:39
2014-04-15T12:24:03
2014-04-15T12:24:03
NONE
null
Hi, I'm writing simple logparser. I have 3 models defined as below. I set database as shown: ``` db = peewee.SqliteDatabase(DATABASE, autocommit=False) class Entry(BaseModel): timestamp = peewee.DateTimeField() level = peewee.IntegerField() module = peewee.CharField() line = peewee.IntegerField() ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/341/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/341/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/340
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/340/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/340/comments
https://api.github.com/repos/coleifer/peewee/issues/340/events
https://github.com/coleifer/peewee/issues/340
31,527,492
MDU6SXNzdWUzMTUyNzQ5Mg==
340
Subquery in FROM needs an alias in PostgreSQL
{ "login": "tonycpsu", "id": 914142, "node_id": "MDQ6VXNlcjkxNDE0Mg==", "avatar_url": "https://avatars.githubusercontent.com/u/914142?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tonycpsu", "html_url": "https://github.com/tonycpsu", "followers_url": "https://api.github.com/users/tonycps...
[]
closed
false
null
[]
null
[ "Can you please share a minimal set of models I can use to reproduce the error?\n", "Sure, here's a simple test script I've cooked up: https://gist.github.com/tonycpsu/10737226\n\nRun it with \"sqlite\" or \"postgres\" as arguments to test both backends (Postgres database must exist first.) I get different error...
2014-04-15T05:39:24
2014-07-12T14:25:17
2014-07-12T14:24:23
NONE
null
I'd like to do a subquery in the FROM clause, as per https://github.com/coleifer/peewee/commit/22ce07c43cbf3c7cf871326fc22177cc1e5f8345 . However, with the Postgres backend, these subqueries must have an alias, or you get `peewee.ProgrammingError: subquery in FROM must have an alias`. Peewee doesn't seem to add one a...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/340/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/340/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/339
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/339/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/339/comments
https://api.github.com/repos/coleifer/peewee/issues/339/events
https://github.com/coleifer/peewee/issues/339
31,444,252
MDU6SXNzdWUzMTQ0NDI1Mg==
339
Insert_many - ids of created rows
{ "login": "piacias", "id": 7080293, "node_id": "MDQ6VXNlcjcwODAyOTM=", "avatar_url": "https://avatars.githubusercontent.com/u/7080293?v=4", "gravatar_id": "", "url": "https://api.github.com/users/piacias", "html_url": "https://github.com/piacias", "followers_url": "https://api.github.com/users/piacias/...
[]
closed
false
null
[]
null
[ "I suppose, the reason I had not added that was out of memory considerations but on the whole I think that even if you were inserting a very large number of rows, it would be ok to keep the list of IDs around.\n", "Actually, because the insert will in most cases be only a single statement, there is not a way to e...
2014-04-14T08:58:11
2014-04-14T20:06:06
2014-04-14T20:06:06
NONE
null
Is it possible to get newly created ids, when creating rows via insert_many ?
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/339/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/339/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/338
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/338/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/338/comments
https://api.github.com/repos/coleifer/peewee/issues/338/events
https://github.com/coleifer/peewee/issues/338
31,409,461
MDU6SXNzdWUzMTQwOTQ2MQ==
338
Array and JSON fields do not output SQL with table aliases
{ "login": "mtwesley", "id": 145616, "node_id": "MDQ6VXNlcjE0NTYxNg==", "avatar_url": "https://avatars.githubusercontent.com/u/145616?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mtwesley", "html_url": "https://github.com/mtwesley", "followers_url": "https://api.github.com/users/mtwesle...
[]
closed
false
null
[]
null
[ "Ah, nice catch!\n", "Thanks for your help reporting and debugging this issue.\n" ]
2014-04-13T16:05:55
2014-04-13T16:17:25
2014-04-13T16:17:10
NONE
null
I was having a problem with joining two tables with the same field name when one of them was of an array type, using the extra Postgres functionality from the Playhouse package. I narrowed it down to it being related to the table alias not being included in the where clause of the query. Took a while, and I'm not sur...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/338/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/338/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/337
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/337/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/337/comments
https://api.github.com/repos/coleifer/peewee/issues/337/events
https://github.com/coleifer/peewee/issues/337
31,250,842
MDU6SXNzdWUzMTI1MDg0Mg==
337
Possible to aggregate by month, day, etc?
{ "login": "tonycpsu", "id": 914142, "node_id": "MDQ6VXNlcjkxNDE0Mg==", "avatar_url": "https://avatars.githubusercontent.com/u/914142?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tonycpsu", "html_url": "https://github.com/tonycpsu", "followers_url": "https://api.github.com/users/tonycps...
[]
closed
false
null
[]
null
[ "It depends on your database.\n\nFor sqlite you might use the `strftime` function to truncate a timestamp. This would calculate a sum of some value for each month:\n\n``` python\nquery = (Values\n .select(fn.Sum(Values.value).alias('average_value'))\n .group_by(fn.strftime('%Y-%m', Values.timestamp)...
2014-04-10T14:58:11
2014-04-11T14:31:30
2014-04-11T14:31:30
NONE
null
What's the recommended way to do a group by month or day with a DateTimeField? I know some of the underlying databases have date functions, and I know I could do it by formatting it as a string and truncating the hours, minutes, etc. but I thought there might be a more portable way to do it using Peewee.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/337/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/337/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/336
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/336/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/336/comments
https://api.github.com/repos/coleifer/peewee/issues/336/events
https://github.com/coleifer/peewee/issues/336
30,963,069
MDU6SXNzdWUzMDk2MzA2OQ==
336
MySQL - using 'from_' function - 'Every derived table must have its own alias'
{ "login": "Seidr", "id": 795518, "node_id": "MDQ6VXNlcjc5NTUxOA==", "avatar_url": "https://avatars.githubusercontent.com/u/795518?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Seidr", "html_url": "https://github.com/Seidr", "followers_url": "https://api.github.com/users/Seidr/followers"...
[]
closed
false
null
[]
null
[ "Sorry, I should of mentioned..while this is using the flask-peewee wrapper, I've updated peewee to the most recent version (git clone) and am still experiencing the issue described above, and believe that if I were to re-write this test to use purely peewee, this issue would still be experienced.\n", "Have you t...
2014-04-07T07:30:41
2014-04-07T13:14:20
2014-04-07T13:14:20
NONE
null
While playing around with the 'from_' function that was introduced recently (I believe it was pretty recent (see https://groups.google.com/forum/#!topic/peewee-orm/FSHhd9lZvUE), and ran into a bit of an issue when attempting to use the same query that worked under SQLITE, on a MySQL database. The issue is - as the err...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/336/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/336/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/335
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/335/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/335/comments
https://api.github.com/repos/coleifer/peewee/issues/335/events
https://github.com/coleifer/peewee/issues/335
30,942,628
MDU6SXNzdWUzMDk0MjYyOA==
335
inconsistent programming error
{ "login": "Agrisolum", "id": 5942632, "node_id": "MDQ6VXNlcjU5NDI2MzI=", "avatar_url": "https://avatars.githubusercontent.com/u/5942632?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Agrisolum", "html_url": "https://github.com/Agrisolum", "followers_url": "https://api.github.com/users/Ag...
[]
closed
false
null
[]
null
[ "I tried the same thing with a local sqlite db (_much_ slower...) and this happened:\n\n```\nTraceback (most recent call last):\n File \"<stdin>\", line 1, in <module>\n File \"smap\\job.py\", line 82, in run2\n db.SmapDataPoint.insert_many(islice(dict_data_gen, p[0], p[1])).execute()\n File \"D:\\Coding\\Pyt...
2014-04-06T18:01:25
2014-04-07T15:52:40
2014-04-07T15:52:40
NONE
null
I have a large number of rows that I want to add (~150000) to a MySQL db The rows have 9 float fields and a PrimaryKeyField. If I try to add them all in one go: ``` db.SmapDataPoint.insert_many(dict_data_gen).execute() ``` The database 'goes away' (peewee.OperationalError: (2006, 'MySQL server has gone away')). If...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/335/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/335/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/334
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/334/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/334/comments
https://api.github.com/repos/coleifer/peewee/issues/334/events
https://github.com/coleifer/peewee/issues/334
30,938,447
MDU6SXNzdWUzMDkzODQ0Nw==
334
Interface erors with PostgreSQL on Ubuntu
{ "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
[ "I have no idea... Is your application multi-threaded?\n", "Well, I indeed run one function using APScheduler while also calling it manually sometimes. I guess this could cause the function to be called twice simultaneously. Since you asked specifically about it, I guess this is a problem?\n", "Interesting -- I...
2014-04-06T14:25:20
2014-04-10T14:28:02
2014-04-10T14:28:02
NONE
null
I'm using (and loving) Peewee in a project with PostgreSQL 9.3 and since I want to use the JSON field in Postgres I use the Peewee Playhouse package. I now "sometimes" hit upon Interface errors. Sometimes in this case means that I run the same function every second (using APScheduler), but about 5% of the time I get er...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/334/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/334/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/333
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/333/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/333/comments
https://api.github.com/repos/coleifer/peewee/issues/333/events
https://github.com/coleifer/peewee/issues/333
30,778,696
MDU6SXNzdWUzMDc3ODY5Ng==
333
PostgreSQL cast array to list
{ "login": "mmqqg", "id": 6891135, "node_id": "MDQ6VXNlcjY4OTExMzU=", "avatar_url": "https://avatars.githubusercontent.com/u/6891135?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mmqqg", "html_url": "https://github.com/mmqqg", "followers_url": "https://api.github.com/users/mmqqg/follower...
[]
closed
false
null
[]
null
[ "I'm confused...isn't it already a list?\n\n``` python\nIn [1]: from playhouse.tests_postgres import *\n\nIn [2]: am = Array\nArrayField ArrayModel \n\nIn [2]: am = ArrayModel(tags=['foo', 'bar', 'baz'])\n\nIn [3]: for tag in am.tags:\n ...: print tag\n ...: \nfoo\nbar\nbaz\n```\n", "@mmqqg -- can y...
2014-04-03T14:15:43
2014-04-04T05:20:54
2014-04-04T05:20:54
NONE
null
``` post = BlogPost(content='awesome', tags=['foo', 'bar', 'baz']) ``` Is there a way to use ``` python for tag in post.tags: print(tag) ``` ? http://initd.org/psycopg/docs/extensions.html#psycopg2.extensions.new_array_type
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/333/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/333/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/332
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/332/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/332/comments
https://api.github.com/repos/coleifer/peewee/issues/332/events
https://github.com/coleifer/peewee/issues/332
30,524,271
MDU6SXNzdWUzMDUyNDI3MQ==
332
feature request: add support for printing SQL statments
{ "login": "intrixs", "id": 2215059, "node_id": "MDQ6VXNlcjIyMTUwNTk=", "avatar_url": "https://avatars.githubusercontent.com/u/2215059?v=4", "gravatar_id": "", "url": "https://api.github.com/users/intrixs", "html_url": "https://github.com/intrixs", "followers_url": "https://api.github.com/users/intrixs/...
[]
closed
false
null
[]
null
[ "Did some research, and found out that maybe I can use 'logging' module to achieve part of 'sqlall' functionalities. \n\nhttp://stackoverflow.com/questions/6350411/how-to-retrieve-executed-sql-code-from-sqlalchemy\n" ]
2014-03-31T15:55:23
2014-04-02T12:10:49
2014-04-02T12:10:49
NONE
null
So in Django, you have the 'sqlall' command that allows you to do the following: ##### Prints the CREATE TABLE, custom SQL and CREATE INDEX SQL statments for the given model module name(s). It would be nice if peewee adds support for displaying database-specific SQL statements of a model or query. Thanks.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/332/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/332/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/331
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/331/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/331/comments
https://api.github.com/repos/coleifer/peewee/issues/331/events
https://github.com/coleifer/peewee/pull/331
30,488,382
MDExOlB1bGxSZXF1ZXN0MTQxNjIzODk=
331
adapt_array unicode
{ "login": "mmqqg", "id": 6891135, "node_id": "MDQ6VXNlcjY4OTExMzU=", "avatar_url": "https://avatars.githubusercontent.com/u/6891135?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mmqqg", "html_url": "https://github.com/mmqqg", "followers_url": "https://api.github.com/users/mmqqg/follower...
[]
closed
false
null
[]
null
[ "Hey, I saw your comment on #peewee but was away from the computer. I'll take a look though it appears there's an issue with Py3K.\n" ]
2014-03-31T06:47:41
2014-06-17T01:45:48
2014-04-02T13:48:41
NONE
null
modify adapt_array and add some unicode test
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/331/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/331/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/331", "html_url": "https://github.com/coleifer/peewee/pull/331", "diff_url": "https://github.com/coleifer/peewee/pull/331.diff", "patch_url": "https://github.com/coleifer/peewee/pull/331.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/330
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/330/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/330/comments
https://api.github.com/repos/coleifer/peewee/issues/330/events
https://github.com/coleifer/peewee/issues/330
30,424,782
MDU6SXNzdWUzMDQyNDc4Mg==
330
Check constraint not working with .create_table()
{ "login": "bartkl", "id": 2497867, "node_id": "MDQ6VXNlcjI0OTc4Njc=", "avatar_url": "https://avatars.githubusercontent.com/u/2497867?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bartkl", "html_url": "https://github.com/bartkl", "followers_url": "https://api.github.com/users/bartkl/foll...
[]
closed
false
null
[]
null
[ "I looked into this matter some more, and apparently it is a MySQL issue:\n\n> The CHECK clause is parsed but ignored by all storage engines.\n\n[http://dev.mysql.com/doc/refman/5.5/en/create-table.html](MySQL docs)\n(Version 5.5 corresponds with the one I use, but note that the latest documentation (5.7) also docu...
2014-03-28T21:38:22
2014-03-29T00:59:26
2014-03-29T00:59:26
NONE
null
Hi, I'm trying to define a simple `CHECK` constraint on a table, and to create it with `.create_all()`. It can't get it to work. I get no errors, but when I look at the table definition of the created table, it has no constraints defined. My models file: ``` python from peewee import * db = MySQLDatabase('my_db_nam...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/330/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/330/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/329
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/329/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/329/comments
https://api.github.com/repos/coleifer/peewee/issues/329/events
https://github.com/coleifer/peewee/pull/329
30,339,876
MDExOlB1bGxSZXF1ZXN0MTQwODA5NzY=
329
Fixed access to uninitialized variable in pwiz
{ "login": "wojtek", "id": 31813, "node_id": "MDQ6VXNlcjMxODEz", "avatar_url": "https://avatars.githubusercontent.com/u/31813?v=4", "gravatar_id": "", "url": "https://api.github.com/users/wojtek", "html_url": "https://github.com/wojtek", "followers_url": "https://api.github.com/users/wojtek/followers", ...
[]
closed
false
null
[]
null
[ "Isn't this the same fix as #328 ?\n", "Oh yeah, I actually fixed it locally a couple of days ago before #328 existed, my bad.\n" ]
2014-03-27T20:39:02
2014-07-06T01:50:04
2014-03-27T20:56:35
NONE
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/329/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/329/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/329", "html_url": "https://github.com/coleifer/peewee/pull/329", "diff_url": "https://github.com/coleifer/peewee/pull/329.diff", "patch_url": "https://github.com/coleifer/peewee/pull/329.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/328
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/328/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/328/comments
https://api.github.com/repos/coleifer/peewee/issues/328/events
https://github.com/coleifer/peewee/pull/328
30,144,947
MDExOlB1bGxSZXF1ZXN0MTM5NjUxMDY=
328
Pwiz fails on MySQL databases
{ "login": "johnhuffsmith", "id": 483024, "node_id": "MDQ6VXNlcjQ4MzAyNA==", "avatar_url": "https://avatars.githubusercontent.com/u/483024?v=4", "gravatar_id": "", "url": "https://api.github.com/users/johnhuffsmith", "html_url": "https://github.com/johnhuffsmith", "followers_url": "https://api.github.co...
[]
closed
false
null
[]
null
[ "Thanks!\n" ]
2014-03-25T17:25:52
2014-06-28T04:17:46
2014-03-27T21:08:29
NONE
null
On line 262 it's attempting to set a value on kwargs before kwargs is initialized. I've just move the kwargs initialization to be before this operation.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/328/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/328/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/328", "html_url": "https://github.com/coleifer/peewee/pull/328", "diff_url": "https://github.com/coleifer/peewee/pull/328.diff", "patch_url": "https://github.com/coleifer/peewee/pull/328.patch", "merged_at": "2014-03-27T21:08:29" }
https://api.github.com/repos/coleifer/peewee/issues/327
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/327/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/327/comments
https://api.github.com/repos/coleifer/peewee/issues/327/events
https://github.com/coleifer/peewee/issues/327
29,976,913
MDU6SXNzdWUyOTk3NjkxMw==
327
two first result in double
{ "login": "dkmatt0", "id": 5724752, "node_id": "MDQ6VXNlcjU3MjQ3NTI=", "avatar_url": "https://avatars.githubusercontent.com/u/5724752?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dkmatt0", "html_url": "https://github.com/dkmatt0", "followers_url": "https://api.github.com/users/dkmatt0/...
[]
closed
false
null
[]
null
[ "If I add \n\n```\n[s for s in select]\n```\n\nbetween select and for, like this :\n\n```\nselect = Test.select()\n[s for s in select]\nfor s in select:\n print(s.id)\n Test.update(name=0).where(Test.id==s.id).execute()\n```\n\nI haven't this problem...\n\nI don't understand why ?!\n", "@dkmatt0 \n\nPEP-XXX...
2014-03-23T01:11:28
2014-10-01T20:16:47
2014-03-25T17:13:22
NONE
null
Hi, (I'm french, sorry for poor english...) I make this code for testing : ``` from peewee import * import datetime class Test(Model): name = TextField(null=True) Test.create_table() Test.create(name='a') Test.create(name='b') Test.create(name='c') Test.create(name='d') Test.create(name='e') Test.create(name='f'...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/327/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/327/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/326
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/326/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/326/comments
https://api.github.com/repos/coleifer/peewee/issues/326/events
https://github.com/coleifer/peewee/issues/326
29,934,782
MDU6SXNzdWUyOTkzNDc4Mg==
326
table_alias
{ "login": "stanegit", "id": 3876591, "node_id": "MDQ6VXNlcjM4NzY1OTE=", "avatar_url": "https://avatars.githubusercontent.com/u/3876591?v=4", "gravatar_id": "", "url": "https://api.github.com/users/stanegit", "html_url": "https://github.com/stanegit", "followers_url": "https://api.github.com/users/stane...
[]
closed
false
null
[]
null
[ "Can you give me a set of models and a query that reproduces this error?\n" ]
2014-03-21T20:24:50
2014-04-01T14:15:11
2014-04-01T14:15:11
NONE
null
Hi , I know I asked for this and it is working but trying to get sql server working with peewee (pyodbc) in this part of code in peewee ``` def _max_alias(self, alias_map): max_alias = 0 if alias_map: for alias in alias_map.values(): alias_number = int(alias.lstrip('t')) if alia...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/326/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/326/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/325
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/325/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/325/comments
https://api.github.com/repos/coleifer/peewee/issues/325/events
https://github.com/coleifer/peewee/issues/325
29,517,663
MDU6SXNzdWUyOTUxNzY2Mw==
325
Joining 2 tables with naive is messing up pks
{ "login": "masell", "id": 4653351, "node_id": "MDQ6VXNlcjQ2NTMzNTE=", "avatar_url": "https://avatars.githubusercontent.com/u/4653351?v=4", "gravatar_id": "", "url": "https://api.github.com/users/masell", "html_url": "https://github.com/masell", "followers_url": "https://api.github.com/users/masell/foll...
[]
closed
false
null
[]
null
[ "What do you want to happen, I guess? When you use `.naive()` peewee simply `setattr`s named values from the result column onto the model instance. If multiple columns are named `id` then the last one wins.\n\nTo circumvent that you could:\n\n``` python\nres = (Model1\n .select(Model1.id, Model1.a, Model2....
2014-03-16T14:29:39
2014-03-18T16:25:42
2014-03-18T16:25:42
NONE
null
Should i not have only 1 instance of Model1 when calling with naive? The ids are from Model2, but on Model1's instances. I guess it's because the select query does not use any prefixing when selecting from multiple tables. from peewee import SqliteDatabase, Model, PrimaryKeyField, CharField, \ IntegerField, ForeignK...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/325/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/325/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/324
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/324/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/324/comments
https://api.github.com/repos/coleifer/peewee/issues/324/events
https://github.com/coleifer/peewee/issues/324
29,351,753
MDU6SXNzdWUyOTM1MTc1Mw==
324
Prefetch issue
{ "login": "coleifer", "id": 119974, "node_id": "MDQ6VXNlcjExOTk3NA==", "avatar_url": "https://avatars.githubusercontent.com/u/119974?v=4", "gravatar_id": "", "url": "https://api.github.com/users/coleifer", "html_url": "https://github.com/coleifer", "followers_url": "https://api.github.com/users/coleife...
[]
closed
false
null
[]
null
[ "Fixed in e9a38d24ba0ef75b26728fc29cd8909fbda4e3f7 by manually selecting only the relevant PK when generating the subquery.\n" ]
2014-03-13T13:55:08
2014-03-13T14:09:23
2014-03-13T14:09:23
OWNER
null
Via SO: http://stackoverflow.com/questions/22368917/prefetch-db-rows-using-the-python-peewee-orm --- I want to use the python peewee prefetch functionality. I have three tables: A, B, and C. B has a foreign key in its table to A, and table C has a foreign key to B. I want to select all the rows in B, while also pr...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/324/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/324/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/323
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/323/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/323/comments
https://api.github.com/repos/coleifer/peewee/issues/323/events
https://github.com/coleifer/peewee/issues/323
29,344,231
MDU6SXNzdWUyOTM0NDIzMQ==
323
entering datetime with timezone results in illegal SQL INSERT
{ "login": "shikasta-net", "id": 1693155, "node_id": "MDQ6VXNlcjE2OTMxNTU=", "avatar_url": "https://avatars.githubusercontent.com/u/1693155?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shikasta-net", "html_url": "https://github.com/shikasta-net", "followers_url": "https://api.github.com...
[]
closed
false
null
[]
null
[ "Peewee is not converting the date to a string when it sends it to MySQL. Instead, the MySQL adapter is probably doing the conversion for you. Are you using different versions of MySQLdb or pymysql between your two machines?\n\nIf you'd like to implement this more cleanly, you can subclass `DateTimeField` and imple...
2014-03-13T11:51:59
2014-03-13T17:44:44
2014-03-13T17:44:44
NONE
null
When attempting to INSERT key values pairs, where the value is an instance datetime.datetime(2014, 1, 12, 14, 0, tzinfo=<UTC>), peewee converts these (via datetime's default to string encoding) to 2014-01-12 15:00:00+00:00 which is not a valid format for MySQL. The timezone information should be ignored as MySQL only a...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/323/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/323/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/322
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/322/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/322/comments
https://api.github.com/repos/coleifer/peewee/issues/322/events
https://github.com/coleifer/peewee/issues/322
29,298,375
MDU6SXNzdWUyOTI5ODM3NQ==
322
Suggestion: normalize keyword arguments when connecting to db
{ "login": "exaroth", "id": 3927388, "node_id": "MDQ6VXNlcjM5MjczODg=", "avatar_url": "https://avatars.githubusercontent.com/u/3927388?v=4", "gravatar_id": "", "url": "https://api.github.com/users/exaroth", "html_url": "https://github.com/exaroth", "followers_url": "https://api.github.com/users/exaroth/...
[]
closed
false
null
[]
null
[]
2014-03-12T20:23:10
2014-03-13T13:24:54
2014-03-13T13:24:54
NONE
null
I noticed that when passing password to MySQLDatabase you have to use passwd = "..." as keyword argument while in Postgres its password = "...". I think it would be good idea to normalize it, to make it easier for apps with database choice to connect.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/322/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/322/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/321
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/321/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/321/comments
https://api.github.com/repos/coleifer/peewee/issues/321/events
https://github.com/coleifer/peewee/issues/321
29,027,865
MDU6SXNzdWUyOTAyNzg2NQ==
321
Model has no attribute insert_many
{ "login": "shikasta-net", "id": 1693155, "node_id": "MDQ6VXNlcjE2OTMxNTU=", "avatar_url": "https://avatars.githubusercontent.com/u/1693155?v=4", "gravatar_id": "", "url": "https://api.github.com/users/shikasta-net", "html_url": "https://github.com/shikasta-net", "followers_url": "https://api.github.com...
[]
closed
false
null
[]
null
[]
2014-03-08T19:12:38
2014-03-08T19:33:26
2014-03-08T19:33:26
NONE
null
Version 2.2.1 available through pip, does not include `insert_many()` in its `Model` class. This does not agree with the documentation for the same version number.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/321/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/321/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/320
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/320/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/320/comments
https://api.github.com/repos/coleifer/peewee/issues/320/events
https://github.com/coleifer/peewee/issues/320
28,943,346
MDU6SXNzdWUyODk0MzM0Ng==
320
Travis CI
{ "login": "bndr", "id": 1145456, "node_id": "MDQ6VXNlcjExNDU0NTY=", "avatar_url": "https://avatars.githubusercontent.com/u/1145456?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bndr", "html_url": "https://github.com/bndr", "followers_url": "https://api.github.com/users/bndr/followers", ...
[]
closed
false
null
[]
null
[ "+1\n", "I absolutely hate their site and had removed travis-ci a while ago. Be happy to add it back, though.\n", "It's back. It's like damn whack-a-mole trying to get these tests passing (all of which pass locally, of course). If you all can help debug these failures I'd always appreciate it! https://travis-...
2014-03-07T07:39:39
2014-03-08T00:02:11
2014-03-08T00:02:11
CONTRIBUTOR
null
Hi! I would like to suggest implementing Travis CI for automation of tests on pull requests. http://docs.travis-ci.com/
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/320/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/320/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/319
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/319/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/319/comments
https://api.github.com/repos/coleifer/peewee/issues/319/events
https://github.com/coleifer/peewee/issues/319
28,862,100
MDU6SXNzdWUyODg2MjEwMA==
319
How to use order_by with alias field?
{ "login": "thibaultmeyer", "id": 1005086, "node_id": "MDQ6VXNlcjEwMDUwODY=", "avatar_url": "https://avatars.githubusercontent.com/u/1005086?v=4", "gravatar_id": "", "url": "https://api.github.com/users/thibaultmeyer", "html_url": "https://github.com/thibaultmeyer", "followers_url": "https://api.github....
[]
closed
false
null
[]
null
[ "You have a couple options:\n\n``` python\n.order_by(SQL('date'))\n\n.order_by(fn.MIN(Transaction.date))\n```\n", "oh thanks. I can use .desc() & .asc() too ?\n" ]
2014-03-06T09:56:46
2014-03-06T21:11:12
2014-03-06T14:27:52
NONE
null
Hello, we have 2 issues with the order_by function when we use it with aliased field. 1. How to use ASC and DESC with aliased field ? 2. The SQL generated request : ``` python lstTransaction = Transaction.select(Transaction.id, Transaction.vendor, Transaction.amount, Transaction.client, fn.MIN(Transaction.date).alia...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/319/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/319/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/318
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/318/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/318/comments
https://api.github.com/repos/coleifer/peewee/issues/318/events
https://github.com/coleifer/peewee/issues/318
28,788,812
MDU6SXNzdWUyODc4ODgxMg==
318
auto_round gone from DoubleField
{ "login": "arnuschky", "id": 179920, "node_id": "MDQ6VXNlcjE3OTkyMA==", "avatar_url": "https://avatars.githubusercontent.com/u/179920?v=4", "gravatar_id": "", "url": "https://api.github.com/users/arnuschky", "html_url": "https://github.com/arnuschky", "followers_url": "https://api.github.com/users/arnu...
[]
closed
false
null
[]
null
[ "Ah. Apparently auto_round was only intended (and meaningful) for DecimalFields. \n\nStarting from 2.2.0 peewee now complains about the superfluous attribute; something that it didn't before, so our upgrade failed.\n\nCan someone confirm this?\n", "Yes that is correct.\n", "Sorry for the inconvenience, I refact...
2014-03-05T13:23:40
2014-03-05T15:58:14
2014-03-05T15:58:14
NONE
null
During upgrade from 2.17 to 2.2.0, auto_round vanished from DoubleField Is that a bug, or is there a migration necessary? If the latter, there's a notice missing in the docs.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/318/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/318/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/317
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/317/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/317/comments
https://api.github.com/repos/coleifer/peewee/issues/317/events
https://github.com/coleifer/peewee/pull/317
28,767,263
MDExOlB1bGxSZXF1ZXN0MTMxOTc2MTQ=
317
Allow subclass receive signals.
{ "login": "soasme", "id": 369081, "node_id": "MDQ6VXNlcjM2OTA4MQ==", "avatar_url": "https://avatars.githubusercontent.com/u/369081?v=4", "gravatar_id": "", "url": "https://api.github.com/users/soasme", "html_url": "https://github.com/soasme", "followers_url": "https://api.github.com/users/soasme/follow...
[]
closed
false
null
[]
null
[ ":thumbsup: great PR!!\n" ]
2014-03-05T06:01:07
2014-06-28T04:17:41
2014-03-05T15:08:08
CONTRIBUTOR
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/317/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/317/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/317", "html_url": "https://github.com/coleifer/peewee/pull/317", "diff_url": "https://github.com/coleifer/peewee/pull/317.diff", "patch_url": "https://github.com/coleifer/peewee/pull/317.patch", "merged_at": "2014-03-05T15:08:08" }
https://api.github.com/repos/coleifer/peewee/issues/316
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/316/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/316/comments
https://api.github.com/repos/coleifer/peewee/issues/316/events
https://github.com/coleifer/peewee/pull/316
28,704,746
MDExOlB1bGxSZXF1ZXN0MTMxNjA3NjU=
316
"AS" support on fn.* method
{ "login": "thibaultmeyer", "id": 1005086, "node_id": "MDQ6VXNlcjEwMDUwODY=", "avatar_url": "https://avatars.githubusercontent.com/u/1005086?v=4", "gravatar_id": "", "url": "https://api.github.com/users/thibaultmeyer", "html_url": "https://github.com/thibaultmeyer", "followers_url": "https://api.github....
[]
closed
false
null
[]
null
[ "Thanks for this. I've already implemented this as `.alias()` on all `Node` subclasses (includes `fn` objects).\n" ]
2014-03-04T13:29:05
2014-07-06T01:50:15
2014-03-04T13:50:34
NONE
null
Now user can do fn.MIN(Transaction.amount, AS='amount')
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/316/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/316/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/316", "html_url": "https://github.com/coleifer/peewee/pull/316", "diff_url": "https://github.com/coleifer/peewee/pull/316.diff", "patch_url": "https://github.com/coleifer/peewee/pull/316.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/315
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/315/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/315/comments
https://api.github.com/repos/coleifer/peewee/issues/315/events
https://github.com/coleifer/peewee/issues/315
28,694,115
MDU6SXNzdWUyODY5NDExNQ==
315
Using fn.* on select() : can't rebuild model object
{ "login": "thibaultmeyer", "id": 1005086, "node_id": "MDQ6VXNlcjEwMDUwODY=", "avatar_url": "https://avatars.githubusercontent.com/u/1005086?v=4", "gravatar_id": "", "url": "https://api.github.com/users/thibaultmeyer", "html_url": "https://github.com/thibaultmeyer", "followers_url": "https://api.github....
[]
closed
false
null
[]
null
[ "I write a little hack to add support of \"AS\" in the function fn.MIN. It works, but I'm not sure that is the best way to proceed.\n\npeewee.py - Class Func(Node)\n\n``` python\n 406 def __getattr__(self, attr): \n 407 def dec(*args, **kwarg...
2014-03-04T10:21:46
2014-03-04T13:50:07
2014-03-04T13:49:37
NONE
null
Hello, When I use fn.MIN(Transaction.date), MySQL return an column named "fn.MIN(Transaction.date)" intead of "date"... So all Transaction items returned have attribute "date" == None. It would be nice to have the possibility to do something like that ``` fn.MIN(Transaction.date, AS="date") ``...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/315/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/315/timeline
null
completed
null
null