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/114 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/114/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/114/comments | https://api.github.com/repos/coleifer/peewee/issues/114/events | https://github.com/coleifer/peewee/issues/114 | 7,499,691 | MDU6SXNzdWU3NDk5Njkx | 114 | Print SQL queries | {
"login": "ripperdoc",
"id": 1027509,
"node_id": "MDQ6VXNlcjEwMjc1MDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/1027509?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ripperdoc",
"html_url": "https://github.com/ripperdoc",
"followers_url": "https://api.github.com/users/ri... | [] | closed | false | null | [] | null | [
"I added a little helper here:\nhttps://github.com/coleifer/peewee/commit/a5ec7bb90b1882db95c6f4eae94ea373f7f6a50f\n",
"Great, thanks!\n",
"@coleifer Can you please give an example of how to use that helper function?\n",
"That function actually went away. Now you can just call:\n\n``` python\nq = MyModel.sele... | 2012-10-10T23:47:16 | 2020-02-09T19:20:42 | 2012-10-12T00:47:38 | NONE | null | I updated from 1.0 to 2.0 and got into a bit of a mess - which has mostly cleared up now. One thing though - how do I print sql queries? I used to be able to do SelectQuery.sql() but not it requires a compiler argument, but what should I put into that? I cannot find any mention in the docs...
Thanks!
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/114/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/114/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/113 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/113/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/113/comments | https://api.github.com/repos/coleifer/peewee/issues/113/events | https://github.com/coleifer/peewee/pull/113 | 7,431,054 | MDExOlB1bGxSZXF1ZXN0MjU3ODY5NQ== | 113 | Add support for primary foreign keys | {
"login": "tmoertel",
"id": 21773,
"node_id": "MDQ6VXNlcjIxNzcz",
"avatar_url": "https://avatars.githubusercontent.com/u/21773?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tmoertel",
"html_url": "https://github.com/tmoertel",
"followers_url": "https://api.github.com/users/tmoertel/foll... | [] | closed | false | null | [] | null | [] | 2012-10-08T20:53:27 | 2014-07-06T01:51:38 | 2012-10-08T21:39:00 | CONTRIBUTOR | null | This commit adds support for foreign keys that are also primary keys, the preferred means of representing one-to-zero-or-one relationships between model classes. (The alternative representation wastes a column and an index.) This kind relationship is common in modeling schemes for inheritance or extension semantics.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/113/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/113/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/113",
"html_url": "https://github.com/coleifer/peewee/pull/113",
"diff_url": "https://github.com/coleifer/peewee/pull/113.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/113.patch",
"merged_at": "2012-10-08T21:39:00"
} |
https://api.github.com/repos/coleifer/peewee/issues/112 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/112/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/112/comments | https://api.github.com/repos/coleifer/peewee/issues/112/events | https://github.com/coleifer/peewee/issues/112 | 7,340,735 | MDU6SXNzdWU3MzQwNzM1 | 112 | Support SelectQuery on a view | {
"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 | [
"I wonder if it would work just to create a model and have it specify its db_table attribute as the view. If the view \"looks\" like one of your existing models, you should also be able to subclass the exisitng model, e.g.:\n\n``` python\n\nclass MyModel(Model):\n # fields ...\n\nclass MyViewModel(MyModel):\n ... | 2012-10-04T03:16:00 | 2012-11-10T04:09:48 | 2012-10-05T19:51:54 | CONTRIBUTOR | null | I am writing some queries that are beyond what peewee can/should do. Specifically I need to be able to union together a result set. I figured I would just create a view, and then somehow set that view into the SelectQuery. I think that would be a really nice simple option, where you just use the view name in place of
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/112/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/112/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/111 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/111/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/111/comments | https://api.github.com/repos/coleifer/peewee/issues/111/events | https://github.com/coleifer/peewee/issues/111 | 7,334,558 | MDU6SXNzdWU3MzM0NTU4 | 111 | Use database column defaults | {
"login": "obensonne",
"id": 121881,
"node_id": "MDQ6VXNlcjEyMTg4MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/121881?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/obensonne",
"html_url": "https://github.com/obensonne",
"followers_url": "https://api.github.com/users/oben... | [] | closed | false | null | [] | null | [
"I am aware of the DRY issues, which is why I doc'd it and mentioned my reasons for defining defaults in python.\n\nAs to your question, the InsertQuery behaves correctly but `create` is apparently adding everyting regardless of whether you specify it or not. I will take a look into making create behave more like ... | 2012-10-03T21:01:48 | 2012-10-08T14:12:42 | 2012-10-08T14:12:42 | NONE | null | The [peewee documentation says](https://peewee.readthedocs.org/en/latest/peewee/fields.html?highlight=default#a-note-on-validation):
_Both default and choices could be implemented at the database level as DEFAULT and CHECK CONSTRAINT respectively, but any application change would require a schema change. Because of th... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/111/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/111/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/110 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/110/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/110/comments | https://api.github.com/repos/coleifer/peewee/issues/110/events | https://github.com/coleifer/peewee/issues/110 | 7,268,077 | MDU6SXNzdWU3MjY4MDc3 | 110 | Support for group_by and count aggregate on two or more different table cloumns. | {
"login": "zffl",
"id": 186776,
"node_id": "MDQ6VXNlcjE4Njc3Ng==",
"avatar_url": "https://avatars.githubusercontent.com/u/186776?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zffl",
"html_url": "https://github.com/zffl",
"followers_url": "https://api.github.com/users/zffl/followers",
... | [] | closed | false | null | [] | null | [
"Yeah...its weird, i'm not in love with the api...but here's how you do it:\n\n``` python\n\nC.select({A: ['c1'], C: ['c4', Count('id')]}).group_by('c4').join(B).join(A).group_by('c1')\n```\n1. First we select the columns -- you had that part right except you were just missing the Count('id') in the list of \"C\" c... | 2012-10-01T16:12:48 | 2012-10-02T13:37:44 | 2012-10-02T13:37:44 | NONE | null | I have this:
``` python
class A(Model):
c1 = CharField()
class B(Model):
c2 = ForeignKeyField(A)
class C(Model):
c3 = ForeignKeyField(B)
c4 = CharField()
```
I want to group by A.c1 and C.c4, and count C.id
and my query like this:
``` python
C.select({A:['c1'], C:['c4']}).filter(c3__c2__c1__in=[]).... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/110/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/110/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/109 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/109/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/109/comments | https://api.github.com/repos/coleifer/peewee/issues/109/events | https://github.com/coleifer/peewee/issues/109 | 7,186,934 | MDU6SXNzdWU3MTg2OTM0 | 109 | Access to ForeignKeyField's related_name attribute from another process? | {
"login": "davidthewatson",
"id": 150892,
"node_id": "MDQ6VXNlcjE1MDg5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/150892?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/davidthewatson",
"html_url": "https://github.com/davidthewatson",
"followers_url": "https://api.github... | [] | closed | false | null | [] | null | [
"This sounds very evil.\n",
"Without sounding pedantic, could you elaborate on the ambiguous pronoun \"this\"? That is, are you saying that model sharing across processes is evil or that attribute level model accessor affordances existing across processes is evil? If so, why? This seemed like a perfectly reasonab... | 2012-09-27T14:50:24 | 2014-10-01T20:16:47 | 2012-10-11T23:39:39 | NONE | null | I have several processes that share the same peewee models. One of those processes manipulates data which effects a ForeignKeyField's related_name attribute which is then later accessed by another process. However, accessing the attribute throws a missing attribute exception from the downstream process. Is it possible ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/109/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/109/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/108 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/108/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/108/comments | https://api.github.com/repos/coleifer/peewee/issues/108/events | https://github.com/coleifer/peewee/issues/108 | 6,910,029 | MDU6SXNzdWU2OTEwMDI5 | 108 | Postgresql with pk_col='ID' reported "doesn't exist" | {
"login": "widoyo",
"id": 43075,
"node_id": "MDQ6VXNlcjQzMDc1",
"avatar_url": "https://avatars.githubusercontent.com/u/43075?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/widoyo",
"html_url": "https://github.com/widoyo",
"followers_url": "https://api.github.com/users/widoyo/followers",
... | [] | closed | false | null | [] | null | [
"Can you share your model code with me? Just the class definition should be fine. If you can get me the SQL create table query as well that you ran that'd be great (ModelClass.create_table_query() i think). Were these models autogenerated by peewee or were they pre-existing?\n",
"I'm not sure if you have tried... | 2012-09-17T04:22:31 | 2012-09-18T17:25:04 | 2012-09-17T19:15:09 | NONE | null | I have a primary column named 'ID' (UPPERCASE). Executing SQL into Postgresql "SELECT COUNT(ID) FROM inbox" postgresql reported "column doesn't exist". But it is return as expected when my SQL "SELECT COUNT('id') FROM inbox".
I found the problem when using flask-peewee that the error ofound at peewee.py line 1410.
Th... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/108/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/108/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/107 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/107/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/107/comments | https://api.github.com/repos/coleifer/peewee/issues/107/events | https://github.com/coleifer/peewee/issues/107 | 6,740,806 | MDU6SXNzdWU2NzQwODA2 | 107 | Default value no work in Model.insert().execute() | {
"login": "zffl",
"id": 186776,
"node_id": "MDQ6VXNlcjE4Njc3Ng==",
"avatar_url": "https://avatars.githubusercontent.com/u/186776?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zffl",
"html_url": "https://github.com/zffl",
"followers_url": "https://api.github.com/users/zffl/followers",
... | [] | closed | false | null | [] | null | [
"When you initialize a model instance, it will initialize fields to their default values, e.g.:\n\n``` python\n\n>>> from tests import *\n>>> dv = DefaultVals() # <-- pub date defaults to datetime.datetime.now\n>>> dv.pub_date\ndatetime.datetime(2012, 9, 9, 11, 31, 37, 797693)\n```\n\nWhen you call `save()` it roun... | 2012-09-09T07:40:16 | 2016-09-07T02:32:42 | 2012-09-09T16:51:04 | NONE | null | I add default value for datetime field, but not work in this case, but It work by writing m =Model(..); m.save(). Is this a problem or by design?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/107/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/107/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/106 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/106/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/106/comments | https://api.github.com/repos/coleifer/peewee/issues/106/events | https://github.com/coleifer/peewee/issues/106 | 6,457,197 | MDU6SXNzdWU2NDU3MTk3 | 106 | Problem with flask debug mode and automatic restart | {
"login": "mrjoes",
"id": 179880,
"node_id": "MDQ6VXNlcjE3OTg4MA==",
"avatar_url": "https://avatars.githubusercontent.com/u/179880?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mrjoes",
"html_url": "https://github.com/mrjoes",
"followers_url": "https://api.github.com/users/mrjoes/follow... | [] | closed | false | null | [] | null | [
"I found this in documentation: http://peewee.readthedocs.org/en/latest/peewee/cookbook.html#multi-threaded-applications but in Flask autoreload case, I'm not using threads. Can use these options to work around it though.\n",
"Looks like the werkzeug debugger uses multiple threads:\n\nhttps://github.com/mitsuhiko... | 2012-08-26T08:01:34 | 2016-08-31T05:23:04 | 2012-08-26T14:45:22 | NONE | null | Hi,
I have following code:
``` python
from flask import Flask
import peewee
app = Flask(__name__)
app.config['SECRET_KEY'] = '123456790'
db = peewee.SqliteDatabase('test.sqlite')
class BaseModel(peewee.Model):
class Meta:
database = db
class User(BaseModel):
username = peewee.CharField(max_leng... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/106/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/106/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/105 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/105/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/105/comments | https://api.github.com/repos/coleifer/peewee/issues/105/events | https://github.com/coleifer/peewee/issues/105 | 6,345,172 | MDU6SXNzdWU2MzQ1MTcy | 105 | Migrations | {
"login": "jamorton",
"id": 18852,
"node_id": "MDQ6VXNlcjE4ODUy",
"avatar_url": "https://avatars.githubusercontent.com/u/18852?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jamorton",
"html_url": "https://github.com/jamorton",
"followers_url": "https://api.github.com/users/jamorton/foll... | [] | closed | false | null | [] | null | [
"If you take a look at the Database class, there are some undocumented methods that may be of help:\n\nhttps://github.com/coleifer/peewee/blob/master/peewee.py#L456\n\nSay you're renaming a field... from 'foo' to 'bar':\n\n`database.execute(database.rename_column_sql(FooModel, 'foo', 'bar'))`\n\nI'll see about gett... | 2012-08-21T08:40:33 | 2013-05-28T01:11:05 | 2012-08-21T14:47:44 | NONE | null | Just curious if you have thought about migrations in peewee. If not an automated way, is there an idiomatic way to do it with peewee besides changing fields and guessing the needed SQL statements to reflect them?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/105/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/105/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/104 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/104/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/104/comments | https://api.github.com/repos/coleifer/peewee/issues/104/events | https://github.com/coleifer/peewee/issues/104 | 6,250,764 | MDU6SXNzdWU2MjUwNzY0 | 104 | PeeWee doesn't play nice with pylint (or vice-versa) | {
"login": "diwakergupta",
"id": 15990,
"node_id": "MDQ6VXNlcjE1OTkw",
"avatar_url": "https://avatars.githubusercontent.com/u/15990?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/diwakergupta",
"html_url": "https://github.com/diwakergupta",
"followers_url": "https://api.github.com/users/d... | [] | closed | false | null | [] | null | [
"Peewee uses metaclasses to give you \"declarative\" models. Your models and the fields you define as class attributes are valuable metadata and I cribbed the notion of using a metaclass to introspect these. It would be arguably more pythonic to do it differently, but this is the API I have chosen. You can see th... | 2012-08-15T20:56:17 | 2012-08-18T13:03:58 | 2012-08-17T13:42:47 | NONE | null | PeeWee modifies the model classes at RunTime. pylint doesn't like this and I get errors like:
```
E:123,15:Benchmark.add_run_data: Class 'RunData' has no 'DoesNotExist' member
```
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/104/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/104/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/103 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/103/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/103/comments | https://api.github.com/repos/coleifer/peewee/issues/103/events | https://github.com/coleifer/peewee/issues/103 | 6,035,334 | MDU6SXNzdWU2MDM1MzM0 | 103 | if a table join another table twice, the query cannot be done. | {
"login": "zffl",
"id": 186776,
"node_id": "MDQ6VXNlcjE4Njc3Ng==",
"avatar_url": "https://avatars.githubusercontent.com/u/186776?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zffl",
"html_url": "https://github.com/zffl",
"followers_url": "https://api.github.com/users/zffl/followers",
... | [] | closed | false | null | [] | null | [
"This issue goes more-or-less to some of the core assumptions I made -- many things are simpler if multiple joins to the same table aren't allowed -- for example:\n- in a complex query, the columns you select are represented as a dictionary keyed by model. if a model appears twice (i.e. is joined on twice) how do ... | 2012-08-05T07:48:52 | 2013-11-02T03:31:54 | 2013-11-02T03:31:54 | NONE | null | Code as follow:
``` python
class A(db.Model):
f1 = CharField()
f2 = CharField()
f3 = CharField()
class B(db.Model):
f1 = ForeignKeyField(A)
f2 = ForeignKeyField(A)
f3 = CharField()
q = {A:['*'],
B:['f1'],
B:['f1'],
}
SelectQuery(B,q).join(A, on='f1').swi... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/103/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/103/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/102 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/102/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/102/comments | https://api.github.com/repos/coleifer/peewee/issues/102/events | https://github.com/coleifer/peewee/pull/102 | 5,956,022 | MDExOlB1bGxSZXF1ZXN0MTkzOTc4Ng== | 102 | Add support for querying models by primary-key value | {
"login": "tmoertel",
"id": 21773,
"node_id": "MDQ6VXNlcjIxNzcz",
"avatar_url": "https://avatars.githubusercontent.com/u/21773?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tmoertel",
"html_url": "https://github.com/tmoertel",
"followers_url": "https://api.github.com/users/tmoertel/foll... | [] | closed | false | null | [] | null | [
"There is a small problem in the implementation, which is that it does not take into account non-integer primary keys. That could be worked around though. I agree with this patch from the point-of-view that it simplifies the API but am not sure if it is worth changing the behavior of the entire `where` method (wh... | 2012-07-31T23:07:03 | 2014-07-06T01:51:40 | 2012-08-01T15:47:29 | CONTRIBUTOR | null | This (tiny!) patch allows you to query for a model instance by simply
providing its primary-key value as a query argument. You can use this
new convention anywhere Q objects are allowed, but the most-common
expected use case is this:
```
blog = Blog.get(1) # get blog w/ primary key of 1
```
Rationale.
Why this pat... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/102/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/102/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/102",
"html_url": "https://github.com/coleifer/peewee/pull/102",
"diff_url": "https://github.com/coleifer/peewee/pull/102.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/102.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/101 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/101/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/101/comments | https://api.github.com/repos/coleifer/peewee/issues/101/events | https://github.com/coleifer/peewee/pull/101 | 5,616,326 | MDExOlB1bGxSZXF1ZXN0MTc5NTAyNA== | 101 | Support multiple annotation using different aggregates | {
"login": "ternus",
"id": 77170,
"node_id": "MDQ6VXNlcjc3MTcw",
"avatar_url": "https://avatars.githubusercontent.com/u/77170?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ternus",
"html_url": "https://github.com/ternus",
"followers_url": "https://api.github.com/users/ternus/followers",
... | [] | closed | false | null | [] | null | [
"Hi @ternus sorry I missed your messages in IRC. Will look into this today, thnx for the excellent report :)\n"
] | 2012-07-13T23:33:13 | 2014-07-06T01:51:43 | 2012-07-14T16:17:03 | CONTRIBUTOR | null | Using .annotate() multiple times on the same query fails:
``` python
annotated = Blog.select().annotate(Entry).annotate(Entry, Max('pub_date', 'max_pub'))
```
generates the SQL:
``` sql
SELECT t1."id", t1."title", MAX(t2."pub_date") AS max_pub FROM "blog" AS t1 INNER JOIN "entry" AS t2 ON t1."id" = t2."blog_id" GROU... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/101/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/101/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/101",
"html_url": "https://github.com/coleifer/peewee/pull/101",
"diff_url": "https://github.com/coleifer/peewee/pull/101.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/101.patch",
"merged_at": "2012-07-14T16:17:03"
} |
https://api.github.com/repos/coleifer/peewee/issues/100 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/100/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/100/comments | https://api.github.com/repos/coleifer/peewee/issues/100/events | https://github.com/coleifer/peewee/issues/100 | 5,515,430 | MDU6SXNzdWU1NTE1NDMw | 100 | Required attribute for Fields | {
"login": "mkosler",
"id": 1159095,
"node_id": "MDQ6VXNlcjExNTkwOTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1159095?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mkosler",
"html_url": "https://github.com/mkosler",
"followers_url": "https://api.github.com/users/mkosler/... | [] | closed | false | null | [] | null | [
"Yes, non-nullable is the same as required. Not null means if you do not store something there, the database will complain. Adding a required would be redundant.\n",
"Well, then I think there must be a bug, because like I said, when I do this in the python shell, it doesn't yell at me. This is the model I am us... | 2012-07-10T04:26:04 | 2012-07-11T01:56:11 | 2012-07-11T01:56:11 | NONE | null | Newish to SQL so feel free to correct me if I can do this in some way already.
Is a field being not nullable the same as making the field required? I would figure this would be true, but doing some python shell experimenting, it seems that this is not true. I think adding a 'required' attribute to the base Field class... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/100/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/100/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/99 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/99/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/99/comments | https://api.github.com/repos/coleifer/peewee/issues/99/events | https://github.com/coleifer/peewee/issues/99 | 5,410,030 | MDU6SXNzdWU1NDEwMDMw | 99 | Escaping mysql reserved words when creating foreign keys | {
"login": "jonatanfan",
"id": 1277652,
"node_id": "MDQ6VXNlcjEyNzc2NTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/1277652?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jonatanfan",
"html_url": "https://github.com/jonatanfan",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"dupe of #98\n"
] | 2012-07-03T15:51:16 | 2012-07-03T16:15:10 | 2012-07-03T16:15:10 | NONE | null | Hi
Seems like reserved mysql words are not escaped when creating references for a table. Kind of a problem when a column is named `order`
Like so:
OrderProduct.create_table()
CREATE TABLE `orderproduct` (`id` INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY, `product_id` INTEGER NOT NULL REFERENCES product (id), `order_id... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/99/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/99/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/98 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/98/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/98/comments | https://api.github.com/repos/coleifer/peewee/issues/98/events | https://github.com/coleifer/peewee/issues/98 | 5,410,028 | MDU6SXNzdWU1NDEwMDI4 | 98 | Escaping mysql reserved words when creating foreign keys | {
"login": "jonatanfan",
"id": 1277652,
"node_id": "MDQ6VXNlcjEyNzc2NTI=",
"avatar_url": "https://avatars.githubusercontent.com/u/1277652?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jonatanfan",
"html_url": "https://github.com/jonatanfan",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [] | 2012-07-03T15:51:16 | 2012-07-03T19:03:21 | 2012-07-03T19:03:21 | NONE | null | Hi
Seems like reserved mysql words are not escaped when creating references for a table. Kind of a problem when a column is named `order`
Like so:
OrderProduct.create_table()
CREATE TABLE `orderproduct` (`id` INTEGER AUTO_INCREMENT NOT NULL PRIMARY KEY, `product_id` INTEGER NOT NULL REFERENCES product (id), `order_id... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/98/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/98/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/97 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/97/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/97/comments | https://api.github.com/repos/coleifer/peewee/issues/97/events | https://github.com/coleifer/peewee/pull/97 | 5,379,099 | MDExOlB1bGxSZXF1ZXN0MTY5MzE1NQ== | 97 | Fix Postgresql docstring in cookbook.rst | {
"login": "edavis",
"id": 622509,
"node_id": "MDQ6VXNlcjYyMjUwOQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/622509?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/edavis",
"html_url": "https://github.com/edavis",
"followers_url": "https://api.github.com/users/edavis/follow... | [] | closed | false | null | [] | null | [
"Good looking out!\n"
] | 2012-07-02T03:13:34 | 2014-07-06T01:51:44 | 2012-07-02T03:29:09 | CONTRIBUTOR | null | Very minor, but thought you'd like to know.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/97/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/97/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/97",
"html_url": "https://github.com/coleifer/peewee/pull/97",
"diff_url": "https://github.com/coleifer/peewee/pull/97.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/97.patch",
"merged_at": "2012-07-02T03:29:09"
} |
https://api.github.com/repos/coleifer/peewee/issues/96 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/96/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/96/comments | https://api.github.com/repos/coleifer/peewee/issues/96/events | https://github.com/coleifer/peewee/issues/96 | 5,298,272 | MDU6SXNzdWU1Mjk4Mjcy | 96 | Database.executemany is not available | {
"login": "karlb",
"id": 144773,
"node_id": "MDQ6VXNlcjE0NDc3Mw==",
"avatar_url": "https://avatars.githubusercontent.com/u/144773?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/karlb",
"html_url": "https://github.com/karlb",
"followers_url": "https://api.github.com/users/karlb/followers"... | [] | closed | false | null | [] | null | [
"I can call db.get_cursor().executemany, of course. It just expected executemany to be usable whereever execute can be used. So this is not important at all.\n",
"Yeah, I have not implemented executemany or executescript. Many of the db-api 2.0 methods, while used internally, are not exposed -- this is intention... | 2012-06-27T14:32:33 | 2012-06-27T16:10:53 | 2012-06-27T16:10:53 | NONE | null | In some cases I like to work directly with SQL by using Database.execute. However, I don't see a way to do what the DB-API executemany method does. In this specific case I'm trying to do multiple inserts this way.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/96/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/96/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/95 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/95/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/95/comments | https://api.github.com/repos/coleifer/peewee/issues/95/events | https://github.com/coleifer/peewee/issues/95 | 5,248,654 | MDU6SXNzdWU1MjQ4NjU0 | 95 | Database Support | {
"login": "cevarief",
"id": 850737,
"node_id": "MDQ6VXNlcjg1MDczNw==",
"avatar_url": "https://avatars.githubusercontent.com/u/850737?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cevarief",
"html_url": "https://github.com/cevarief",
"followers_url": "https://api.github.com/users/cevarie... | [] | closed | false | null | [] | null | [
"I don't know much about firebird -- will have to look into it. Currently, peewee's internal db calls rely on the driver supporting the python db-api 2.0. It looks like kinterbasdb supports this, so integration should be really easy. I was thinking personally that the next driver i'd like to look at is [apsw](ht... | 2012-06-25T13:32:59 | 2012-06-26T01:32:26 | 2012-06-26T01:32:26 | NONE | null | What is next database that will be supported by peewe? Any plan for firebird?
For prototyping sqlite is enough, but for portable database in production embedded firebird could give more power...
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/95/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/95/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/94 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/94/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/94/comments | https://api.github.com/repos/coleifer/peewee/issues/94/events | https://github.com/coleifer/peewee/pull/94 | 5,219,779 | MDExOlB1bGxSZXF1ZXN0MTYzMDAyNQ== | 94 | Fixed thread_locals not actually working. | {
"login": "b1naryth1ef",
"id": 599433,
"node_id": "MDQ6VXNlcjU5OTQzMw==",
"avatar_url": "https://avatars.githubusercontent.com/u/599433?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/b1naryth1ef",
"html_url": "https://github.com/b1naryth1ef",
"followers_url": "https://api.github.com/user... | [] | closed | false | null | [] | null | [
"How does this come about? How is it being passed in via connect_kwargs?\n",
"Hmm, i'm kind of baffled -- where is \"self.threadlocals\" referenced? In my code it appears that it is just used in the scope of the init method, where the `__local` is instantiated. Can you explain more the rationale?\n",
"I was ... | 2012-06-22T17:18:46 | 2014-06-12T17:04:18 | 2012-06-22T20:15:59 | NONE | null | Cheap fix that you may feel like rewriting to actually trace back to the problem. The thread_locals var was being passed in as connect_kwargs as opposed to the keyword.
Again, this is probably just a temporary fix.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/94/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/94/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/94",
"html_url": "https://github.com/coleifer/peewee/pull/94",
"diff_url": "https://github.com/coleifer/peewee/pull/94.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/94.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/93 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/93/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/93/comments | https://api.github.com/repos/coleifer/peewee/issues/93/events | https://github.com/coleifer/peewee/issues/93 | 4,961,548 | MDU6SXNzdWU0OTYxNTQ4 | 93 | choices just like django or mongoengine | {
"login": "ddorian",
"id": 1592898,
"node_id": "MDQ6VXNlcjE1OTI4OTg=",
"avatar_url": "https://avatars.githubusercontent.com/u/1592898?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ddorian",
"html_url": "https://github.com/ddorian",
"followers_url": "https://api.github.com/users/ddorian/... | [] | closed | false | null | [] | null | [
"i'm on the fence about this, should they be implemented as a check constraint or solely in python? if you assign something that is an invalid choice, should it error out? if so, what type of error?\n",
"i checked django, it seems you can assign invalid values to a field that specifies `choices`. you can also ... | 2012-06-07T23:17:47 | 2012-06-08T22:58:06 | 2012-06-08T22:58:06 | NONE | null | Add choices to fields like django and mongoengine.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/93/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/93/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/92 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/92/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/92/comments | https://api.github.com/repos/coleifer/peewee/issues/92/events | https://github.com/coleifer/peewee/issues/92 | 4,877,961 | MDU6SXNzdWU0ODc3OTYx | 92 | peewee 0.9.6 docs show transaction context manager, which isn't in 0.9.6 | {
"login": "rouge8",
"id": 237005,
"node_id": "MDQ6VXNlcjIzNzAwNQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/237005?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rouge8",
"html_url": "https://github.com/rouge8",
"followers_url": "https://api.github.com/users/rouge8/follow... | [] | closed | false | null | [] | null | [
"thanks for catching this, i pushed a new version 0.9.7 and a new git tag.\n"
] | 2012-06-03T16:52:20 | 2012-06-04T17:04:01 | 2012-06-04T17:04:01 | CONTRIBUTOR | null | The [docs for 0.9.6](http://peewee.readthedocs.org/en/latest/peewee/cookbook.html?highlight=transaction#context-manager) show the context manager for transactions, but after installing 0.9.6 this wasn't supported.
Installing from `git:master` fixed it. Maybe time for 0.9.7?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/92/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/92/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/91 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/91/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/91/comments | https://api.github.com/repos/coleifer/peewee/issues/91/events | https://github.com/coleifer/peewee/pull/91 | 4,873,218 | MDExOlB1bGxSZXF1ZXN0MTQ4MDUyNg== | 91 | Added auto_round and always_float attributes to DecimalField | {
"login": "applegrew",
"id": 434574,
"node_id": "MDQ6VXNlcjQzNDU3NA==",
"avatar_url": "https://avatars.githubusercontent.com/u/434574?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/applegrew",
"html_url": "https://github.com/applegrew",
"followers_url": "https://api.github.com/users/appl... | [] | closed | false | null | [] | null | [
"Not sure on the application of the float option, since there's a floatfield already. As far as rounding, I suppose that would be handled by the DB when you specify a precision on the column, but this might need to be looked into a little more.\n",
"- Yes there is `FloatField` but it does not allow us to define ... | 2012-06-02T20:59:55 | 2014-07-06T01:51:53 | 2012-06-05T00:27:29 | NONE | null | - auto_round makes sure that if the value has higher precision than the
number of decimal_places then it round it to that value before send
that to db. This will save from some unexpected "Data truncation"
warnings from MySQL (http://bit.ly/bWr1mn).
- always_float makes sure that in Python code always gets the va... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/91/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/91/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/91",
"html_url": "https://github.com/coleifer/peewee/pull/91",
"diff_url": "https://github.com/coleifer/peewee/pull/91.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/91.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/90 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/90/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/90/comments | https://api.github.com/repos/coleifer/peewee/issues/90/events | https://github.com/coleifer/peewee/issues/90 | 4,790,001 | MDU6SXNzdWU0NzkwMDAx | 90 | follow_joins - assigns duplicate aliases during complex joins | {
"login": "sdobz",
"id": 948178,
"node_id": "MDQ6VXNlcjk0ODE3OA==",
"avatar_url": "https://avatars.githubusercontent.com/u/948178?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/sdobz",
"html_url": "https://github.com/sdobz",
"followers_url": "https://api.github.com/users/sdobz/followers"... | [] | closed | false | null | [] | null | [
"Thanks so much for the excellent bug report, I've added a fix and a testcase.\n"
] | 2012-05-29T07:32:49 | 2012-05-29T15:13:37 | 2012-05-29T15:13:17 | NONE | null | I am doing something ugly (view support) and in the process of building some automated joins I discovered that certain queries create duplicate aliases in a sql select.
``` python
from peewee import *
class Artist(Model):
artistid = CharField(size=36,unique=True)
name = CharField()
sortname = CharField()
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/90/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/90/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/89 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/89/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/89/comments | https://api.github.com/repos/coleifer/peewee/issues/89/events | https://github.com/coleifer/peewee/issues/89 | 4,756,938 | MDU6SXNzdWU0NzU2OTM4 | 89 | The same record different instances save() behavior | {
"login": "coderbuzz",
"id": 1284811,
"node_id": "MDQ6VXNlcjEyODQ4MTE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1284811?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/coderbuzz",
"html_url": "https://github.com/coderbuzz",
"followers_url": "https://api.github.com/users/co... | [] | closed | false | null | [] | null | [
"This is correct, calling a model's save method will wholesale update the row in the database with the field data present on the model instance **at the time of saving**. item2 will not automatically receive changes made to item1, since they are separate instances. This is intended behavior.\n\nIf you want to onl... | 2012-05-25T16:46:51 | 2012-05-25T16:50:23 | 2012-05-25T16:50:23 | NONE | null | **Please considering a bug:**
I'm in situation which fetching the same db record but different instance, each modified somewhere.
``` python
item1 = get_item(filter='A') # return new instance of rec A
item2 = get_item(filter='A') # also return new instance of rec A
# item1 and item2 refer to the same db r... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/89/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/89/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/88 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/88/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/88/comments | https://api.github.com/repos/coleifer/peewee/issues/88/events | https://github.com/coleifer/peewee/pull/88 | 4,708,361 | MDExOlB1bGxSZXF1ZXN0MTQwOTc0Ng== | 88 | Pull request to fix issue #87 | {
"login": "maiksprenger",
"id": 509427,
"node_id": "MDQ6VXNlcjUwOTQyNw==",
"avatar_url": "https://avatars.githubusercontent.com/u/509427?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/maiksprenger",
"html_url": "https://github.com/maiksprenger",
"followers_url": "https://api.github.com/u... | [] | closed | false | null | [] | null | [] | 2012-05-23T10:07:18 | 2014-07-06T01:51:54 | 2012-05-23T14:26:25 | NONE | null | Hello Charles,
I suggest the following fix to resolve the problem described by me here: https://github.com/coleifer/peewee/issues/87
With regards,
Maik Hoepfel
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/88/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/88/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/88",
"html_url": "https://github.com/coleifer/peewee/pull/88",
"diff_url": "https://github.com/coleifer/peewee/pull/88.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/88.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/87 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/87/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/87/comments | https://api.github.com/repos/coleifer/peewee/issues/87/events | https://github.com/coleifer/peewee/issues/87 | 4,708,010 | MDU6SXNzdWU0NzA4MDEw | 87 | NULL value for BooleanField returns False instead of None | {
"login": "maiksprenger",
"id": 509427,
"node_id": "MDQ6VXNlcjUwOTQyNw==",
"avatar_url": "https://avatars.githubusercontent.com/u/509427?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/maiksprenger",
"html_url": "https://github.com/maiksprenger",
"followers_url": "https://api.github.com/u... | [] | closed | false | null | [] | null | [] | 2012-05-23T09:46:09 | 2012-05-23T14:26:04 | 2012-05-23T14:26:04 | NONE | null | I have a User object that can has, among others, the following fields.
```
class User(BaseModel):
class Meta:
db_table = 'users'
user_id = peewee.PrimaryKeyField()
crm_id = peewee.CharField(null=True)
username = peewee.CharField()
password = peewee.CharField()
lost_pw_key = peewee.Cha... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/87/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/87/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/86 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/86/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/86/comments | https://api.github.com/repos/coleifer/peewee/issues/86/events | https://github.com/coleifer/peewee/issues/86 | 4,707,954 | MDU6SXNzdWU0NzA3OTU0 | 86 | Support for model1 != model2 | {
"login": "wtld",
"id": 1318746,
"node_id": "MDQ6VXNlcjEzMTg3NDY=",
"avatar_url": "https://avatars.githubusercontent.com/u/1318746?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/wtld",
"html_url": "https://github.com/wtld",
"followers_url": "https://api.github.com/users/wtld/followers",
... | [] | closed | false | null | [] | null | [] | 2012-05-23T09:42:59 | 2012-05-23T14:18:24 | 2012-05-23T14:18:24 | NONE | null | ``` python
>>> from models import Test
>>> t1 = Test.get(id=1)
>>> t2 = Test.get(id=1)
>>> t1 == t2
True
>>> t1 != t2
True
```
I think that `__ne__` method as opposite to `__eq__` should be added to the Model class.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/86/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/86/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/85 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/85/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/85/comments | https://api.github.com/repos/coleifer/peewee/issues/85/events | https://github.com/coleifer/peewee/pull/85 | 4,675,541 | MDExOlB1bGxSZXF1ZXN0MTM5NDgxNg== | 85 | Add schema support for Postgresql | {
"login": "redapple",
"id": 886296,
"node_id": "MDQ6VXNlcjg4NjI5Ng==",
"avatar_url": "https://avatars.githubusercontent.com/u/886296?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/redapple",
"html_url": "https://github.com/redapple",
"followers_url": "https://api.github.com/users/redappl... | [] | closed | false | null | [] | null | [
"I ran w/some of your ideas and have added functionality for switching search path and specifying schema when introspecting:\n\nbc465f467d0f3ccbf03c1b49ea2b2ecb04c0c765\n963cfe41c9af773be934e36fb5e3a17eaeb85ff6\n",
"Cool.\nI'll continue learning peewee.\nCheers,\nPaul.\n"
] | 2012-05-21T17:33:17 | 2014-07-06T01:51:56 | 2012-05-22T18:13:06 | NONE | null | Hi,
I've been playing a bit with peewee and had to add a few things to inspect a Postgresql database within a schema.
I haven't done much testing apart from this local Postgresql (a MusicBrainz DB mirror).
Any thoughts?
Cheers.
Paul.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/85/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/85/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/85",
"html_url": "https://github.com/coleifer/peewee/pull/85",
"diff_url": "https://github.com/coleifer/peewee/pull/85.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/85.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/84 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/84/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/84/comments | https://api.github.com/repos/coleifer/peewee/issues/84/events | https://github.com/coleifer/peewee/pull/84 | 4,663,512 | MDExOlB1bGxSZXF1ZXN0MTM4OTY2MQ== | 84 | Make common bulk operations on models and tables easier to do and harder to screw up | {
"login": "tmoertel",
"id": 21773,
"node_id": "MDQ6VXNlcjIxNzcz",
"avatar_url": "https://avatars.githubusercontent.com/u/21773?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tmoertel",
"html_url": "https://github.com/tmoertel",
"followers_url": "https://api.github.com/users/tmoertel/foll... | [] | closed | false | null | [] | null | [
"Wow, this is pretty interesting stuff. I'm a little bit grossed out by inspecting stack frames, I wonder if it might make sense to use the model metaclass to track subclasses or something explicit even. Not sure about merging yet, i've been playing with a branch features/extras where i've added a support for \"s... | 2012-05-21T00:06:42 | 2014-07-06T01:51:57 | 2012-05-22T20:56:44 | CONTRIBUTOR | null | In this branch, I've made a few small additions to peewee to make some common model and table operations easy, automatic, and hard to screw up:
- finding all your models; and
- creating/dropping their tables.
Instead of having to maintain boilerplate code to do that job, now you can just let peewee take care of it:
`... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/84/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/84/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/84",
"html_url": "https://github.com/coleifer/peewee/pull/84",
"diff_url": "https://github.com/coleifer/peewee/pull/84.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/84.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/83 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/83/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/83/comments | https://api.github.com/repos/coleifer/peewee/issues/83/events | https://github.com/coleifer/peewee/issues/83 | 4,561,866 | MDU6SXNzdWU0NTYxODY2 | 83 | add, create, remove, clear from ReverseForeignRelatedObject | {
"login": "maxekman",
"id": 821518,
"node_id": "MDQ6VXNlcjgyMTUxOA==",
"avatar_url": "https://avatars.githubusercontent.com/u/821518?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/maxekman",
"html_url": "https://github.com/maxekman",
"followers_url": "https://api.github.com/users/maxekma... | [] | closed | false | null | [] | null | [
"First off, thanks for the suggestions -- I appreciate your interest in the project! This is a pretty nice API that django has, but i don't believe its something I'll add. The 'reverse relation' is exposed as a simple select query, and I think that is a good fit. The \"automatic\" filter is there on the select q... | 2012-05-14T11:54:55 | 2012-05-14T17:52:02 | 2012-05-14T17:38:01 | NONE | null | Have you thought of adding some helpers to (I think) ReverseForeignRelatedObject, similar to what Django have?
Here are their docs describing it, a little bit down on the page: https://docs.djangoproject.com/en/dev/topics/db/queries/#following-relationships-backward
Sorry for spamming with ideas, I just think peewee ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/83/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/83/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/82 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/82/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/82/comments | https://api.github.com/repos/coleifer/peewee/issues/82/events | https://github.com/coleifer/peewee/issues/82 | 4,542,935 | MDU6SXNzdWU0NTQyOTM1 | 82 | Hooks for CRUD | {
"login": "maxekman",
"id": 821518,
"node_id": "MDQ6VXNlcjgyMTUxOA==",
"avatar_url": "https://avatars.githubusercontent.com/u/821518?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/maxekman",
"html_url": "https://github.com/maxekman",
"followers_url": "https://api.github.com/users/maxekma... | [] | closed | false | null | [] | null | [
"I'm on the fence about this...feel like the signals should be able to exist at the application level as opposed to the database level.\n",
"Sure, as I see it they should be on each model, that's how I was imagining to use them.\n\nI my FSM case I would load the local in-memory FSM object after the model is loade... | 2012-05-11T23:24:02 | 2012-05-14T20:18:58 | 2012-05-14T19:57:28 | NONE | null | I'm trying to add this minimalistic FSM (https://github.com/oxplot/fysom) to a peewee model and just storing the state as a char field. The problem I'm having is restoring the state when selecting or creating models from elsewhere. Saving a state change is easy using the FSM callbacks. I have tried using a overloaded i... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/82/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/82/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/81 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/81/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/81/comments | https://api.github.com/repos/coleifer/peewee/issues/81/events | https://github.com/coleifer/peewee/issues/81 | 4,503,663 | MDU6SXNzdWU0NTAzNjYz | 81 | Iterator fails when accessing db inside loop | {
"login": "maxekman",
"id": 821518,
"node_id": "MDQ6VXNlcjgyMTUxOA==",
"avatar_url": "https://avatars.githubusercontent.com/u/821518?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/maxekman",
"html_url": "https://github.com/maxekman",
"followers_url": "https://api.github.com/users/maxekma... | [] | closed | false | null | [] | null | [
"I think I know what causes the \"running more times than there are items in the container\" problem. See [this comment from earlier today](https://github.com/coleifer/peewee/issues/12#issuecomment-5614404) on a related issue for the details.\n",
"@tmoertel nailed it in that comment. Basically, there are a coupl... | 2012-05-09T23:18:33 | 2014-09-19T19:00:31 | 2012-05-10T01:48:15 | NONE | null | Accessing other db objects (moving the cursor) inside a loop with a foreign key results in this error:
"InterfaceError: Error binding parameter 0 - probably unsupported type."
Similar usage to this crashes:
``` python
class Container(Model):
name = CharField()
class Item(Model):
name = CharField()
conta... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/81/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/81/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/80 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/80/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/80/comments | https://api.github.com/repos/coleifer/peewee/issues/80/events | https://github.com/coleifer/peewee/issues/80 | 4,474,361 | MDU6SXNzdWU0NDc0MzYx | 80 | max recursion depth exceeded on admin add | {
"login": "davidthewatson",
"id": 150892,
"node_id": "MDQ6VXNlcjE1MDg5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/150892?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/davidthewatson",
"html_url": "https://github.com/davidthewatson",
"followers_url": "https://api.github... | [] | closed | false | null | [] | null | [
"What is the db_now() function? btw, i truncated your stacktrace, there were hundreds of lines of dupe data.\n",
"I should add that I do not experience this problem locally and the test suite is passing. Have you tried running the example app that ships w/flask-peewee and do you observe the same thing?\n",
"H... | 2012-05-08T15:02:52 | 2012-05-08T23:24:59 | 2012-05-08T23:23:23 | NONE | null | I've got the following on fedora core 16 with postgresql:
```
Flask==0.8
Flask-DebugToolbar==0.6.3.1
Flask-OpenID==1.0.1
Flask-WTF==0.6
Jinja2==2.6
WTForms==1.0.1
Werkzeug==0.8.3
blinker==1.2
certifi==0.0.8
chardet==1.0.1
diesel==2.1.1
flask-peewee==0.5.1
greenlet==0.3.4
oauthlib==0.1.2
peewee==0.9.5
psycopg2==2.4.5... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/80/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/80/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/79 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/79/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/79/comments | https://api.github.com/repos/coleifer/peewee/issues/79/events | https://github.com/coleifer/peewee/issues/79 | 4,435,804 | MDU6SXNzdWU0NDM1ODA0 | 79 | Database Creation | {
"login": "maxekman",
"id": 821518,
"node_id": "MDQ6VXNlcjgyMTUxOA==",
"avatar_url": "https://avatars.githubusercontent.com/u/821518?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/maxekman",
"html_url": "https://github.com/maxekman",
"followers_url": "https://api.github.com/users/maxekma... | [] | closed | false | null | [] | null | [
"I've been thinking about how to fix this... I'm going to assume that a model is \"actually used\" whenever the db connection is either explicitly or implicitly opened. If that's the case, then it really isn't a problem to structure your code such that you modify the underlying db connection on-the-fly. The most ... | 2012-05-05T10:36:32 | 2012-05-09T23:27:17 | 2012-05-09T15:28:13 | NONE | null | I need to read in the db config from a file which currently does not work with the way the Meta class is used. It creates a default "peewee.db" if the database attribute is not set when parsing the model classes. Could this be delayed until a Model is actually used?
I just read this thread on the mailing list about th... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/79/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/79/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/78 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/78/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/78/comments | https://api.github.com/repos/coleifer/peewee/issues/78/events | https://github.com/coleifer/peewee/issues/78 | 4,302,585 | MDU6SXNzdWU0MzAyNTg1 | 78 | Peewee ignores given database name. Puts peewee.db instead. | {
"login": "DDevine",
"id": 913394,
"node_id": "MDQ6VXNlcjkxMzM5NA==",
"avatar_url": "https://avatars.githubusercontent.com/u/913394?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/DDevine",
"html_url": "https://github.com/DDevine",
"followers_url": "https://api.github.com/users/DDevine/fo... | [] | closed | false | null | [] | null | [
"This sounds like a configuration issue. Please refer to the docs here:\n\nhttp://peewee.readthedocs.org/en/latest/peewee/cookbook.html#creating-a-database-connection-and-tables\n\n``` python\n\ndb = SqliteDatabase('database.db')\n\nclass Entry(Model):\n # foo bar baz\n\n class Meta:\n database = db #... | 2012-04-26T14:16:00 | 2012-04-27T03:48:42 | 2012-04-26T14:18:46 | NONE | null | I had a database called database.db, then I opened a python prompt and did the following:
> > > import peewee
> > > from blog import Entry
> > > db = peewee.SqliteDatabase('database.db')
> > > db.connect()
> > > Entry.create_table()
> > > entry = Entry()
> > > entry.title = "test"
> > > entry.tags = "derp blah"
> > > ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/78/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/78/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/77 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/77/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/77/comments | https://api.github.com/repos/coleifer/peewee/issues/77/events | https://github.com/coleifer/peewee/pull/77 | 4,274,573 | MDExOlB1bGxSZXF1ZXN0MTIyNzgwNQ== | 77 | Change documentation link in README to point to RTD | {
"login": "rouge8",
"id": 237005,
"node_id": "MDQ6VXNlcjIzNzAwNQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/237005?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rouge8",
"html_url": "https://github.com/rouge8",
"followers_url": "https://api.github.com/users/rouge8/follow... | [] | closed | false | null | [] | null | [
"Thanks!\n"
] | 2012-04-25T04:49:33 | 2014-07-06T01:51:59 | 2012-04-25T17:11:44 | CONTRIBUTOR | null | [RTD](http://peewee.readthedocs.org/en/latest/index.html) had a newer version of the documentation, and is linked from the github description, so I assumed that's the canonical doc location.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/77/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/77/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/77",
"html_url": "https://github.com/coleifer/peewee/pull/77",
"diff_url": "https://github.com/coleifer/peewee/pull/77.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/77.patch",
"merged_at": "2012-04-25T17:11:44"
} |
https://api.github.com/repos/coleifer/peewee/issues/76 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/76/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/76/comments | https://api.github.com/repos/coleifer/peewee/issues/76/events | https://github.com/coleifer/peewee/issues/76 | 4,245,848 | MDU6SXNzdWU0MjQ1ODQ4 | 76 | on windows, peewee-0.9.4 line 1965, SyntaxError: invalid syntax | {
"login": "huaitwooos",
"id": 1182693,
"node_id": "MDQ6VXNlcjExODI2OTM=",
"avatar_url": "https://avatars.githubusercontent.com/u/1182693?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/huaitwooos",
"html_url": "https://github.com/huaitwooos",
"followers_url": "https://api.github.com/users... | [] | closed | false | null | [] | null | [
"updated formatting\n",
"I'm not quite clear on what is throwing that error, can you provide a little more information?\n",
"if i delete[ , microsecond=usec], the error will goto line 1994.\n\n<pre>\nTraceback (most recent call last):\n File \"C:\\Download\\dev\\peewee-0.9.4\\a.py\", line 1, in <module>\n i... | 2012-04-23T17:59:08 | 2012-04-24T14:31:02 | 2012-04-24T14:31:02 | NONE | null | C:\Download\dev\flask-peewee\coleifer-peewee-6fb13f1\example>python
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
``` python
>>> import peewee
Traceback (most recent call last):
File "<stdin>", line 1, in <... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/76/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/76/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/75 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/75/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/75/comments | https://api.github.com/repos/coleifer/peewee/issues/75/events | https://github.com/coleifer/peewee/pull/75 | 4,176,533 | MDExOlB1bGxSZXF1ZXN0MTE4ODE0OA== | 75 | pwiz.py: mysqldb use passwd not password as keyword argument | {
"login": "Alquimista",
"id": 185971,
"node_id": "MDQ6VXNlcjE4NTk3MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/185971?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Alquimista",
"html_url": "https://github.com/Alquimista",
"followers_url": "https://api.github.com/users/A... | [] | closed | false | null | [] | null | [
"already fixed, thanks!\n"
] | 2012-04-18T17:16:06 | 2014-07-06T01:52:00 | 2012-04-18T17:16:59 | NONE | null | https://github.com/coleifer/peewee/issues/74
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/75/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/75/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/75",
"html_url": "https://github.com/coleifer/peewee/pull/75",
"diff_url": "https://github.com/coleifer/peewee/pull/75.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/75.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/74 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/74/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/74/comments | https://api.github.com/repos/coleifer/peewee/issues/74/events | https://github.com/coleifer/peewee/issues/74 | 4,176,487 | MDU6SXNzdWU0MTc2NDg3 | 74 | pwiz mysql connection | {
"login": "Alquimista",
"id": 185971,
"node_id": "MDQ6VXNlcjE4NTk3MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/185971?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Alquimista",
"html_url": "https://github.com/Alquimista",
"followers_url": "https://api.github.com/users/A... | [] | closed | false | null | [] | null | [] | 2012-04-18T17:13:18 | 2012-04-18T17:15:34 | 2012-04-18T17:15:34 | NONE | null | mysqldb use passwd not password as keyword argument
db = MySQLdb.connect(host="localhost",user="joebob",
passwd="moonpie",db="thangs")
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/74/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/74/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/73 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/73/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/73/comments | https://api.github.com/repos/coleifer/peewee/issues/73/events | https://github.com/coleifer/peewee/issues/73 | 4,139,400 | MDU6SXNzdWU0MTM5NDAw | 73 | Memory usage Runs wild | {
"login": "prggmr",
"id": 207314,
"node_id": "MDQ6VXNlcjIwNzMxNA==",
"avatar_url": "https://avatars.githubusercontent.com/u/207314?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/prggmr",
"html_url": "https://github.com/prggmr",
"followers_url": "https://api.github.com/users/prggmr/follow... | [] | closed | false | null | [] | null | [
"It definitely sounds like there's a problem somewhere. I'd like to know a little bit more before I set about trying to replicate -- what database engine were you using? Did you try dropping down to the db driver and issuing raw SQL queries, and if so did this fix the problem? Were you iterating over a large num... | 2012-04-16T18:07:01 | 2019-10-12T14:22:44 | 2012-04-17T02:05:56 | NONE | null | Hello,
I believe to have found a problem with the library causing excessive memory usage when used with long running processes, the problem I encountered is when importing a very large XML file (80+GB) the memory usage would climb at a very steady rate, after exhausting all other options to what was consuming the memo... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/73/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/73/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/72 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/72/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/72/comments | https://api.github.com/repos/coleifer/peewee/issues/72/events | https://github.com/coleifer/peewee/pull/72 | 4,133,991 | MDExOlB1bGxSZXF1ZXN0MTE3MDIzNw== | 72 | Avoid error when returning non-ascii characters from __unicode__ method | {
"login": "karlb",
"id": 144773,
"node_id": "MDQ6VXNlcjE0NDc3Mw==",
"avatar_url": "https://avatars.githubusercontent.com/u/144773?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/karlb",
"html_url": "https://github.com/karlb",
"followers_url": "https://api.github.com/users/karlb/followers"... | [] | closed | false | null | [] | null | [] | 2012-04-16T13:10:53 | 2014-07-06T01:52:01 | 2012-04-16T14:26:41 | NONE | null | The **repr** methods just tries to cast the unicode to str, which fails when non-ascii characters are present.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/72/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/72/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/72",
"html_url": "https://github.com/coleifer/peewee/pull/72",
"diff_url": "https://github.com/coleifer/peewee/pull/72.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/72.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/71 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/71/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/71/comments | https://api.github.com/repos/coleifer/peewee/issues/71/events | https://github.com/coleifer/peewee/issues/71 | 4,080,925 | MDU6SXNzdWU0MDgwOTI1 | 71 | VarCharColumn - TypeError: 'long' object is not subscriptable | {
"login": "smokedice",
"id": 1133455,
"node_id": "MDQ6VXNlcjExMzM0NTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1133455?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/smokedice",
"html_url": "https://github.com/smokedice",
"followers_url": "https://api.github.com/users/sm... | [] | closed | false | null | [] | null | [] | 2012-04-12T09:48:09 | 2012-04-15T20:12:10 | 2012-04-15T20:12:09 | NONE | null | Line 1944 should convert the provided value into a string:
value = str(value or '')
This should stop errors occurring when integers or such are passed in.
Traceback (most recent call last):
File "/home/smoky/Documents/Workspace/TASv3/Code/common/CommonSignals/AbstractSignal.py", line 25, in execute
action(... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/71/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/71/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/70 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/70/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/70/comments | https://api.github.com/repos/coleifer/peewee/issues/70/events | https://github.com/coleifer/peewee/issues/70 | 4,066,732 | MDU6SXNzdWU0MDY2NzMy | 70 | PK not respecting db column (via mailing list) | {
"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 | [
"Places to test:\n- setting up joins (follow_joins)\n- select query count()\n- parse select query special case for when just an id is selected .select(\"id\") -> .select({Model: ['id']})\n- convert_subquery\n- annotate_query\n- foreign related object lookup\n- foreign key field\n- model save\n- model collect_querie... | 2012-04-11T15:13:25 | 2012-04-11T16:38:59 | 2012-04-11T16:38:59 | OWNER | null | Model:
``` python
class Peer(BaseModel):
peerId = PrimaryKeyField(db_column = 'id')
macAddress = CharField()
netAddress = CharField()
```
Error:
```
Traceback (most recent call last):
File "/home/smoky/Documents/Workspace/TASv3/Code/tests/BusinessLogic/Results/Loggers/TestSQLLiteLogger.py", line 58, in... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/70/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/70/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/69 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/69/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/69/comments | https://api.github.com/repos/coleifer/peewee/issues/69/events | https://github.com/coleifer/peewee/issues/69 | 3,994,985 | MDU6SXNzdWUzOTk0OTg1 | 69 | SelectQuery dictionary fields | {
"login": "jdearl",
"id": 1612844,
"node_id": "MDQ6VXNlcjE2MTI4NDQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/1612844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jdearl",
"html_url": "https://github.com/jdearl",
"followers_url": "https://api.github.com/users/jdearl/foll... | [] | closed | false | null | [] | null | [
"First off, thank you so much for including the SQL, makes debugging so much easier :)\n\nSince a product can have multiple items, the value of the aggregate functions has meaning and that is why you get meaningful results. The big question is what you expect \"price1\" to be. By the \"?\" interpolation I gather ... | 2012-04-05T20:07:26 | 2012-04-06T21:22:25 | 2012-04-06T19:14:57 | NONE | null | With the following I can access 'min' and 'max', but not 'price1'.
products = Product.select({
Product: ['*'],
Item: ['price1', Min('price1'), Max('price1')],
}).where(category_id=id).group_by('id').join(Item)
SQL:
('SELECT t1."id", t1."brand", t1."category_id", t1."name", t1."overview", t1."details", t2."pr... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/69/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/69/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/68 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/68/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/68/comments | https://api.github.com/repos/coleifer/peewee/issues/68/events | https://github.com/coleifer/peewee/issues/68 | 3,975,858 | MDU6SXNzdWUzOTc1ODU4 | 68 | ValueError datetime | {
"login": "jdearl",
"id": 1612844,
"node_id": "MDQ6VXNlcjE2MTI4NDQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/1612844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jdearl",
"html_url": "https://github.com/jdearl",
"followers_url": "https://api.github.com/users/jdearl/foll... | [] | closed | false | null | [] | null | [
"I think the first 2 should probably work as expected with the existing DateTimeField, but the last should probably be given its own \"DateField\" a-la django (and maybe a TimeField as well for times). Thanks for reporting\n",
"Is it possible to cast them to a DateTime with 0's? That's sorta what I'd expect to ... | 2012-04-04T18:34:14 | 2012-05-14T19:21:38 | 2012-04-06T20:00:17 | NONE | null | I have an SQLite database which has a DateTimeField() with a few different datetime formats (not on purpose). I will probably fix my datetime values, but I thought I'd post this in case you feel peewee should handle this gracefully?
2011-11-15 21:53:59.759451+0000
2011-11-28 20:12:03
2009-01-01 (error)
http://paste.... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/68/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/68/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/67 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/67/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/67/comments | https://api.github.com/repos/coleifer/peewee/issues/67/events | https://github.com/coleifer/peewee/issues/67 | 3,915,715 | MDU6SXNzdWUzOTE1NzE1 | 67 | Mysql error 2014 and 2006 | {
"login": "LeoDT",
"id": 685203,
"node_id": "MDQ6VXNlcjY4NTIwMw==",
"avatar_url": "https://avatars.githubusercontent.com/u/685203?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/LeoDT",
"html_url": "https://github.com/LeoDT",
"followers_url": "https://api.github.com/users/LeoDT/followers"... | [] | closed | false | null | [] | null | [
"hey.....\n",
"Try closing your connections. Is your server multithreaded by chance?\n",
"If I close the connections, this problem seems solved.\nBut is it good to reconnect mysql every request?\n\nMultithreaded by chance? How to check this?\n",
"Yeah you should not reuse your conns across requests. Use a c... | 2012-04-01T10:49:06 | 2019-12-06T04:27:32 | 2012-04-06T17:51:46 | NONE | null | I'm building a small site using peewee and bottle.py.
And I got Mysql error 2014 and 2006 frequently either develop env(windows) or product env(linux).
I connect mysql before every request, but don't close it. Does this matter?
Mysql error 2014 is "Commands out of sync; you can't run this command now" and 2006 is "M... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/67/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/67/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/66 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/66/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/66/comments | https://api.github.com/repos/coleifer/peewee/issues/66/events | https://github.com/coleifer/peewee/pull/66 | 3,893,120 | MDExOlB1bGxSZXF1ZXN0MTA3NjE4NQ== | 66 | set the default charset to utf8 when create_table | {
"login": "wong2",
"id": 321947,
"node_id": "MDQ6VXNlcjMyMTk0Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/321947?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/wong2",
"html_url": "https://github.com/wong2",
"followers_url": "https://api.github.com/users/wong2/followers"... | [] | closed | false | null | [] | null | [
"Forgot to say that I just tested it in MySQL.\n",
"Does this not work? https://github.com/coleifer/peewee/blob/master/peewee.py#L244\n",
"I think that is the charset when connecting to MySQL, it doesn't specify the default charset for creating tables so when I insert Chinese words to the table, they are garble... | 2012-03-30T06:22:30 | 2014-07-06T01:52:03 | 2012-04-02T15:56:04 | NONE | null | when create table, set the default charset to utf-8 to support more languages such as Chinese.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/66/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/66/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/66",
"html_url": "https://github.com/coleifer/peewee/pull/66",
"diff_url": "https://github.com/coleifer/peewee/pull/66.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/66.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/65 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/65/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/65/comments | https://api.github.com/repos/coleifer/peewee/issues/65/events | https://github.com/coleifer/peewee/pull/65 | 3,780,448 | MDExOlB1bGxSZXF1ZXN0MTAzNjQxOA== | 65 | Fix problems with models which have a "model" field | {
"login": "karlb",
"id": 144773,
"node_id": "MDQ6VXNlcjE0NDc3Mw==",
"avatar_url": "https://avatars.githubusercontent.com/u/144773?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/karlb",
"html_url": "https://github.com/karlb",
"followers_url": "https://api.github.com/users/karlb/followers"... | [] | closed | false | null | [] | null | [
"this is probably an issue in more places than just this\n",
"As a workaround you could try using the db_column attribute on your field named \"model\":\n\n``` python\n\nclass MyModel(Model):\n model_alias = CharField(db_column='model')\n```\n",
"So far my project works fine with the change in the pull reque... | 2012-03-23T14:15:49 | 2014-07-06T01:52:04 | 2012-04-10T12:57:13 | NONE | null | The same solution is already being used by the Q class.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/65/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/65/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/65",
"html_url": "https://github.com/coleifer/peewee/pull/65",
"diff_url": "https://github.com/coleifer/peewee/pull/65.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/65.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/64 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/64/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/64/comments | https://api.github.com/repos/coleifer/peewee/issues/64/events | https://github.com/coleifer/peewee/pull/64 | 3,745,004 | MDExOlB1bGxSZXF1ZXN0MTAyMDkzNQ== | 64 | Whitespace, hee-YAH! | {
"login": "medwards",
"id": 7339,
"node_id": "MDQ6VXNlcjczMzk=",
"avatar_url": "https://avatars.githubusercontent.com/u/7339?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/medwards",
"html_url": "https://github.com/medwards",
"followers_url": "https://api.github.com/users/medwards/follow... | [] | closed | false | null | [] | null | [] | 2012-03-21T12:57:17 | 2014-06-17T14:00:58 | 2012-03-21T12:59:16 | CONTRIBUTOR | null | I am such a bore, I know.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/64/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/64/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/64",
"html_url": "https://github.com/coleifer/peewee/pull/64",
"diff_url": "https://github.com/coleifer/peewee/pull/64.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/64.patch",
"merged_at": "2012-03-21T12:59:15"
} |
https://api.github.com/repos/coleifer/peewee/issues/63 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/63/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/63/comments | https://api.github.com/repos/coleifer/peewee/issues/63/events | https://github.com/coleifer/peewee/issues/63 | 3,629,824 | MDU6SXNzdWUzNjI5ODI0 | 63 | Raw Expression select with value | {
"login": "ManinTheVan",
"id": 1532983,
"node_id": "MDQ6VXNlcjE1MzI5ODM=",
"avatar_url": "https://avatars.githubusercontent.com/u/1532983?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ManinTheVan",
"html_url": "https://github.com/ManinTheVan",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"Yeah, only works like this in where clauses right now. Will look into it\n",
"I'm actually not sure whether this is a valid use-case -- in your example you are querying for the first letter of a constant (\"myFirstName\") -- what is the benefit of doing that?\n\nI'm assuming the query you're hoping to generate ... | 2012-03-13T14:16:18 | 2012-03-20T16:29:52 | 2012-03-20T16:29:52 | NONE | null | Hello Charles,
want to use 'select' in the following way.
<< User.select(['id', 'username', R('LOWER(SUBSTR( %s, 1, 1))', 'myFirstName' , 'first_letter')]) >>
but there is no implementation using values and alias together ?
Have you any idea how to fix it?
Kind regards,
Chris
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/63/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/63/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/62 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/62/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/62/comments | https://api.github.com/repos/coleifer/peewee/issues/62/events | https://github.com/coleifer/peewee/pull/62 | 3,600,304 | MDExOlB1bGxSZXF1ZXN0OTYzNDE1 | 62 | fix typo in samples | {
"login": "kryskool",
"id": 337842,
"node_id": "MDQ6VXNlcjMzNzg0Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/337842?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kryskool",
"html_url": "https://github.com/kryskool",
"followers_url": "https://api.github.com/users/kryskoo... | [] | closed | false | null | [] | null | [] | 2012-03-11T10:24:31 | 2014-07-06T01:52:07 | 2012-03-12T20:19:15 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/62/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/62/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/62",
"html_url": "https://github.com/coleifer/peewee/pull/62",
"diff_url": "https://github.com/coleifer/peewee/pull/62.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/62.patch",
"merged_at": "2012-03-12T20:19:15"
} | |
https://api.github.com/repos/coleifer/peewee/issues/61 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/61/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/61/comments | https://api.github.com/repos/coleifer/peewee/issues/61/events | https://github.com/coleifer/peewee/issues/61 | 3,600,090 | MDU6SXNzdWUzNjAwMDkw | 61 | Strange models behavior | {
"login": "gnezim",
"id": 617210,
"node_id": "MDQ6VXNlcjYxNzIxMA==",
"avatar_url": "https://avatars.githubusercontent.com/u/617210?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gnezim",
"html_url": "https://github.com/gnezim",
"followers_url": "https://api.github.com/users/gnezim/follow... | [] | closed | false | null | [] | null | [
"Glad you like the library! Here's what I'd suggest you try -- you can pass 2-tuples into select clauses to specify aliases:\n\n``` python\n\nCC_map.select({\n CC_map: [('id', 'cc_map_id'), 'currency_id'],\n Currencies: ['currency_abbr'],\n}).order_by('country_id').where(country_id=country_id).join(Currencie... | 2012-03-11T09:10:48 | 2012-03-21T09:55:08 | 2012-03-17T14:53:16 | NONE | null | Problems started after Commit: 62bd00b90686aea6d6440ff129c30cf28a2a9449
Whole speak is about MySQL as backend
inside one of models I have method:
<code>
def getAbbrByCountryId(self, country_id):
return CC_map.select(
{CC_map: ['id AS cc_map_id, currency_id'],
Currencies: ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/61/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/61/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/60 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/60/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/60/comments | https://api.github.com/repos/coleifer/peewee/issues/60/events | https://github.com/coleifer/peewee/issues/60 | 3,524,522 | MDU6SXNzdWUzNTI0NTIy | 60 | DecimalField ignores precision | {
"login": "emestee",
"id": 1101501,
"node_id": "MDQ6VXNlcjExMDE1MDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1101501?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/emestee",
"html_url": "https://github.com/emestee",
"followers_url": "https://api.github.com/users/emestee/... | [] | closed | false | null | [] | null | [
"You need to set the arguments using keywords max_digits and decimal_places:\n\n```\nclass Foo(Model):\n foo_field = DecimalField(decimal_places=2)\n```\n\n```\n+-------+---------------+------+-----+---------+----------------+\n| Field | Type | Null | Key | Default | Extra |\n+-------+---------... | 2012-03-06T14:02:22 | 2012-03-08T08:58:01 | 2012-03-07T21:23:35 | NONE | null | At least under MySQL, DecimalField ignores the precision parameters passed to the constructor, and the created table always carries the decimal field with precision 10,5.
Example code:
``` python
class Foo(peewee.Model):
foo_field = DecimalField(15,2)
Foo.create_table()
```
Produces a table with foo_field type... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/60/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/60/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/59 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/59/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/59/comments | https://api.github.com/repos/coleifer/peewee/issues/59/events | https://github.com/coleifer/peewee/issues/59 | 3,388,876 | MDU6SXNzdWUzMzg4ODc2 | 59 | In memory SQLite support? | {
"login": "stodge",
"id": 95512,
"node_id": "MDQ6VXNlcjk1NTEy",
"avatar_url": "https://avatars.githubusercontent.com/u/95512?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/stodge",
"html_url": "https://github.com/stodge",
"followers_url": "https://api.github.com/users/stodge/followers",
... | [] | closed | false | null | [] | null | [
"My apologies - I got it working. :)\n",
"Yeah just set the database name to \":memory:\"\nOn Feb 25, 2012 8:57 PM, \"Mike Stoddart\" <\nreply@reply.github.com>\nwrote:\n\n> I may have missed this in the docs, but does Peewee support in memory\n> SQLite databases? Thanks\n> \n> ---\n> \n> Reply to this email dire... | 2012-02-26T02:57:01 | 2012-02-26T15:57:55 | 2012-02-26T02:59:37 | NONE | null | I may have missed this in the docs, but does Peewee support in memory SQLite databases? Thanks
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/59/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/59/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/58 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/58/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/58/comments | https://api.github.com/repos/coleifer/peewee/issues/58/events | https://github.com/coleifer/peewee/pull/58 | 3,320,684 | MDExOlB1bGxSZXF1ZXN0ODYyODIx | 58 | Allow foreign key select fields to be set in Meta config | {
"login": "prggmr",
"id": 207314,
"node_id": "MDQ6VXNlcjIwNzMxNA==",
"avatar_url": "https://avatars.githubusercontent.com/u/207314?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/prggmr",
"html_url": "https://github.com/prggmr",
"followers_url": "https://api.github.com/users/prggmr/follow... | [] | closed | false | null | [] | null | [
"See commit 7b76eca5b14211d70aa8231b2c1b65cb6a6e5b36 not sure how that other one got so messed up ... \n",
"I will pass on merging this. Traversing the FK lookup is a convenient shorthand, and not really painful if doing in small amounts. If you're following this relationship in a loop, though, then you are cos... | 2012-02-21T20:44:22 | 2014-07-06T01:52:09 | 2012-02-22T15:31:09 | NONE | null | Basically as it says,
I ran into the problem that unnecessary data tied to a model was being returned during the FK selection and since most of my FK lookups are parsed and directly outputted to an API performing an inline filter for these unwanted fields on a case by case basis would be cumbersome and error prone.
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/58/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/58/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/58",
"html_url": "https://github.com/coleifer/peewee/pull/58",
"diff_url": "https://github.com/coleifer/peewee/pull/58.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/58.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/57 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/57/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/57/comments | https://api.github.com/repos/coleifer/peewee/issues/57/events | https://github.com/coleifer/peewee/issues/57 | 3,288,795 | MDU6SXNzdWUzMjg4Nzk1 | 57 | Define database name at runtime? | {
"login": "stodge",
"id": 95512,
"node_id": "MDQ6VXNlcjk1NTEy",
"avatar_url": "https://avatars.githubusercontent.com/u/95512?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/stodge",
"html_url": "https://github.com/stodge",
"followers_url": "https://api.github.com/users/stodge/followers",
... | [] | closed | false | null | [] | null | [
"the database name isn't needed until a connection is opened, so you _could_ manually set the name at runtime before a query gets executed or a connection opened. what is your use-case? its kind of tricky considering that your model definitions are already written, unless you are creating those dynamically as wel... | 2012-02-20T01:45:14 | 2012-02-26T01:05:18 | 2012-02-26T01:05:18 | NONE | null | I don't know the name of my database until runtime. Is there any way to support this?
Thanks
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/57/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/57/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/56 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/56/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/56/comments | https://api.github.com/repos/coleifer/peewee/issues/56/events | https://github.com/coleifer/peewee/issues/56 | 3,284,733 | MDU6SXNzdWUzMjg0NzMz | 56 | Change the lib name, I think this one is already taken | {
"login": "ksamuel",
"id": 221886,
"node_id": "MDQ6VXNlcjIyMTg4Ng==",
"avatar_url": "https://avatars.githubusercontent.com/u/221886?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ksamuel",
"html_url": "https://github.com/ksamuel",
"followers_url": "https://api.github.com/users/ksamuel/fo... | [] | closed | false | null | [] | null | [
"+1\n",
"http://www.youtube.com/watch?v=FsJhfwbfMvU\n"
] | 2012-02-19T13:41:00 | 2012-02-20T22:05:20 | 2012-02-20T22:05:20 | NONE | null | http://imgur.com/r/WTF/xmydq
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/56/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/56/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/55 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/55/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/55/comments | https://api.github.com/repos/coleifer/peewee/issues/55/events | https://github.com/coleifer/peewee/issues/55 | 3,252,371 | MDU6SXNzdWUzMjUyMzcx | 55 | Invalid method signature | {
"login": "teserak",
"id": 447351,
"node_id": "MDQ6VXNlcjQ0NzM1MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/447351?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/teserak",
"html_url": "https://github.com/teserak",
"followers_url": "https://api.github.com/users/teserak/fo... | [] | closed | false | null | [] | null | [] | 2012-02-16T14:53:03 | 2012-02-16T14:54:45 | 2012-02-16T14:54:45 | NONE | null | Invalid method signature in Database class:
Is:
```
def sequence_exists(self):
raise NotImplementedError
```
Should be:
```
def sequence_exists(self, sequence_name):
raise NotImplementedError
```
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/55/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/55/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/54 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/54/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/54/comments | https://api.github.com/repos/coleifer/peewee/issues/54/events | https://github.com/coleifer/peewee/issues/54 | 3,229,256 | MDU6SXNzdWUzMjI5MjU2 | 54 | sql meta information generates wrong column info in some cases | {
"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 | [] | 2012-02-15T01:56:16 | 2012-02-15T02:01:03 | 2012-02-15T02:01:03 | OWNER | null | ```
In [6]: sq.sql_meta()
Out[6]:
('SELECT t2."feature", SUM(t1."count") AS count FROM "featurecount" AS t1 INNER JOIN "feature" AS t2 ON t1."feature_id" = t2."id" GROUP BY t2."feature"',
[],
{'columns': [(models.FeatureCount, ('SUM', 'count', 'count')),
(models.Feature, 'feature')],
'graph': {models.FeatureCo... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/54/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/54/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/53 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/53/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/53/comments | https://api.github.com/repos/coleifer/peewee/issues/53/events | https://github.com/coleifer/peewee/issues/53 | 3,142,624 | MDU6SXNzdWUzMTQyNjI0 | 53 | Duplicated key | {
"login": "wtld",
"id": 1318746,
"node_id": "MDQ6VXNlcjEzMTg3NDY=",
"avatar_url": "https://avatars.githubusercontent.com/u/1318746?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/wtld",
"html_url": "https://github.com/wtld",
"followers_url": "https://api.github.com/users/wtld/followers",
... | [] | closed | false | null | [] | null | [
"Would you mind sharing your model definiton?\n",
"``` python\nclass BaseModel(peewee.Model):\n\n class Meta:\n database = database\n\nclass Test(BaseModel):\n name = peewee.CharField()\n\nTest.create_table()\n```\n"
] | 2012-02-08T16:00:37 | 2012-02-13T15:47:49 | 2012-02-13T15:47:48 | NONE | null | Table created in MySQL by create_table method:
``` sql
CREATE TABLE `test` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `test_id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
```
Key on 'id' column is duplicated (PRIMARY KEY and UNIQUE KEY).
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/53/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/53/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/52 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/52/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/52/comments | https://api.github.com/repos/coleifer/peewee/issues/52/events | https://github.com/coleifer/peewee/issues/52 | 3,088,968 | MDU6SXNzdWUzMDg4OTY4 | 52 | Cache? | {
"login": "23doors",
"id": 1051101,
"node_id": "MDQ6VXNlcjEwNTExMDE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1051101?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/23doors",
"html_url": "https://github.com/23doors",
"followers_url": "https://api.github.com/users/23doors/... | [] | closed | false | null | [] | null | [
"If you iterate over a QueryResultWrapper, the object that wraps a db cursor when doing a select queyr, results will be cached in memory (if iterating over a large data set you can use the queryresultwrapper.iterator() which doesn't cache things).\n\nBeyond that there is no caching, nor do i think there should be. ... | 2012-02-03T21:19:00 | 2012-02-06T18:06:28 | 2012-02-06T18:06:28 | NONE | null | Is peewee caching any results?
I would love to see caching mechanisms here like in https://bitbucket.org/jmoiron/johnny-cache.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/52/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/52/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/51 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/51/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/51/comments | https://api.github.com/repos/coleifer/peewee/issues/51/events | https://github.com/coleifer/peewee/issues/51 | 3,037,596 | MDU6SXNzdWUzMDM3NTk2 | 51 | Select for update | {
"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 | [] | 2012-01-31T15:48:31 | 2012-01-31T17:25:53 | 2012-01-31T17:25:53 | OWNER | null | FROM @23doors:
There doesn't seem to be any kind of for update functionality? This is really very important for simple row-lock operations.
What I mean is a functionality like this one:
http://docs.sqlalchemy.org/en/latest/core/expression_api.html#sqlalchemy.sql.expression.select
(for_update parameter)
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/51/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/51/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/50 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/50/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/50/comments | https://api.github.com/repos/coleifer/peewee/issues/50/events | https://github.com/coleifer/peewee/issues/50 | 3,021,994 | MDU6SXNzdWUzMDIxOTk0 | 50 | Pony request, support for something akin to django orm's .extra() | {
"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... | [
{
"id": 191751,
"node_id": "MDU6TGFiZWwxOTE3NTE=",
"url": "https://api.github.com/repos/coleifer/peewee/labels/Feature",
"name": "Feature",
"color": "02e10c",
"default": false,
"description": null
}
] | closed | false | null | [] | null | [
"Woohoo!! Added!\n\nhttp://charlesleifer.com/docs/peewee/peewee/querying.html#sql-functions-raw-expressions-and-the-r-object\n"
] | 2012-01-30T15:36:19 | 2012-01-31T06:34:25 | 2012-01-31T06:34:25 | OWNER | null | Currently you are limited, more or less, to expressing select queries using the available abstractions - simple field queries, queries against column data (F objects), aggregations (min/max/count/etc), and aliases (foo as bar). To go beyond that requires using the RawQuery, which exposes a stripped down interface. Be... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/50/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/50/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/49 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/49/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/49/comments | https://api.github.com/repos/coleifer/peewee/issues/49/events | https://github.com/coleifer/peewee/pull/49 | 3,020,133 | MDExOlB1bGxSZXF1ZXN0NzU0MTIy | 49 | Show field name in "Cannot assign, invalid type" message | {
"login": "karlb",
"id": 144773,
"node_id": "MDQ6VXNlcjE0NDc3Mw==",
"avatar_url": "https://avatars.githubusercontent.com/u/144773?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/karlb",
"html_url": "https://github.com/karlb",
"followers_url": "https://api.github.com/users/karlb/followers"... | [] | closed | false | null | [] | null | [
"self-trolled 46f073de8f2a9760b30f7581a2c29bf563c8c066\n"
] | 2012-01-30T13:11:29 | 2014-07-06T01:52:11 | 2012-01-30T15:30:07 | NONE | null | I found this useful in two (rather simple) debugging cases.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/49/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/49/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/49",
"html_url": "https://github.com/coleifer/peewee/pull/49",
"diff_url": "https://github.com/coleifer/peewee/pull/49.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/49.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/48 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/48/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/48/comments | https://api.github.com/repos/coleifer/peewee/issues/48/events | https://github.com/coleifer/peewee/issues/48 | 3,010,155 | MDU6SXNzdWUzMDEwMTU1 | 48 | Is table name not allowed numerical value? | {
"login": "ghost",
"id": 10137,
"node_id": "MDQ6VXNlcjEwMTM3",
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ghost",
"html_url": "https://github.com/ghost",
"followers_url": "https://api.github.com/users/ghost/followers",
"f... | [] | closed | false | null | [] | null | [] | 2012-01-29T07:11:37 | 2012-01-30T05:08:47 | 2012-01-30T05:08:47 | NONE | null | Hi.
I use peewee 0.8.0 and MySQL5.5.14,SQLite3.7.5 on MacOSX Lion.
Is table name not allowed like MyTable1 and My1Table?
Numerical value is replaced '_' automatically.
e.g.
MyTable1.create_table() ---> mytable_
My1Table.create_table() ---> my_table
Is this specifications?
Thank you.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/48/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/48/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/47 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/47/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/47/comments | https://api.github.com/repos/coleifer/peewee/issues/47/events | https://github.com/coleifer/peewee/issues/47 | 2,903,884 | MDU6SXNzdWUyOTAzODg0 | 47 | Complex RawQuery? | {
"login": "davidthewatson",
"id": 150892,
"node_id": "MDQ6VXNlcjE1MDg5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/150892?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/davidthewatson",
"html_url": "https://github.com/davidthewatson",
"followers_url": "https://api.github... | [] | closed | false | null | [] | null | [
"Yeah, RawQuery is best for querying against a particualr \"model\" as it willr eturn instances. To execute arbitrary queries you could look in the code and see what's happening, but basically:\n\n`database.execute(\"some sql\", (any, parameters, here))`\n"
] | 2012-01-19T21:33:55 | 2012-01-19T21:42:43 | 2012-01-19T21:42:43 | NONE | null | I'm trying to run a RawQuery that creates a view and involves several tables. Is there a way to do this in peewee? It seemed like RawQuery only accounts for simple cases tied to a single table in the data model. Is there a way to do a raw SQL query independent of the data model?
Thanks!
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/47/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/47/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/46 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/46/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/46/comments | https://api.github.com/repos/coleifer/peewee/issues/46/events | https://github.com/coleifer/peewee/pull/46 | 2,898,225 | MDExOlB1bGxSZXF1ZXN0NzEwMjIx | 46 | Unicode value and lookup tests | {
"login": "jokull",
"id": 701,
"node_id": "MDQ6VXNlcjcwMQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/701?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jokull",
"html_url": "https://github.com/jokull",
"followers_url": "https://api.github.com/users/jokull/followers",
"f... | [] | closed | false | null | [] | null | [
"What's failing with the postgresql tests?\n",
"The return values from psycopg2 are `str` types, non-decoded. Rev 4a2ba5b adds encoding and decoding and the tests pass.\n\nHere's the result before the patch:\n\n# \n\n## FAIL: test_unicode_lookup (tests.UnicodeFieldTests)\n\nTraceback (most recent call last):\n F... | 2012-01-19T15:14:54 | 2014-07-06T01:52:13 | 2012-01-20T18:08:25 | CONTRIBUTOR | null | They pass for SQLite but not for PostgreSQL.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/46/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/46/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/46",
"html_url": "https://github.com/coleifer/peewee/pull/46",
"diff_url": "https://github.com/coleifer/peewee/pull/46.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/46.patch",
"merged_at": "2012-01-20T18:08:25"
} |
https://api.github.com/repos/coleifer/peewee/issues/45 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/45/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/45/comments | https://api.github.com/repos/coleifer/peewee/issues/45/events | https://github.com/coleifer/peewee/pull/45 | 2,883,554 | MDExOlB1bGxSZXF1ZXN0NzA0NzM0 | 45 | CharField to return unicode value | {
"login": "jokull",
"id": 701,
"node_id": "MDQ6VXNlcjcwMQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/701?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jokull",
"html_url": "https://github.com/jokull",
"followers_url": "https://api.github.com/users/jokull/followers",
"f... | [] | closed | false | null | [] | null | [
"Testcases ought to clear that up\n",
"Do you want me to create a UnicodeCharFieldTestCase?\n"
] | 2012-01-18T15:10:59 | 2014-06-12T06:42:43 | 2012-01-19T15:14:07 | CONTRIBUTOR | null | Should CharField be utf-8 decoded? It resolves errors I had with flask-peewee.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/45/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/45/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/45",
"html_url": "https://github.com/coleifer/peewee/pull/45",
"diff_url": "https://github.com/coleifer/peewee/pull/45.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/45.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/44 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/44/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/44/comments | https://api.github.com/repos/coleifer/peewee/issues/44/events | https://github.com/coleifer/peewee/issues/44 | 2,806,299 | MDU6SXNzdWUyODA2Mjk5 | 44 | Foreign keys that do not end with "_id" | {
"login": "karlb",
"id": 144773,
"node_id": "MDQ6VXNlcjE0NDc3Mw==",
"avatar_url": "https://avatars.githubusercontent.com/u/144773?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/karlb",
"html_url": "https://github.com/karlb",
"followers_url": "https://api.github.com/users/karlb/followers"... | [] | closed | false | null | [] | null | [
"Right now the column name is closely tied to the field name -- will see about disentangling this.\n",
"To add some to this,\n\nIf you setup a ForeignKey without a \"_id\" it is created in the table with an \"_id\" appended to the name, e.g. field name blog will have a column name of \"blog_id\" in the table ( at... | 2012-01-11T16:17:13 | 2016-11-14T00:50:03 | 2012-01-29T16:58:25 | NONE | null | There seems to be no way to declare a foreign_key which does not end with "_id", since the expected column name is attribute_name + '_id'. Or did I miss way to declare such a key?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/44/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/44/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/43 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/43/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/43/comments | https://api.github.com/repos/coleifer/peewee/issues/43/events | https://github.com/coleifer/peewee/pull/43 | 2,760,630 | MDExOlB1bGxSZXF1ZXN0NjY0MzQw | 43 | Proposed fix for sqlite syntax error when model field is named group | {
"login": "aflower",
"id": 1042834,
"node_id": "MDQ6VXNlcjEwNDI4MzQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/1042834?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aflower",
"html_url": "https://github.com/aflower",
"followers_url": "https://api.github.com/users/aflower/... | [] | closed | false | null | [] | null | [
"Tracking on #42, closing\n"
] | 2012-01-08T12:11:25 | 2014-06-12T08:14:46 | 2012-01-08T16:33:05 | NONE | null | Just thought Id send this pull request so you dont have to edit it yourself or look up the line/method I was referencing in the issue for the operationalError/syntax error.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/43/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/43/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/43",
"html_url": "https://github.com/coleifer/peewee/pull/43",
"diff_url": "https://github.com/coleifer/peewee/pull/43.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/43.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/42 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/42/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/42/comments | https://api.github.com/repos/coleifer/peewee/issues/42/events | https://github.com/coleifer/peewee/issues/42 | 2,760,605 | MDU6SXNzdWUyNzYwNjA1 | 42 | sqlite syntax error when a field is named group | {
"login": "aflower",
"id": 1042834,
"node_id": "MDQ6VXNlcjEwNDI4MzQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/1042834?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/aflower",
"html_url": "https://github.com/aflower",
"followers_url": "https://api.github.com/users/aflower/... | [] | closed | false | null | [] | null | [
"Thanks for reporting, looking -- the quote thing may not work as I think mysql likes backticks, but this is definitelysomething that needs to be addressed.\n",
"Nice fix!\n",
"peewee now quotes columns and table names as well...closing\n360e55f28a606dfeabc68a5c7dcabb9e109ec0bd\n6b2a8278d9a068b71ae110f37626d053... | 2012-01-08T12:03:10 | 2012-01-08T20:03:10 | 2012-01-08T18:33:03 | NONE | null | The orm generates this sql string
CREATE TABLE thethable (stat INTEGER NOT NULL, group VARCHAR(255) NOT NULL)
for a model that has stat an integerField and group a CharField.
sqlite3 then gives an operationalError: near "group" syntax error
probably since group is a keyword, but if we put quote marks around grou... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/42/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/42/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/41 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/41/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/41/comments | https://api.github.com/repos/coleifer/peewee/issues/41/events | https://github.com/coleifer/peewee/issues/41 | 2,757,520 | MDU6SXNzdWUyNzU3NTIw | 41 | Help with alter table queries | {
"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 | [
"Decided that the range of possible alter table queries really precludes a general purpose solution that wouldn't involve a whole lot of code. Going to leave this up to the end-user to handle if it goes beyond the most basic case (add/drop/rename col).\n"
] | 2012-01-07T19:46:19 | 2012-01-08T03:35:27 | 2012-01-08T03:34:11 | OWNER | null | Although there are no automated 'migrations' in peewee, it would be helpful to give users a way to get column sql and generate alter table queries (or with sqlite, since there's no drop column, maybe the temptable thing).
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/41/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/41/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/40 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/40/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/40/comments | https://api.github.com/repos/coleifer/peewee/issues/40/events | https://github.com/coleifer/peewee/issues/40 | 2,731,310 | MDU6SXNzdWUyNzMxMzEw | 40 | is it possible to get select query columns behavior similar to only or exclude in model converter? | {
"login": "davidthewatson",
"id": 150892,
"node_id": "MDQ6VXNlcjE1MDg5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/150892?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/davidthewatson",
"html_url": "https://github.com/davidthewatson",
"followers_url": "https://api.github... | [] | closed | false | null | [] | null | [
"If you know which columns you are selecting in the first place, then\nyou know which columns you're iterating already! Can you just pass\nthat list into your template alongside any query? If you're looking\nfor where in the datastructures this information resides, you want to\nlook at QueryResultWrapper.query_me... | 2012-01-05T03:12:30 | 2012-01-05T05:49:40 | 2012-01-05T05:49:40 | NONE | null | I have a model where I do something simple:
```
class Whatever(db.Model):
field1 = CharField()
field2 = CharField()
field3 = CharField()
```
but in my view I'd like the query to behave like a SQL select. That is, I only get the columns back that I asked for in the select:
```
whatevers = Whatever.select(... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/40/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/40/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/39 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/39/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/39/comments | https://api.github.com/repos/coleifer/peewee/issues/39/events | https://github.com/coleifer/peewee/pull/39 | 2,699,276 | MDExOlB1bGxSZXF1ZXN0NjQzMzE1 | 39 | Added __isnull column lookup for Django-style NULL and NOT NULL value checking | {
"login": "drewyeaton",
"id": 72983,
"node_id": "MDQ6VXNlcjcyOTgz",
"avatar_url": "https://avatars.githubusercontent.com/u/72983?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/drewyeaton",
"html_url": "https://github.com/drewyeaton",
"followers_url": "https://api.github.com/users/drewyea... | [] | closed | false | null | [] | null | [
"Thanks mane! Looks great\n",
"No problem!\n"
] | 2012-01-02T04:41:41 | 2014-07-06T01:52:21 | 2012-01-02T21:25:20 | CONTRIBUTOR | null | I realize this can be accomplished with a Q object, but it's arguably harder to read queries using them. This also is available in the standard Django API, so it may not hurt to have more feature parity on this level.
Also, added some tests for "__isnull" and for use in conjunction with Q object (no idea why one woul... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/39/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/39/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/39",
"html_url": "https://github.com/coleifer/peewee/pull/39",
"diff_url": "https://github.com/coleifer/peewee/pull/39.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/39.patch",
"merged_at": "2012-01-02T21:25:20"
} |
https://api.github.com/repos/coleifer/peewee/issues/38 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/38/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/38/comments | https://api.github.com/repos/coleifer/peewee/issues/38/events | https://github.com/coleifer/peewee/pull/38 | 2,694,546 | MDExOlB1bGxSZXF1ZXN0NjQyMDgy | 38 | Just a better error message | {
"login": "karlb",
"id": 144773,
"node_id": "MDQ6VXNlcjE0NDc3Mw==",
"avatar_url": "https://avatars.githubusercontent.com/u/144773?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/karlb",
"html_url": "https://github.com/karlb",
"followers_url": "https://api.github.com/users/karlb/followers"... | [] | closed | false | null | [] | null | [] | 2011-12-31T13:41:26 | 2014-07-06T01:52:22 | 2011-12-31T15:11:47 | NONE | null | SelectQuery.get was missing the where-clause in the error message.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/38/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/38/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/38",
"html_url": "https://github.com/coleifer/peewee/pull/38",
"diff_url": "https://github.com/coleifer/peewee/pull/38.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/38.patch",
"merged_at": "2011-12-31T15:11:47"
} |
https://api.github.com/repos/coleifer/peewee/issues/37 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/37/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/37/comments | https://api.github.com/repos/coleifer/peewee/issues/37/events | https://github.com/coleifer/peewee/pull/37 | 2,693,586 | MDExOlB1bGxSZXF1ZXN0NjQxODE0 | 37 | Added __isnull column lookup for Django-style NULL and NOT NULL value | {
"login": "drewyeaton",
"id": 72983,
"node_id": "MDQ6VXNlcjcyOTgz",
"avatar_url": "https://avatars.githubusercontent.com/u/72983?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/drewyeaton",
"html_url": "https://github.com/drewyeaton",
"followers_url": "https://api.github.com/users/drewyea... | [] | closed | false | null | [] | null | [
"Add some tests and I'll be happy to merge.\n"
] | 2011-12-31T05:08:38 | 2014-07-06T01:52:24 | 2012-01-02T04:39:13 | CONTRIBUTOR | null | I realize this can be accomplished with a Q object, but it's arguably harder to read queries using them. This also is available in the standard Django API, so it may not hurt to have more feature parity on this level.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/37/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/37/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/37",
"html_url": "https://github.com/coleifer/peewee/pull/37",
"diff_url": "https://github.com/coleifer/peewee/pull/37.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/37.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/36 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/36/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/36/comments | https://api.github.com/repos/coleifer/peewee/issues/36/events | https://github.com/coleifer/peewee/issues/36 | 2,692,412 | MDU6SXNzdWUyNjkyNDEy | 36 | group_by() broken for queries without aliases | {
"login": "awahlig",
"id": 1263649,
"node_id": "MDQ6VXNlcjEyNjM2NDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/1263649?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/awahlig",
"html_url": "https://github.com/awahlig",
"followers_url": "https://api.github.com/users/awahlig/... | [] | closed | false | null | [] | null | [] | 2011-12-30T23:03:54 | 2011-12-31T15:31:30 | 2011-12-31T15:31:30 | NONE | null | This code:
``` python
from peewee import *
class Message(Model):
author = CharField()
body = TextField()
print Message.select().group_by('author').sql()
```
Throws this exception:
```
Traceback (most recent call last):
File "test.py", line 7, in <module>
print Message.select().group_by('author').sql(... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/36/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/36/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/35 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/35/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/35/comments | https://api.github.com/repos/coleifer/peewee/issues/35/events | https://github.com/coleifer/peewee/issues/35 | 2,687,878 | MDU6SXNzdWUyNjg3ODc4 | 35 | Auto save() dirty objects on commit | {
"login": "coderbuzz",
"id": 1284811,
"node_id": "MDQ6VXNlcjEyODQ4MTE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1284811?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/coderbuzz",
"html_url": "https://github.com/coderbuzz",
"followers_url": "https://api.github.com/users/co... | [] | closed | false | null | [] | null | [
"If you take a look at the testcases it shows how things are saved:\n\nhttps://github.com/coleifer/peewee/blob/master/tests.py#L2702\n\nBasic workflow should be:\n- turn off autocommit\n- modify a bunch of models or whatever\n- call `.save()` on the models you want to save\n- call `.commit()` on the database and al... | 2011-12-30T10:49:18 | 2011-12-30T16:12:14 | 2011-12-30T16:12:14 | NONE | null | Hi, to speed-up my query tasks, by default I have turned-off autocommit to False in db configuration,
means we need to call db.commit() to commit the transaction
Found now behavior doesn't flush (save) dirty objects on commit.
Again, in sql-alchemy we don't need explicit call object.save() as we know there's dirty o... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/35/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/35/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/34 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/34/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/34/comments | https://api.github.com/repos/coleifer/peewee/issues/34/events | https://github.com/coleifer/peewee/issues/34 | 2,671,638 | MDU6SXNzdWUyNjcxNjM4 | 34 | Column default value wont (keep) update | {
"login": "coderbuzz",
"id": 1284811,
"node_id": "MDQ6VXNlcjEyODQ4MTE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1284811?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/coderbuzz",
"html_url": "https://github.com/coderbuzz",
"followers_url": "https://api.github.com/users/co... | [] | closed | false | null | [] | null | [
"Dooh my mistake, should be:\n\n``` python\ntime = DateTimeField(default=datetime.now)\n```\n\nIn previous I pass the now() value, not passing function as arg.\n\nSorry to pollute\n"
] | 2011-12-28T14:42:47 | 2011-12-28T15:24:37 | 2011-12-28T15:24:37 | NONE | null | Hi, I have the following model which have a datetime field with default value=datetime.now()
``` python
from datetime import datetime
class ATable(BaseModel):
time = DateTimeField(default=datetime.now())
customer = CharField()
```
Surprised when I create several records say:
``` python
ATable.create(custome... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/34/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/34/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/33 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/33/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/33/comments | https://api.github.com/repos/coleifer/peewee/issues/33/events | https://github.com/coleifer/peewee/issues/33 | 2,655,647 | MDU6SXNzdWUyNjU1NjQ3 | 33 | Field allow null by default | {
"login": "coderbuzz",
"id": 1284811,
"node_id": "MDQ6VXNlcjEyODQ4MTE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1284811?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/coderbuzz",
"html_url": "https://github.com/coderbuzz",
"followers_url": "https://api.github.com/users/co... | [] | closed | false | null | [] | null | [
"Thanks for the suggestion -- I am going to stick with the current behavior, though.\n"
] | 2011-12-25T18:42:12 | 2011-12-26T01:36:24 | 2011-12-26T01:36:21 | NONE | null | Hi, when initializing (create) record; sometimes; mostly we have to leave other non indexed fields with default value or null for future fill.
May I suggest you to allow null by default, it's rare of important field to be not null
``` python
class Field(object):
def __init__(self, null=True, db_index=False, uniqu... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/33/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/33/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/32 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/32/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/32/comments | https://api.github.com/repos/coleifer/peewee/issues/32/events | https://github.com/coleifer/peewee/issues/32 | 2,655,275 | MDU6SXNzdWUyNjU1Mjc1 | 32 | QueryResultWrapper.first() | {
"login": "coderbuzz",
"id": 1284811,
"node_id": "MDQ6VXNlcjEyODQ4MTE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1284811?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/coderbuzz",
"html_url": "https://github.com/coderbuzz",
"followers_url": "https://api.github.com/users/co... | [] | closed | false | null | [] | null | [
"Good points...I will work on adding this -- the problem w/the implementation you suggest is that a subsequent iteration will start on the 2nd result.\n",
"Thank you! :)\n"
] | 2011-12-25T15:13:08 | 2011-12-30T08:27:48 | 2011-12-28T22:30:54 | NONE | null | get() is not suitable in some cases, for example if we need get first row from complex select-where query, using join, sub-query etc (without exception)
Can you please add a first() or using get() name too method to QueryResultWrapper class?
The method should return None on empty resultset, otherwise return first row
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/32/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/32/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/31 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/31/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/31/comments | https://api.github.com/repos/coleifer/peewee/issues/31/events | https://github.com/coleifer/peewee/issues/31 | 2,655,257 | MDU6SXNzdWUyNjU1MjU3 | 31 | BETWEEN column lookup type | {
"login": "coderbuzz",
"id": 1284811,
"node_id": "MDQ6VXNlcjEyODQ4MTE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1284811?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/coderbuzz",
"html_url": "https://github.com/coderbuzz",
"followers_url": "https://api.github.com/users/co... | [] | closed | false | null | [] | null | [] | 2011-12-25T15:01:09 | 2011-12-26T01:49:41 | 2011-12-26T01:49:41 | NONE | null | Hi can you please add BETWEEN lookup type?
Thanks
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/31/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/31/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/30 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/30/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/30/comments | https://api.github.com/repos/coleifer/peewee/issues/30/events | https://github.com/coleifer/peewee/issues/30 | 2,607,864 | MDU6SXNzdWUyNjA3ODY0 | 30 | reserved word user table on postgresql? | {
"login": "davidthewatson",
"id": 150892,
"node_id": "MDQ6VXNlcjE1MDg5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/150892?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/davidthewatson",
"html_url": "https://github.com/davidthewatson",
"followers_url": "https://api.github... | [] | closed | false | null | [] | null | [
"I'd suggest trying the following:\n\n```\nclass User(db.Model, BaseUser):\n # whatever fields\n\n class Meta:\n db_table = 'users' # <-- set explicitly right here\n```\n",
"Thanks for your response.\n\nThat gets it past the creation stage, but then it dies further down in peewee. It's not clear to m... | 2011-12-20T00:17:02 | 2011-12-20T19:29:08 | 2011-12-20T01:40:57 | NONE | null | I have the following which I copied from some sample code:
```
from flask_peewee.auth import BaseUser
import datetime
from peewee import *
from app import db
class User(db.Model, BaseUser):
username = CharField(unique=True)
password = CharField()
email = CharField()
join_date = DateTimeField(default=d... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/30/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/30/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/29 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/29/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/29/comments | https://api.github.com/repos/coleifer/peewee/issues/29/events | https://github.com/coleifer/peewee/issues/29 | 2,600,213 | MDU6SXNzdWUyNjAwMjEz | 29 | Feature, blob field. | {
"login": "jander",
"id": 237061,
"node_id": "MDQ6VXNlcjIzNzA2MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/237061?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jander",
"html_url": "https://github.com/jander",
"followers_url": "https://api.github.com/users/jander/follow... | [] | closed | false | null | [] | null | [
"I haven't done a _ton_ of research on this issue, but it should be possible to add a custom field class with the proper column type. I've added 'blob' as a column type so you can specify `db_field = 'blob'` and it will create the right column. Looks like with sqlite3 and psycopg2 at least you'll need to wrap the... | 2011-12-19T13:49:31 | 2014-09-02T07:32:41 | 2011-12-19T19:31:56 | NONE | null | i want to save image in database by peewee.
but peewee has not BlobField yet.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/29/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/29/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/28 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/28/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/28/comments | https://api.github.com/repos/coleifer/peewee/issues/28/events | https://github.com/coleifer/peewee/issues/28 | 2,600,178 | MDU6SXNzdWUyNjAwMTc4 | 28 | UpdateQuery need more? | {
"login": "jander",
"id": 237061,
"node_id": "MDQ6VXNlcjIzNzA2MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/237061?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jander",
"html_url": "https://github.com/jander",
"followers_url": "https://api.github.com/users/jander/follow... | [] | closed | false | null | [] | null | [
"Yes, totally agree this would be good. Thinking about an implementation.\n"
] | 2011-12-19T13:45:31 | 2011-12-20T21:08:49 | 2011-12-20T21:08:49 | NONE | null | A simple example:
Model class
``` python
class Entity(Model):
num = IntegerField(default=0)
```
peewee seems no way for sql:
```
update Entity set num=num+1 where num>?
```
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/28/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/28/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/27 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/27/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/27/comments | https://api.github.com/repos/coleifer/peewee/issues/27/events | https://github.com/coleifer/peewee/issues/27 | 2,575,353 | MDU6SXNzdWUyNTc1MzUz | 27 | SelectQuery.count() problem | {
"login": "awahlig",
"id": 1263649,
"node_id": "MDQ6VXNlcjEyNjM2NDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/1263649?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/awahlig",
"html_url": "https://github.com/awahlig",
"followers_url": "https://api.github.com/users/awahlig/... | [] | closed | false | null | [] | null | [
"Hmm... are you using the latest version of peewee? I believe the ordering thing was fixed in ca8945a7 . I'll add your logic to handle 0 correctly: 36d5314c0f1c6b5cd01d5b15420d27f21be099e2\n\nThe try/finally isn't needed since the fix in the first commit referenced does a clone()\n",
"You're right. I was using ... | 2011-12-16T01:39:51 | 2011-12-22T23:53:09 | 2011-12-19T21:35:29 | NONE | null | I was doing a query using annotate() (with the default Count aggregation) to order by the count of related models.
The query itself worked well but calling query.count() failed with:
```
OperationalError: no such column: count
```
Further investigation revealed that SelectQuery.count() replaces the query with bare C... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/27/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/27/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/26 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/26/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/26/comments | https://api.github.com/repos/coleifer/peewee/issues/26/events | https://github.com/coleifer/peewee/issues/26 | 2,560,012 | MDU6SXNzdWUyNTYwMDEy | 26 | Behaviour of __in against foreign keys doesn't behave quite like one might expect | {
"login": "chadcatlett",
"id": 108175,
"node_id": "MDQ6VXNlcjEwODE3NQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/108175?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/chadcatlett",
"html_url": "https://github.com/chadcatlett",
"followers_url": "https://api.github.com/user... | [] | closed | false | null | [] | null | [
"I think there are some problems with your examples -- in the first you're doing an __in on a single model instance -- modb.modela is a single model a associated with the given modb. YOu could rewrite as:\n\n```\nmoda = modb.modela\n```\n\nIn the second, you want modela records with that aren't related to some giv... | 2011-12-14T22:25:34 | 2011-12-16T19:27:58 | 2011-12-16T19:27:58 | NONE | null | Given the following models:
``` python
class ModelA(model):
blah = CharField()
class ModelB(model):
modela = ForeignKeyField(ModelA)
blah = CharField()
```
Doing a query like this, gives results not quite expected:
``` python
modb = ModelB.get(id=1)
modas = ModelA.select().where(id__in=modb.modela)
``... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/26/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/26/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/25 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/25/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/25/comments | https://api.github.com/repos/coleifer/peewee/issues/25/events | https://github.com/coleifer/peewee/issues/25 | 2,555,734 | MDU6SXNzdWUyNTU1NzM0 | 25 | Support for pysqlite | {
"login": "awahlig",
"id": 1263649,
"node_id": "MDQ6VXNlcjEyNjM2NDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/1263649?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/awahlig",
"html_url": "https://github.com/awahlig",
"followers_url": "https://api.github.com/users/awahlig/... | [] | closed | false | null | [] | null | [
"sqlite3 was added in 2.5 and since peewee is 2.5+ compatible, there's really no need. If someone should want to use the alternate driver they can simply subclass the SqliteAdapter/Database and override as needed. Thanks for bringing this up, though!\n"
] | 2011-12-14T18:09:07 | 2011-12-14T18:18:54 | 2011-12-14T18:18:54 | NONE | null | To my knowledge, the sqlite3 module from the stdlib has the same API as the external pysqlite:
http://code.google.com/p/pysqlite
In case the sqlite3 module is absent, peewee could try to use pysqlite instead:
``` python
try:
import sqlite3
except ImportError:
try:
from pysqlite2 import dbapi2 as sqlit... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/25/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/25/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/24 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/24/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/24/comments | https://api.github.com/repos/coleifer/peewee/issues/24/events | https://github.com/coleifer/peewee/issues/24 | 2,547,284 | MDU6SXNzdWUyNTQ3Mjg0 | 24 | CASCADE for mysql5.5 not work. | {
"login": "jander",
"id": 237061,
"node_id": "MDQ6VXNlcjIzNzA2MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/237061?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jander",
"html_url": "https://github.com/jander",
"followers_url": "https://api.github.com/users/jander/follow... | [] | closed | false | null | [] | null | [
"Yeah, you're totally right -- looks like the syntax for creating a foreign key in mysql is a bit different. Django has a handy way of generating SQL so I created a simple model with a foreign key and generated some output for the 3 backends supported by peewee... the MySQL backend has an additional step:\n\nMySQL... | 2011-12-14T03:23:51 | 2011-12-14T18:02:09 | 2011-12-14T18:02:09 | NONE | null | in my model, cascade for mysql not work, peewee generate create table sql:
```
('CREATE TABLE space (id integer AUTO_INCREMENT NOT NULL PRIMARY KEY, name VARCHAR(255));', None)
('CREATE UNIQUE INDEX space_id ON space(id);', None)
('CREATE TABLE page (id integer AUTO_INCREMENT NOT NULL PRIMARY KEY, space_id INTEGER RE... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/24/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/24/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/23 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/23/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/23/comments | https://api.github.com/repos/coleifer/peewee/issues/23/events | https://github.com/coleifer/peewee/pull/23 | 2,543,770 | MDExOlB1bGxSZXF1ZXN0NTkwNDEz | 23 | Small fixes and simplification | {
"login": "lukaszb",
"id": 190381,
"node_id": "MDQ6VXNlcjE5MDM4MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/190381?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lukaszb",
"html_url": "https://github.com/lukaszb",
"followers_url": "https://api.github.com/users/lukaszb/fo... | [] | closed | false | null | [] | null | [
"Cool, will take a look\n",
"The two test failures are relted to non-deterministic ordering.. I need to work up a real fix for those.\n\nI cherry-picked 9c12013f48d447584584781114f59a8fc7ca126f however, which was your fixes to the test runner. Thanks a ton!\n"
] | 2011-12-13T21:35:55 | 2014-07-06T01:52:25 | 2011-12-14T18:27:42 | NONE | null | I've removed some not used imports, changed test runner a little bit (so it can actually run single test, i.e.:
```
./runtest.py QueryTests.test_count
```
Fixed 2 (out of 3) failing tests. Last one (_QueryTests.test_count_) ... well, tried to debug it but the problem seem to be somewhere during iteration of _SelectQu... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/23/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/23/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/23",
"html_url": "https://github.com/coleifer/peewee/pull/23",
"diff_url": "https://github.com/coleifer/peewee/pull/23.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/23.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/22 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/22/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/22/comments | https://api.github.com/repos/coleifer/peewee/issues/22/events | https://github.com/coleifer/peewee/pull/22 | 2,515,852 | MDExOlB1bGxSZXF1ZXN0NTgxMzk0 | 22 | Features/allow custom commit settings | {
"login": "deytao",
"id": 492203,
"node_id": "MDQ6VXNlcjQ5MjIwMw==",
"avatar_url": "https://avatars.githubusercontent.com/u/492203?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/deytao",
"html_url": "https://github.com/deytao",
"followers_url": "https://api.github.com/users/deytao/follow... | [] | closed | false | null | [] | null | [
"Thanks for bringing up this issue -- I've added per-connection methods to toggle autocommit, letting you run multiple queries in a single transaction. The changeset is here b46ede9548a80ce2a9f135404f39cd363b6ba03d\n\nYou can check the API in the test cases above, but looks like:\n\n```\nmy_database.set_autocommit... | 2011-12-11T13:17:55 | 2014-07-06T01:52:29 | 2011-12-12T16:08:56 | NONE | null | Hi!
I was a lil bit confused that all my insert and update was commit immediately.
Sometime I need to insert several records at once, I saw a rollback method but it was never used.
I decided to add a commit arg in the save method.
It was the simplest and fastest way to fix my problem.
Maybe I missed something.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/22/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/22/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/22",
"html_url": "https://github.com/coleifer/peewee/pull/22",
"diff_url": "https://github.com/coleifer/peewee/pull/22.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/22.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/21 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/21/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/21/comments | https://api.github.com/repos/coleifer/peewee/issues/21/events | https://github.com/coleifer/peewee/pull/21 | 2,438,373 | MDExOlB1bGxSZXF1ZXN0NTU1MjM4 | 21 | Allow custom sequence name | {
"login": "deytao",
"id": 492203,
"node_id": "MDQ6VXNlcjQ5MjIwMw==",
"avatar_url": "https://avatars.githubusercontent.com/u/492203?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/deytao",
"html_url": "https://github.com/deytao",
"followers_url": "https://api.github.com/users/deytao/follow... | [] | closed | false | null | [] | null | [
"Cool, at first glance it looks good. We'll need to ensure that if a pk_sequence is specified that the column is created with that sequence as well. Lastly, do you think this is something that should be inheritable from model to model? i.e., the database Meta attribute is inheritable, but the db_table is not.\n"... | 2011-12-03T18:02:07 | 2014-07-06T01:52:30 | 2011-12-03T21:55:46 | NONE | null | - Use Meta class to set it like
``` python
class Meta:
pk_sequence = 'sequence_name'
```
Helpful when using a global sequence.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/21/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/21/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/21",
"html_url": "https://github.com/coleifer/peewee/pull/21",
"diff_url": "https://github.com/coleifer/peewee/pull/21.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/21.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/20 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/20/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/20/comments | https://api.github.com/repos/coleifer/peewee/issues/20/events | https://github.com/coleifer/peewee/issues/20 | 2,363,211 | MDU6SXNzdWUyMzYzMjEx | 20 | Selecting databases in Meta is very non-flexible | {
"login": "jamorton",
"id": 18852,
"node_id": "MDQ6VXNlcjE4ODUy",
"avatar_url": "https://avatars.githubusercontent.com/u/18852?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jamorton",
"html_url": "https://github.com/jamorton",
"followers_url": "https://api.github.com/users/jamorton/foll... | [
{
"id": 191752,
"node_id": "MDU6TGFiZWwxOTE3NTI=",
"url": "https://api.github.com/repos/coleifer/peewee/labels/Design%20decision",
"name": "Design decision",
"color": "02d7e1",
"default": false,
"description": null
}
] | closed | false | null | [] | null | [
"Thanks for bringing this up - the need to have a database instance at model definition time is ... well, it is what it is. You brought up django -- django declares the database(s) in a global (and much maligned) settings object. One of the decisions I made with peewee was to make it _not_ need global database co... | 2011-11-28T01:33:08 | 2011-11-28T21:43:21 | 2011-11-28T21:43:21 | NONE | null | I don't know Django very well, but as far as I could tell, Django doesn't use the Meta class in models to select the database to use, and probably for a good reason?
I really like peewee, but I had to restructure some of my base application flow because all Peewee model classes have to have the database instance avail... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/20/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/20/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/19 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/19/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/19/comments | https://api.github.com/repos/coleifer/peewee/issues/19/events | https://github.com/coleifer/peewee/issues/19 | 2,351,933 | MDU6SXNzdWUyMzUxOTMz | 19 | Investigate selecting related fields | {
"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... | [
{
"id": 191751,
"node_id": "MDU6TGFiZWwxOTE3NTE=",
"url": "https://api.github.com/repos/coleifer/peewee/labels/Feature",
"name": "Feature",
"color": "02e10c",
"default": false,
"description": null
}
] | closed | false | null | [] | null | [
"That looks wonderful.\n",
"I added support for this in 62bd00b90686aea6d6440ff129c30cf28a2a9449 -- basically, it takes what you pass in to the select() method, queries the db, constructs instances (and related instances), then puts them all together. Can reduce your queries from _n_ to 1 when iterating and chec... | 2011-11-25T20:05:33 | 2011-12-27T20:36:04 | 2011-12-27T20:36:04 | OWNER | null | Would be nice to be able to populate (or partially populate) instances of related objects when querying. Example would be querying a list of blog entries and wanting to additionally select the 'name' of the blog -- this can be done in 1 query with a join.
It shouldn't be too hard... related models can be queried pass... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/19/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/19/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/18 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/18/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/18/comments | https://api.github.com/repos/coleifer/peewee/issues/18/events | https://github.com/coleifer/peewee/issues/18 | 2,331,667 | MDU6SXNzdWUyMzMxNjY3 | 18 | [Postgresql] Boolean data type | {
"login": "deytao",
"id": 492203,
"node_id": "MDQ6VXNlcjQ5MjIwMw==",
"avatar_url": "https://avatars.githubusercontent.com/u/492203?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/deytao",
"html_url": "https://github.com/deytao",
"followers_url": "https://api.github.com/users/deytao/follow... | [] | closed | false | null | [] | null | [
"Fixed in 31b213e4db37f39fe3374ad2ea4143350e126242 - tested against postgresql, mysql and sqlite\n"
] | 2011-11-23T16:42:24 | 2011-11-25T05:30:11 | 2011-11-25T05:30:11 | NONE | null | If I create manually my table with a boolean type I can't insert a record using a field like BooleanField because it try to insert an integer.
Postgresql handles correctly bool() and stores a proper boolean field not like MySQL or Oracle which are casting in integer.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/18/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/18/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/17 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/17/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/17/comments | https://api.github.com/repos/coleifer/peewee/issues/17/events | https://github.com/coleifer/peewee/issues/17 | 2,331,618 | MDU6SXNzdWUyMzMxNjE4 | 17 | Add field inheritance | {
"login": "deytao",
"id": 492203,
"node_id": "MDQ6VXNlcjQ5MjIwMw==",
"avatar_url": "https://avatars.githubusercontent.com/u/492203?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/deytao",
"html_url": "https://github.com/deytao",
"followers_url": "https://api.github.com/users/deytao/follow... | [] | closed | false | null | [] | null | [
"Totally -- creating models should be DRY. This should work and currently does not (need to add some logic in the metaclass). I'm not sure what you mean by using a global ID, but multi-table inheritance is not something I plan on implementing. If you're looking for that level of control, definitely would recomme... | 2011-11-23T16:38:56 | 2011-11-25T18:38:22 | 2011-11-25T18:38:22 | NONE | null | Hi,
It would be nice if something like that could work
``` python
import peewee
Class CoreModel(peewee.Model):
id = peewee.PrimaryKeyField()
created = peewee.DatetimeField()
Class Meta:
database = db
Class User(CoreModel):
firstname = peewee.CharField()
Class Car(CoreModel):
br... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/17/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/17/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/16 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/16/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/16/comments | https://api.github.com/repos/coleifer/peewee/issues/16/events | https://github.com/coleifer/peewee/issues/16 | 2,276,345 | MDU6SXNzdWUyMjc2MzQ1 | 16 | Add support for bigint and double fields | {
"login": "marmelo",
"id": 247440,
"node_id": "MDQ6VXNlcjI0NzQ0MA==",
"avatar_url": "https://avatars.githubusercontent.com/u/247440?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/marmelo",
"html_url": "https://github.com/marmelo",
"followers_url": "https://api.github.com/users/marmelo/fo... | [
{
"id": 191751,
"node_id": "MDU6TGFiZWwxOTE3NTE=",
"url": "https://api.github.com/repos/coleifer/peewee/labels/Feature",
"name": "Feature",
"color": "02e10c",
"default": false,
"description": null
}
] | closed | false | null | [] | null | [
"This will become handy. Thanks!\n"
] | 2011-11-18T02:38:13 | 2012-01-21T03:44:28 | 2012-01-17T05:30:56 | NONE | null | Currently you can only define IntegerField, FloatField and DecimalField.
What happens if you need to store a long (bigint)?
You have to use a Decimal without decimal places?
A new **LongField** (or BigIntField) should be added (**bigint, 8 bytes**).
Also, sometimes float is not enough.
For coherence, **DoubleField** ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/16/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/16/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/15 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/15/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/15/comments | https://api.github.com/repos/coleifer/peewee/issues/15/events | https://github.com/coleifer/peewee/issues/15 | 2,276,320 | MDU6SXNzdWUyMjc2MzIw | 15 | FloatField is translated differently between supported implementations | {
"login": "marmelo",
"id": 247440,
"node_id": "MDQ6VXNlcjI0NzQ0MA==",
"avatar_url": "https://avatars.githubusercontent.com/u/247440?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/marmelo",
"html_url": "https://github.com/marmelo",
"followers_url": "https://api.github.com/users/marmelo/fo... | [] | closed | false | null | [] | null | [
"Thanks.\n"
] | 2011-11-18T02:29:38 | 2011-11-21T11:37:17 | 2011-11-18T20:10:54 | NONE | null | Floats, by definition, should only take 4 bytes.
_Currently:_
- SQLite, real, 8 bytes
- MySQL, double precision, 8 bytes
- PostgreSQL, real, 4 bytes
_Proposal:_
- SQLite should continue using real (I believe there is no 4 bytes floating point datatype).
- MySQL should be using float, 4 bytes.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/15/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/15/timeline | null | completed | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.