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/2519
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2519/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2519/comments
https://api.github.com/repos/coleifer/peewee/issues/2519/events
https://github.com/coleifer/peewee/issues/2519
1,113,659,655
I_kwDOAA7yGM5CYRkH
2,519
drop_tables does not delete "schema" tables in MySQL
{ "login": "ascaron37", "id": 8329544, "node_id": "MDQ6VXNlcjgzMjk1NDQ=", "avatar_url": "https://avatars.githubusercontent.com/u/8329544?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ascaron37", "html_url": "https://github.com/ascaron37", "followers_url": "https://api.github.com/users/as...
[]
closed
false
null
[]
null
[ "So the reason the drop doesn't work is because Peewee, when \"safe=True\" (the default), attempts to check if the table exists in the current db. To get this working, you can just specify `safe=False`:\r\n\r\n```python\r\n# This will skip the check that the table exists, and then issue the\r\n# appropriate drop ta...
2022-01-25T09:48:21
2022-01-25T18:14:51
2022-01-25T15:40:33
NONE
null
I have a problem testing my application with MySQL. I have two separate databases on one MySQL server, say DB1 and DB2. I create a DB Object with `db1 = MySQLDatabase('DB1', ...)`. All my models from DB2 have a schema attribute in the inner Meta class: ``` class DBModel(Model): class Meta: database = db...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2519/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2519/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2518
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2518/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2518/comments
https://api.github.com/repos/coleifer/peewee/issues/2518/events
https://github.com/coleifer/peewee/issues/2518
1,111,184,135
I_kwDOAA7yGM5CO1MH
2,518
PooledMySQLDatabase MaxConnectionsExceeded
{ "login": "Ahern542968", "id": 32890883, "node_id": "MDQ6VXNlcjMyODkwODgz", "avatar_url": "https://avatars.githubusercontent.com/u/32890883?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Ahern542968", "html_url": "https://github.com/Ahern542968", "followers_url": "https://api.github.com/...
[]
closed
false
null
[]
null
[ "http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#pool\r\n\r\nYou are not managing your connections.\r\n\r\nCall connect at the beginning of a request/thread, and close() at the end. This ensures that your conns are returned to the pool." ]
2022-01-22T02:08:23
2022-01-22T13:10:42
2022-01-22T13:10:42
NONE
null
I use PooledMySQLDatabase for a pool , when I with atomic for create , but case MaxConnectionsExceeded ``` def logic_create_event_item(operate_dict): user_id = operate_dict["user_id"] content_type = "event" event_id = operate_dict["event_id"] operate_type = "create" user_operate_log = User...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2518/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2518/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2517
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2517/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2517/comments
https://api.github.com/repos/coleifer/peewee/issues/2517/events
https://github.com/coleifer/peewee/issues/2517
1,110,727,085
I_kwDOAA7yGM5CNFmt
2,517
Select with complex where statement don't transform correctly
{ "login": "spacialhufman", "id": 33603355, "node_id": "MDQ6VXNlcjMzNjAzMzU1", "avatar_url": "https://avatars.githubusercontent.com/u/33603355?v=4", "gravatar_id": "", "url": "https://api.github.com/users/spacialhufman", "html_url": "https://github.com/spacialhufman", "followers_url": "https://api.githu...
[]
closed
false
null
[]
null
[ "Peewee will generate that `0 = 1` when you write an expression that evalutes to `WHERE x IN ()` (which is always false):\r\n\r\n```python\r\n.where(Model.field.in_([]))\r\n```\r\n\r\nSo in your example, at least one of your lists is empty, or alternatively your `tickets` iterator is a generator or something and re...
2022-01-21T17:36:05
2022-01-21T17:44:28
2022-01-21T17:44:28
NONE
null
I was building a complex query in my app which is describe below: `query = (self.repository.getSelect(( fieldId, fieldReceivedAt, fieldMac, fieldCode, fieldDomain, fieldStatus )) .where( fieldId.betwe...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2517/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2517/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2516
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2516/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2516/comments
https://api.github.com/repos/coleifer/peewee/issues/2516/events
https://github.com/coleifer/peewee/issues/2516
1,107,573,649
I_kwDOAA7yGM5CBDuR
2,516
generate_models from DatabaseProxy ValueError
{ "login": "LLjiahai", "id": 30220658, "node_id": "MDQ6VXNlcjMwMjIwNjU4", "avatar_url": "https://avatars.githubusercontent.com/u/30220658?v=4", "gravatar_id": "", "url": "https://api.github.com/users/LLjiahai", "html_url": "https://github.com/LLjiahai", "followers_url": "https://api.github.com/users/LLj...
[]
closed
false
null
[]
null
[ "In this case, just instantiate the introspector directly - or pass it the underlying db instance:\r\n\r\n```python\r\n# Option 1:\r\nintrospector = Introspector(MySQLMetadata(database))\r\nintrospector.generate_models()\r\n\r\n# Option 2:\r\nmodels = generate_models(db.obj)\r\n```", "I gave this another look and...
2022-01-19T02:42:34
2022-01-19T23:55:00
2022-01-19T16:22:41
NONE
null
db = DatabaseProxy() db.initialize(RetryMySQLDatabase.get_db_instance(**kw_config)) models = generate_models(db) ValueError: Introspection not supported for <peewee.DatabaseProxy object at 0x000002859D87FE40>
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2516/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2516/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2515
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2515/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2515/comments
https://api.github.com/repos/coleifer/peewee/issues/2515/events
https://github.com/coleifer/peewee/issues/2515
1,106,872,487
I_kwDOAA7yGM5B-Yin
2,515
How to get all data from my Model?
{ "login": "peepo5", "id": 72892531, "node_id": "MDQ6VXNlcjcyODkyNTMx", "avatar_url": "https://avatars.githubusercontent.com/u/72892531?v=4", "gravatar_id": "", "url": "https://api.github.com/users/peepo5", "html_url": "https://github.com/peepo5", "followers_url": "https://api.github.com/users/peepo5/fo...
[]
closed
true
null
[]
null
[ "You need to read the documentation.\r\n\r\nTake 10 or 15 minutes and go through the quick start.\r\n\r\nhttp://docs.peewee-orm.com/en/latest/peewee/quickstart.html#retrieving-data", "So I have to iterate over the select to get any results? Your answer to my question did not help.", "http://docs.peewee-orm.com/...
2022-01-18T12:50:29
2022-01-18T20:08:55
2022-01-18T12:57:12
NONE
off-topic
My class looks like this: ```py class WaitPayment(BaseModel): txn_id = TextField(unique=True, primary_key=True) discord_id = TextField() ms_expires = DecimalField() ``` and I want to recieve all of its records as a dict. However, when I use `WaitPayment.select()` or `WaitPayment.select().dicts()`...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2515/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2515/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2514
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2514/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2514/comments
https://api.github.com/repos/coleifer/peewee/issues/2514/events
https://github.com/coleifer/peewee/issues/2514
1,105,342,191
I_kwDOAA7yGM5B4i7v
2,514
Field argument 'help_text' seem have not realized in MySQL...
{ "login": "xfl12345", "id": 17960863, "node_id": "MDQ6VXNlcjE3OTYwODYz", "avatar_url": "https://avatars.githubusercontent.com/u/17960863?v=4", "gravatar_id": "", "url": "https://api.github.com/users/xfl12345", "html_url": "https://github.com/xfl12345", "followers_url": "https://api.github.com/users/xfl...
[]
closed
false
null
[]
null
[ "The `help_text` and `verbose_name` are used for integrations with flask-peewee (or other user-facing applications) and do not have any impact on the schema." ]
2022-01-17T04:03:44
2022-01-17T14:23:27
2022-01-17T14:23:27
NONE
null
I think the 'help_text' parameter may become the 'comment' value in MySQL. It did not work as i expect. Neigther of 'verbose_name' parameter. I would appreciate if the little feature has been realized. Thanks a lot. (BTW: peewee is so much easier to use than SQLAlchemy!!!Can't help coding with peewee.)
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2514/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2514/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2513
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2513/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2513/comments
https://api.github.com/repos/coleifer/peewee/issues/2513/events
https://github.com/coleifer/peewee/issues/2513
1,101,868,467
I_kwDOAA7yGM5BrS2z
2,513
Unreliable hybrid_fields order in model_to_dict(model, extra_attrs=hybrid_fields) bug?
{ "login": "neutralvibes", "id": 26578830, "node_id": "MDQ6VXNlcjI2NTc4ODMw", "avatar_url": "https://avatars.githubusercontent.com/u/26578830?v=4", "gravatar_id": "", "url": "https://api.github.com/users/neutralvibes", "html_url": "https://github.com/neutralvibes", "followers_url": "https://api.github.c...
[]
closed
false
null
[]
null
[ "~~Despite spending a few hours on it, a slap from myself helped me realise that perhaps OrderedDict isn't being used, despite database fields seemingly reproduced in reliable in order.~~ Nope, dict keys became reliably ordered from python 3.7.", "Dict keys are not sorted -- exactly. This is not an issue in my op...
2022-01-13T14:38:27
2022-01-13T16:26:25
2022-01-13T16:11:07
NONE
null
# Hybrid fields output order from model_to_dict - bug? ## Problem - Python Version: 3.7.6 I have a case where a gui table requires row data in tuple format. This must be ordered correctly in relation to the provided headers. The data is supplied by a model with a couple of hybrid fields. I am finding that ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2513/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2513/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2512
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2512/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2512/comments
https://api.github.com/repos/coleifer/peewee/issues/2512/events
https://github.com/coleifer/peewee/issues/2512
1,097,482,999
I_kwDOAA7yGM5BakL3
2,512
potential raw_unicode_escape error when debugging customized BINARY field
{ "login": "est", "id": 23570, "node_id": "MDQ6VXNlcjIzNTcw", "avatar_url": "https://avatars.githubusercontent.com/u/23570?v=4", "gravatar_id": "", "url": "https://api.github.com/users/est", "html_url": "https://github.com/est", "followers_url": "https://api.github.com/users/est/followers", "following...
[]
closed
false
null
[]
null
[ "Did you not read the [code comment](https://github.com/coleifer/peewee/blob/master/peewee.py#L658-L661)? This is not part of the public API.", "> Did you not read the code comment? This is not part of the public API.\r\n\r\nHi coleifer, I am using `logger.debug(\"sql is %s\", query)` with one of the parameter as...
2022-01-10T05:49:22
2022-01-10T16:27:42
2022-01-10T14:01:50
NONE
null
Hi, I created a BINARY field following the doc https://docs.peewee-orm.com/en/latest/peewee/models.html#creating-a-custom-field When debugging the SQL, peewee will try `utf8` or `raw_unicode_escape` the `bytes()` parameter, at one time my bytes happens to be `b"\x0ee\xd4\xee\xff\xc0\x02r\xc2\\U0'\x00"`, which ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2512/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2512/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2511
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2511/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2511/comments
https://api.github.com/repos/coleifer/peewee/issues/2511/events
https://github.com/coleifer/peewee/issues/2511
1,095,551,899
I_kwDOAA7yGM5BTMub
2,511
Joined and grouped foreign key values are not cached
{ "login": "conqp", "id": 3766192, "node_id": "MDQ6VXNlcjM3NjYxOTI=", "avatar_url": "https://avatars.githubusercontent.com/u/3766192?v=4", "gravatar_id": "", "url": "https://api.github.com/users/conqp", "html_url": "https://github.com/conqp", "followers_url": "https://api.github.com/users/conqp/follower...
[]
closed
false
null
[]
null
[ "Please consult the docs here: http://docs.peewee-orm.com/en/latest/peewee/relationships.html#avoiding-the-n-1-problem\r\n\r\nFurthermore, you cannot go from \"many\" -> \"many\" in a single go without using prefetch. You can join \"upwards\" no problem, e.g., select all Systems and also grab their Deployment:\r\n\...
2022-01-06T17:54:30
2022-01-06T19:10:06
2022-01-06T19:06:58
CONTRIBUTOR
null
I have a case where I want to select a one-to-many relation. According to the [docs](http://docs.peewee-orm.com/en/latest/peewee/querying.html#aggregating-records), this can be done with appropriate selects, joins and group-bys. However, peewee does not cache query, but executes it again, if I access the backref: ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2511/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2511/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2510
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2510/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2510/comments
https://api.github.com/repos/coleifer/peewee/issues/2510/events
https://github.com/coleifer/peewee/issues/2510
1,094,163,850
I_kwDOAA7yGM5BN52K
2,510
table_exists(MyModel) should raise error
{ "login": "jonashaag", "id": 175722, "node_id": "MDQ6VXNlcjE3NTcyMg==", "avatar_url": "https://avatars.githubusercontent.com/u/175722?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jonashaag", "html_url": "https://github.com/jonashaag", "followers_url": "https://api.github.com/users/jona...
[]
closed
false
null
[]
null
[ "Thanks, this method now accepts a model class." ]
2022-01-05T09:45:29
2022-01-05T13:41:17
2022-01-05T13:41:06
CONTRIBUTOR
null
Misuse of `table_exists` API always returns `False`: ```py db.table_exists(MyModel) ``` IMO this should either raise an error, or be identical to ```py db.table_exists(MyModel.table_name) ```
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2510/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2510/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2509
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2509/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2509/comments
https://api.github.com/repos/coleifer/peewee/issues/2509/events
https://github.com/coleifer/peewee/issues/2509
1,092,086,129
I_kwDOAA7yGM5BF-lx
2,509
Add ModelSelect to __all__ for linting
{ "login": "1kastner", "id": 5236165, "node_id": "MDQ6VXNlcjUyMzYxNjU=", "avatar_url": "https://avatars.githubusercontent.com/u/5236165?v=4", "gravatar_id": "", "url": "https://api.github.com/users/1kastner", "html_url": "https://github.com/1kastner", "followers_url": "https://api.github.com/users/1kast...
[]
closed
false
null
[]
null
[ "I'm going to pass - I don't really see a need to export this." ]
2022-01-02T19:35:36
2022-01-04T14:28:11
2022-01-04T14:28:11
NONE
null
First of all thank you very much for creating this project and sharing it under the MIT license! Recently I have started to rely more on type-hinting in my projects to have better tool support and in some cases making my intentions more obvious for the readers of the code. While doing that, I got the warning that Mo...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2509/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2509/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2508
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2508/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2508/comments
https://api.github.com/repos/coleifer/peewee/issues/2508/events
https://github.com/coleifer/peewee/issues/2508
1,091,487,002
I_kwDOAA7yGM5BDsUa
2,508
how to search by pair of columns
{ "login": "sherrrrr", "id": 31510228, "node_id": "MDQ6VXNlcjMxNTEwMjI4", "avatar_url": "https://avatars.githubusercontent.com/u/31510228?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sherrrrr", "html_url": "https://github.com/sherrrrr", "followers_url": "https://api.github.com/users/she...
[]
closed
false
null
[]
null
[ "Here is an example (tested with mariadb 10.6):\r\n\r\n```python\r\nclass Reg(Model):\r\n key = CharField()\r\n value = TextField()\r\n\r\nReg.insert_many([('k%02d' % i, 'v%02d' % i) for i in range(100)]).execute()\r\ncols = Tuple(Reg.key, Reg.value)\r\nvalues = [('k02', 'v02'), ('k04', 'v04'), ('k06', 'v06')...
2021-12-31T09:08:14
2021-12-31T14:29:40
2021-12-31T14:28:25
NONE
null
How can I write something like this using peewee in mysql? ``` SELECT whatever FROM t WHERE (col1, col2) IN ((val1a, val2a), (val1b, val2b), ...) ; ```
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2508/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2508/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2507
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2507/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2507/comments
https://api.github.com/repos/coleifer/peewee/issues/2507/events
https://github.com/coleifer/peewee/issues/2507
1,090,305,263
I_kwDOAA7yGM5A_Lzv
2,507
Does not accept pandas dataframe int/float columns with NA
{ "login": "ashishkumarazuga", "id": 78608338, "node_id": "MDQ6VXNlcjc4NjA4MzM4", "avatar_url": "https://avatars.githubusercontent.com/u/78608338?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ashishkumarazuga", "html_url": "https://github.com/ashishkumarazuga", "followers_url": "https://...
[]
closed
false
null
[]
null
[ "This error is being thrown by your database, via your database driver, and is not raised by Peewee." ]
2021-12-29T06:42:55
2021-12-29T13:49:30
2021-12-29T13:49:30
NONE
null
The pandas dataframe containing columns which are int64 or float64 in nature, containing NA or NaN are not accepted by peewee. And throws a `DataError('integer out of range\n')`, during an insert.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2507/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2507/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2506
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2506/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2506/comments
https://api.github.com/repos/coleifer/peewee/issues/2506/events
https://github.com/coleifer/peewee/issues/2506
1,090,269,083
I_kwDOAA7yGM5A_C-b
2,506
distutils has been deprecated in Python 3.10
{ "login": "tirkarthi", "id": 3972343, "node_id": "MDQ6VXNlcjM5NzIzNDM=", "avatar_url": "https://avatars.githubusercontent.com/u/3972343?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tirkarthi", "html_url": "https://github.com/tirkarthi", "followers_url": "https://api.github.com/users/ti...
[]
closed
false
null
[]
null
[ "Steve Dower @zooba, a Microsoft employee, is railroading through this idiotic pep. From what I can see there are quite a few people who disagree with his decision:\r\n\r\nhttps://discuss.python.org/t/pep-632-deprecate-distutils-module/5134/29\r\n\r\nHe comes off as a smug, smarmy nitwit who cannot appreciate that ...
2021-12-29T04:56:21
2021-12-30T01:02:47
2021-12-29T20:47:49
NONE
null
https://www.python.org/dev/peps/pep-0632/#migration-advice https://github.com/coleifer/peewee/blob/5a55933ed28b261fbe100568125fffe0ba854b99/setup.py#L5-L8
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2506/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2506/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2505
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2505/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2505/comments
https://api.github.com/repos/coleifer/peewee/issues/2505/events
https://github.com/coleifer/peewee/issues/2505
1,083,846,770
I_kwDOAA7yGM5AmjBy
2,505
formatargspec was removed in Python 3.11
{ "login": "tirkarthi", "id": 3972343, "node_id": "MDQ6VXNlcjM5NzIzNDM=", "avatar_url": "https://avatars.githubusercontent.com/u/3972343?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tirkarthi", "html_url": "https://github.com/tirkarthi", "followers_url": "https://api.github.com/users/ti...
[]
closed
false
null
[]
null
[ "That doesn't matter. The stdlib-provided mock is used for any python 3 or newer, and that old version is vendored for Python 2.x users.", "Got it, sorry for the noise." ]
2021-12-18T14:43:19
2021-12-19T01:41:07
2021-12-19T01:01:30
NONE
null
https://github.com/coleifer/peewee/blob/5a55933ed28b261fbe100568125fffe0ba854b99/tests/libs/mock.py#L190 https://docs.python.org/3.11/whatsnew/3.11.html#removed > the formatargspec function, deprecated since Python 3.5; use the inspect.signature() function and Signature object directly.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2505/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2505/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2504
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2504/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2504/comments
https://api.github.com/repos/coleifer/peewee/issues/2504/events
https://github.com/coleifer/peewee/issues/2504
1,083,132,854
I_kwDOAA7yGM5Aj0u2
2,504
PostgresqlExtDatabase. Model with JSONField raise exception on any action with search (get, get_or_create, etc.)
{ "login": "olvinroght", "id": 49984942, "node_id": "MDQ6VXNlcjQ5OTg0OTQy", "avatar_url": "https://avatars.githubusercontent.com/u/49984942?v=4", "gravatar_id": "", "url": "https://api.github.com/users/olvinroght", "html_url": "https://github.com/olvinroght", "followers_url": "https://api.github.com/use...
[]
closed
false
null
[]
null
[ "Refer to the docs: https://www.postgresql.org/docs/current/datatype-json.html\r\n\r\nBut, simply, you cannot compare `json` values. I am not aware of any reason why you would want to use `json` over `jsonb`, so I would suggest that you just use `BinaryJSONField` (which additionally supports indexing).\r\n\r\nIf yo...
2021-12-17T10:50:01
2021-12-17T14:04:18
2021-12-17T14:02:59
NONE
null
```python from playhouse.postgres_ext import PostgresqlExtDatabase, JSONField from peewee import Model, CharField database = PostgresqlExtDatabase("Test", user="user", password="password", host="localhost", port=5432, autorollback=True) class TestJSONModel(Model): name = ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2504/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2504/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2503
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2503/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2503/comments
https://api.github.com/repos/coleifer/peewee/issues/2503/events
https://github.com/coleifer/peewee/issues/2503
1,079,774,294
I_kwDOAA7yGM5AXAxW
2,503
how to convert peewee column field_type to db column_type
{ "login": "LLjiahai", "id": 30220658, "node_id": "MDQ6VXNlcjMwMjIwNjU4", "avatar_url": "https://avatars.githubusercontent.com/u/30220658?v=4", "gravatar_id": "", "url": "https://api.github.com/users/LLjiahai", "html_url": "https://github.com/LLjiahai", "followers_url": "https://api.github.com/users/LLj...
[]
closed
false
null
[]
null
[]
2021-12-14T13:41:15
2021-12-14T14:34:46
2021-12-14T14:34:46
NONE
null
ps: field_a = peewee .CharField(max_length=255) to mysql column_type varchar(255)
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2503/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2503/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2502
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2502/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2502/comments
https://api.github.com/repos/coleifer/peewee/issues/2502/events
https://github.com/coleifer/peewee/issues/2502
1,077,359,121
I_kwDOAA7yGM5ANzIR
2,502
AttributeError: 'Expression' object has no attribute 'execute'
{ "login": "thisnugroho", "id": 49790011, "node_id": "MDQ6VXNlcjQ5NzkwMDEx", "avatar_url": "https://avatars.githubusercontent.com/u/49790011?v=4", "gravatar_id": "", "url": "https://api.github.com/users/thisnugroho", "html_url": "https://github.com/thisnugroho", "followers_url": "https://api.github.com/...
[]
closed
false
null
[]
null
[ "The `get_or_none()`, when used on a select query, does not accept any parameters -- though the error message is unhelpful here.\r\n\r\nIn your code you are:\r\n\r\n1. `SomeModel.select()` which creates a `ModelSelect` query\r\n2. Call the `get_or_none()` method on the `ModelSelect` query\r\n\r\nI think what you in...
2021-12-11T02:11:25
2021-12-11T12:25:38
2021-12-11T12:25:38
NONE
null
It's appear after upgrading from version 3.14.4 to peewee latest version 3.14.8, i decide to upgrade because i want to using `Model.get_or_none()` function, it's not available in previous version. and the error appear i'm trying to running this: ```python SomeModel().select().get_or_none(SomeModel.field== value) `...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2502/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2502/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2501
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2501/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2501/comments
https://api.github.com/repos/coleifer/peewee/issues/2501/events
https://github.com/coleifer/peewee/pull/2501
1,076,661,651
PR_kwDOAA7yGM4vq1ly
2,501
Allow to use peewee.SQL from `from_`
{ "login": "d0d0", "id": 553292, "node_id": "MDQ6VXNlcjU1MzI5Mg==", "avatar_url": "https://avatars.githubusercontent.com/u/553292?v=4", "gravatar_id": "", "url": "https://api.github.com/users/d0d0", "html_url": "https://github.com/d0d0", "followers_url": "https://api.github.com/users/d0d0/followers", ...
[]
closed
false
null
[]
null
[ "I don't really like this solution. The join will not correctly set-up the model graph, so the best solution in my opinion is to write:\r\n\r\n```python\r\nq = User.select(User, Tweet).from_(SQL(f'`users` as `t1` USE INDEX(`user_id`) ')).join(Tweet)\r\nfor x in q.objects():\r\n # assume username is on User table,...
2021-12-10T09:58:34
2021-12-10T17:46:55
2021-12-10T17:46:54
NONE
null
**Problem:** Tried to apply custom SQL to `from_` function from this example https://github.com/coleifer/peewee/issues/1289#issuecomment-307128658 However in my query, I use some joins. Here is example ```python q = User.select(User, Tweet).from_(SQL(f'`users` as `t1` USE INDEX(`user_id`) ')).join(Tweet) for x i...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2501/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2501/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2501", "html_url": "https://github.com/coleifer/peewee/pull/2501", "diff_url": "https://github.com/coleifer/peewee/pull/2501.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2501.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2500
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2500/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2500/comments
https://api.github.com/repos/coleifer/peewee/issues/2500/events
https://github.com/coleifer/peewee/issues/2500
1,074,152,643
I_kwDOAA7yGM5ABkTD
2,500
Query "where not in empty list" does not work as expected
{ "login": "skontar", "id": 10827040, "node_id": "MDQ6VXNlcjEwODI3MDQw", "avatar_url": "https://avatars.githubusercontent.com/u/10827040?v=4", "gravatar_id": "", "url": "https://api.github.com/users/skontar", "html_url": "https://github.com/skontar", "followers_url": "https://api.github.com/users/skonta...
[]
closed
false
null
[]
null
[ "The problem is python operator precedence. The following work as expected:\r\n\r\n```python\r\n\r\nPerson.select().where(Person.name.not_in([]))\r\n\r\nPerson.select().where(~(Person.name << []))\r\n\r\nPerson.select().where(~(Person.name.in_([])))\r\n```", "Thanks for reply. I see now, I got confused by SQL ope...
2021-12-08T08:43:36
2021-12-08T15:59:19
2021-12-08T15:33:57
NONE
null
I was using equivalent of `.where(~Person.name << some_list)` and it behaves unexpectedly when the list is empty. See below example. ```python import peewee from peewee import * db = SqliteDatabase(':memory:') class Person(Model): name = CharField() class Meta: database = db db.cr...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2500/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2500/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2499
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2499/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2499/comments
https://api.github.com/repos/coleifer/peewee/issues/2499/events
https://github.com/coleifer/peewee/pull/2499
1,073,938,441
PR_kwDOAA7yGM4vh8NM
2,499
Add BlackSheep integration
{ "login": "q0w", "id": 43147888, "node_id": "MDQ6VXNlcjQzMTQ3ODg4", "avatar_url": "https://avatars.githubusercontent.com/u/43147888?v=4", "gravatar_id": "", "url": "https://api.github.com/users/q0w", "html_url": "https://github.com/q0w", "followers_url": "https://api.github.com/users/q0w/followers", ...
[]
closed
false
null
[]
null
[ "I really can't keep up with these new async-framework-of-the-day things. Additionally, connection handling doesn't work the way you might expect with async, so this is probably incorrect anyways." ]
2021-12-08T02:20:08
2021-12-09T08:27:38
2021-12-08T23:43:29
NONE
null
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2499/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2499/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2499", "html_url": "https://github.com/coleifer/peewee/pull/2499", "diff_url": "https://github.com/coleifer/peewee/pull/2499.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2499.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2498
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2498/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2498/comments
https://api.github.com/repos/coleifer/peewee/issues/2498/events
https://github.com/coleifer/peewee/issues/2498
1,071,183,911
I_kwDOAA7yGM4_2Pgn
2,498
Peewee 2 does not work with python 3.10
{ "login": "ribx", "id": 4598953, "node_id": "MDQ6VXNlcjQ1OTg5NTM=", "avatar_url": "https://avatars.githubusercontent.com/u/4598953?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ribx", "html_url": "https://github.com/ribx", "followers_url": "https://api.github.com/users/ribx/followers", ...
[]
closed
false
null
[]
null
[ "That version is not receiving patches, unfortunately. Your best bet is to fork it and patch it. You won't lose sync with upstream if you stay on 2.x." ]
2021-12-04T11:06:22
2021-12-04T13:11:43
2021-12-04T13:11:42
NONE
null
The problem is, that the exports of the `collections` modules were moved to `collections.abc`: ``` docker run --rm -ti python:3.10 sh -c 'pip install cython &>/dev/null && pip install peewee==2.10.2' .... Collecting peewee==2.10.2 Downloading peewee-2.10.2.tar.gz (516 kB) |███████████████████████████████...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2498/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2498/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2497
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2497/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2497/comments
https://api.github.com/repos/coleifer/peewee/issues/2497/events
https://github.com/coleifer/peewee/issues/2497
1,070,778,439
I_kwDOAA7yGM4_0shH
2,497
Support for "<@" in PostgreSQL arrays
{ "login": "joaodlf", "id": 3275379, "node_id": "MDQ6VXNlcjMyNzUzNzk=", "avatar_url": "https://avatars.githubusercontent.com/u/3275379?v=4", "gravatar_id": "", "url": "https://api.github.com/users/joaodlf", "html_url": "https://github.com/joaodlf", "followers_url": "https://api.github.com/users/joaodlf/...
[]
closed
false
null
[]
null
[ "Thanks for the suggestion - this is implemented as `contained_by`.", "Thanks for the **incredible** feedback in such a short notice, do you plan on releasing a minor version with this feature any time in the near future?", "Besides this one change, there aren't really any other notable changes yet to justify a...
2021-12-03T16:51:46
2021-12-06T13:57:46
2021-12-03T17:10:59
NONE
null
Peewee currently supports `@>` (`.contains()`) and `&&` (`contains_any()`) - [docs](https://docs.peewee-orm.com/en/latest/peewee/playhouse.html?highlight=array#ArrayField.contains) It would be nice for Peewee to also support `<@`, as expressed in the [PostgreSQL docs](https://www.postgresql.org/docs/current/function...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2497/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2497/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2496
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2496/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2496/comments
https://api.github.com/repos/coleifer/peewee/issues/2496/events
https://github.com/coleifer/peewee/pull/2496
1,070,550,586
PR_kwDOAA7yGM4vW_gK
2,496
Fix link to SQLAlchemy Hybrid Attributes docs
{ "login": "jonathanmach", "id": 12788052, "node_id": "MDQ6VXNlcjEyNzg4MDUy", "avatar_url": "https://avatars.githubusercontent.com/u/12788052?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jonathanmach", "html_url": "https://github.com/jonathanmach", "followers_url": "https://api.github.c...
[]
closed
false
null
[]
null
[]
2021-12-03T12:39:40
2021-12-03T17:35:56
2021-12-03T14:56:05
CONTRIBUTOR
null
Broken link: http://docs.sqlalchemy.org/en/improve_toc/orm/extensions/hybrid.html New link: https://docs.sqlalchemy.org/en/14/orm/extensions/hybrid.html
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2496/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2496/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2496", "html_url": "https://github.com/coleifer/peewee/pull/2496", "diff_url": "https://github.com/coleifer/peewee/pull/2496.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2496.patch", "merged_at": "2021-12-03T14:56:05" }
https://api.github.com/repos/coleifer/peewee/issues/2495
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2495/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2495/comments
https://api.github.com/repos/coleifer/peewee/issues/2495/events
https://github.com/coleifer/peewee/issues/2495
1,069,862,567
I_kwDOAA7yGM4_xM6n
2,495
TypeError: int() argument must be a string, a bytes-like object or a number when importing models
{ "login": "koadjunky", "id": 8714421, "node_id": "MDQ6VXNlcjg3MTQ0MjE=", "avatar_url": "https://avatars.githubusercontent.com/u/8714421?v=4", "gravatar_id": "", "url": "https://api.github.com/users/koadjunky", "html_url": "https://github.com/koadjunky", "followers_url": "https://api.github.com/users/ko...
[]
closed
false
null
[]
null
[ "I'm not going to download or run that code, but you are welcome to paste a short snippet demonstrating the issue - or even just the actual traceback...", "```\r\n(PeeWee-error) maciej@pippin:~/PeeWee-error$ python dsp_be/logic/planet.py \r\nTraceback (most recent call last):\r\n File \"dsp_be/logic/planet.py\",...
2021-12-02T18:33:08
2021-12-02T20:47:19
2021-12-02T20:01:14
NONE
null
Python: 3.8.11 peewee: 3.14.8 I have two files with two models connected with foreign key: factory.py and planet.py. Each file has identical test code (except imports). Calling 'python dsp_be/logic/factory.py' works. Calling 'python dsp_be/logic/planet.py' throws an exception: TypeError: int() argument must be a...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2495/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2495/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2494
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2494/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2494/comments
https://api.github.com/repos/coleifer/peewee/issues/2494/events
https://github.com/coleifer/peewee/issues/2494
1,067,754,583
I_kwDOAA7yGM4_pKRX
2,494
pwiz uses wildcard imports of peewee
{ "login": "tdennisliu", "id": 34557499, "node_id": "MDQ6VXNlcjM0NTU3NDk5", "avatar_url": "https://avatars.githubusercontent.com/u/34557499?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tdennisliu", "html_url": "https://github.com/tdennisliu", "followers_url": "https://api.github.com/use...
[]
closed
false
null
[]
null
[ "This is a convention that is used throughout peewee examples, as well as my own code. Peewee module defines `__all__`, which controls what objects are exported, and I am happy with that. In your own code you are welcome to use whatever style you like, though." ]
2021-11-30T22:57:07
2021-12-01T00:38:23
2021-12-01T00:38:23
NONE
null
Hiya, I've found pwiz very helpful in setting up my scripts, but since it wildcard imports `peewee` into the script. See below from the README: ``` from peewee import * import datetime db = SqliteDatabase('my_database.db') class BaseModel(Model): class Meta: database = db class User(Bas...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2494/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2494/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2493
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2493/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2493/comments
https://api.github.com/repos/coleifer/peewee/issues/2493/events
https://github.com/coleifer/peewee/issues/2493
1,065,846,586
I_kwDOAA7yGM4_h4c6
2,493
fn.Avg() gets coerced into integer
{ "login": "gjask", "id": 3306648, "node_id": "MDQ6VXNlcjMzMDY2NDg=", "avatar_url": "https://avatars.githubusercontent.com/u/3306648?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gjask", "html_url": "https://github.com/gjask", "followers_url": "https://api.github.com/users/gjask/follower...
[]
closed
false
null
[]
null
[ "You want to specify `.coerce(False)`:\r\n\r\n```python\r\n\r\nTestTable.select(\r\n fn.Avg(TestTable.value).coerce(False).alias(\"avg_value\"),\r\n).scalar()\r\n```", "http://docs.peewee-orm.com/en/latest/peewee/api.html#Function.coerce" ]
2021-11-29T10:09:09
2021-11-29T13:51:52
2021-11-29T13:50:55
NONE
null
When using `fn.Avg()` on integer field, result will also gets coerced into integer. To illustrate problem I have created this example. ```python class TestTable(Model): id = AutoField() value = IntegerField() ``` ```sql insert into testtable (value) values (3), (4); select * from testtable; +----...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2493/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2493/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2492
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2492/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2492/comments
https://api.github.com/repos/coleifer/peewee/issues/2492/events
https://github.com/coleifer/peewee/issues/2492
1,064,369,878
I_kwDOAA7yGM4_cP7W
2,492
Bug related to create_table function in your Model
{ "login": "kezzhang", "id": 42364982, "node_id": "MDQ6VXNlcjQyMzY0OTgy", "avatar_url": "https://avatars.githubusercontent.com/u/42364982?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kezzhang", "html_url": "https://github.com/kezzhang", "followers_url": "https://api.github.com/users/kez...
[]
closed
false
null
[]
null
[ "I could swear I ran all the examples and they worked so possibly something has changed. 2.x is unmaintained since Feb 2018 so hard to say." ]
2021-11-26T11:22:24
2021-11-26T12:44:29
2021-11-26T12:44:29
NONE
null
It is actually about one of your examples in version 2.9.1 and before, redis_vtable, in line 208, RedisView.create_table(), this will report error. But when I change that line to something like cursor.execute("create virtual table redisview using RedisModule()"), the whole program worked. So I highly doubt that the...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2492/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2492/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2491
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2491/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2491/comments
https://api.github.com/repos/coleifer/peewee/issues/2491/events
https://github.com/coleifer/peewee/issues/2491
1,062,176,736
I_kwDOAA7yGM4_T4fg
2,491
FlaskDb wrapper from extension
{ "login": "nabinbhusal80", "id": 24907850, "node_id": "MDQ6VXNlcjI0OTA3ODUw", "avatar_url": "https://avatars.githubusercontent.com/u/24907850?v=4", "gravatar_id": "", "url": "https://api.github.com/users/nabinbhusal80", "html_url": "https://github.com/nabinbhusal80", "followers_url": "https://api.githu...
[]
closed
false
null
[]
null
[ "I've implemented this, thanks for the suggestion. The endpoints can be specified using:\r\n\r\n```python\r\nFLASKDB_EXCLUDED_ROUTES = ('view1', 'view2'...)\r\n\r\n# Or,\r\nflask_db = FlaskDB(app, excluded_routes=set('view1', 'view2',...))\r\n```", "Hey @coleifer thank you so much for the solution. Somehow i miss...
2021-11-24T09:13:45
2021-11-24T18:49:11
2021-11-24T14:30:09
NONE
null
Hi I am using FlaskDb on my flask application which always opens connection to db on each request and closes connection once request ends. This is a great feature but I have some endpoints which don't require anything from db and they kind of live for long time because complex computations. How do I exempt db conne...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2491/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2491/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2490
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2490/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2490/comments
https://api.github.com/repos/coleifer/peewee/issues/2490/events
https://github.com/coleifer/peewee/issues/2490
1,060,162,877
I_kwDOAA7yGM4_MM09
2,490
Remote Postgres Use Case
{ "login": "aiqc", "id": 74990642, "node_id": "MDQ6VXNlcjc0OTkwNjQy", "avatar_url": "https://avatars.githubusercontent.com/u/74990642?v=4", "gravatar_id": "", "url": "https://api.github.com/users/aiqc", "html_url": "https://github.com/aiqc", "followers_url": "https://api.github.com/users/aiqc/followers"...
[]
closed
false
null
[]
null
[ "Yes, peewee supports all the same parameters as psycopg2, so:\r\n\r\n```python\r\n\r\n# for example:\r\ndb = PostgresqlDatabase('db_name', host='192.168.1.30', port=5432, user='postgres', password='xyz')\r\n```\r\n\r\nPsycopg2 connection doc: https://www.psycopg.org/docs/module.html#psycopg2.connect" ]
2021-11-22T13:32:39
2021-11-22T13:42:07
2021-11-22T13:42:07
NONE
null
Hiya. It sounded like you were fishing for use cases with respect to Postgres in the docs. > https://docs.peewee-orm.com/en/latest/peewee/playhouse.html?highlight=postgresql#PostgresqlExtDatabase > > In the future I would like to add support for more of postgresql’s features. If there is a particular feature y...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2490/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2490/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2489
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2489/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2489/comments
https://api.github.com/repos/coleifer/peewee/issues/2489/events
https://github.com/coleifer/peewee/issues/2489
1,058,826,022
I_kwDOAA7yGM4_HGcm
2,489
CharField with unique constraint is case insensitive
{ "login": "rmskinsa2", "id": 86251795, "node_id": "MDQ6VXNlcjg2MjUxNzk1", "avatar_url": "https://avatars.githubusercontent.com/u/86251795?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rmskinsa2", "html_url": "https://github.com/rmskinsa2", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "https://stackoverflow.com/questions/463764/are-unique-indices-case-sensitive-in-mysql", "@coleifer Is there a way to make the column case sensitive via PeeWee, or is this something we need to do directly in the db?", "You should be able to specify the collation directly via Peewee:\r\n\r\n```python\r\nkey = Ch...
2021-11-19T19:01:51
2021-11-23T17:26:46
2021-11-19T19:46:46
NONE
null
I have a `CharField` defined like so: ``` class ToucanDomain(db.Model): name = CharField(unique=True, null=False) ``` I would like to create two entries, one with `name='SaTScan'` and another with `name='satscan'`. However, I get the following error, because on `create` the field appears to be case insensitive...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2489/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2489/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2488
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2488/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2488/comments
https://api.github.com/repos/coleifer/peewee/issues/2488/events
https://github.com/coleifer/peewee/issues/2488
1,058,357,797
I_kwDOAA7yGM4_FUIl
2,488
how to make order_by smarter
{ "login": "viponedream", "id": 16624529, "node_id": "MDQ6VXNlcjE2NjI0NTI5", "avatar_url": "https://avatars.githubusercontent.com/u/16624529?v=4", "gravatar_id": "", "url": "https://api.github.com/users/viponedream", "html_url": "https://github.com/viponedream", "followers_url": "https://api.github.com/...
[]
closed
false
null
[]
null
[]
2021-11-19T10:08:36
2021-11-19T14:10:53
2021-11-19T14:10:53
NONE
null
i want to accept a parameter, def get_all_order_by(self, _order_by) -> list: table = self.get_table() res = table.select().order_by(table._order_by.desc()) --> this doesnot work item_list = [d.to_item() for d in res] return item_list
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2488/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2488/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2487
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2487/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2487/comments
https://api.github.com/repos/coleifer/peewee/issues/2487/events
https://github.com/coleifer/peewee/issues/2487
1,053,927,057
I_kwDOAA7yGM4-0aaR
2,487
JSONField - Peewee cannot serialize Pendulum DateTime
{ "login": "johnziebro", "id": 90479072, "node_id": "MDQ6VXNlcjkwNDc5MDcy", "avatar_url": "https://avatars.githubusercontent.com/u/90479072?v=4", "gravatar_id": "", "url": "https://api.github.com/users/johnziebro", "html_url": "https://github.com/johnziebro", "followers_url": "https://api.github.com/use...
[]
closed
false
null
[]
null
[ ">I'd like to better understand the roundtrip process for serializing and deserializing.\r\n\r\nThe sqlite3 json data-type requires the data to be serialized into json. Simple as that. When reading row data off a cursor the JSONField will deserialize it back to an object.\r\n\r\nThe problem is actually rather from ...
2021-11-15T17:38:08
2021-11-15T20:21:22
2021-11-15T17:55:31
NONE
null
### Issue The Pendulum module's purpose is to be a drop-in replacement for the standard datetime class. In most cases Pendulum's DateTime class can be treated the same as datetime.datetime. However, when attempting to save with Peewee into a JSONField, DateTime throws a TypeError as not serializable. Per [Pendulum'...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2487/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2487/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2486
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2486/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2486/comments
https://api.github.com/repos/coleifer/peewee/issues/2486/events
https://github.com/coleifer/peewee/issues/2486
1,051,493,025
I_kwDOAA7yGM4-rIKh
2,486
`get_or_create` isn't automatically including the primary key
{ "login": "rbracco", "id": 47190785, "node_id": "MDQ6VXNlcjQ3MTkwNzg1", "avatar_url": "https://avatars.githubusercontent.com/u/47190785?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rbracco", "html_url": "https://github.com/rbracco", "followers_url": "https://api.github.com/users/rbracc...
[]
closed
false
null
[]
null
[ "I'm getting some really weird results. I tried to hack around it by calling `ModelResult.get(audio_id=af.id, model_id=tm.id)` and manually updating if it existed, and if it didnt, catching the `DoesNotExist` and manually creating the `ModelResult` with\r\n\r\n```\r\nmax_id = ModelResult.select(fn.MAX(ModelResult.i...
2021-11-12T01:21:19
2021-11-12T13:47:52
2021-11-12T13:47:52
NONE
null
I have a field `ModelResult` with a foreignkey for an `Audio` class. I recently updated `ModelResult` to take a 2nd foreign key for a `Model` class. When I call `get_or_create` I get the error `IntegrityError: NOT NULL constraint failed: modelresult.id`. For some reason the id isn't being automatically included/increme...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2486/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2486/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2485
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2485/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2485/comments
https://api.github.com/repos/coleifer/peewee/issues/2485/events
https://github.com/coleifer/peewee/pull/2485
1,051,246,165
PR_kwDOAA7yGM4ua5_k
2,485
Document example usage of object_id_name
{ "login": "pylipp", "id": 10617122, "node_id": "MDQ6VXNlcjEwNjE3MTIy", "avatar_url": "https://avatars.githubusercontent.com/u/10617122?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pylipp", "html_url": "https://github.com/pylipp", "followers_url": "https://api.github.com/users/pylipp/fo...
[]
closed
false
null
[]
null
[ "I found the text and admonition confusing, even in context. I'll pass for now but will think about whether some improvement to the docs is needed for this situation." ]
2021-11-11T18:22:13
2021-11-11T22:46:25
2021-11-11T22:46:24
NONE
null
In combination with `column_name` defined, an AttributeError is raised otherwise. This behavior was confusing me at first, until I found #1302. The docs (apart from the ForeignKeyField API) don't mention object_id_name
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2485/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2485/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2485", "html_url": "https://github.com/coleifer/peewee/pull/2485", "diff_url": "https://github.com/coleifer/peewee/pull/2485.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2485.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2484
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2484/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2484/comments
https://api.github.com/repos/coleifer/peewee/issues/2484/events
https://github.com/coleifer/peewee/issues/2484
1,046,845,023
I_kwDOAA7yGM4-ZZZf
2,484
Insert doesn't return lastrowid for Postgresql
{ "login": "sebo-b", "id": 51707418, "node_id": "MDQ6VXNlcjUxNzA3NDE4", "avatar_url": "https://avatars.githubusercontent.com/u/51707418?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sebo-b", "html_url": "https://github.com/sebo-b", "followers_url": "https://api.github.com/users/sebo-b/fo...
[]
closed
false
null
[]
null
[ "Postgres/psycopg2 does not provide a lastrowid db-api method -- you need to use RETURNING with postgres. This is handled automatically for you when you use the models APIs, but **not** when you are using the low-level query builder (e.g. `Table`)." ]
2021-11-07T20:44:01
2021-11-08T14:22:51
2021-11-08T14:22:51
NONE
null
Minimal test case: ``` test = Table('test',('id','value'),primary_key='id') test.bind(db) lastRowId = test.insert({test.value: 10}).execute() ``` Actual: lastRowId is None Expected: lastRowId contains generated primary key In Postgresql implementation, for receiving inserted id RETURNING clause is u...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2484/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2484/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2483
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2483/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2483/comments
https://api.github.com/repos/coleifer/peewee/issues/2483/events
https://github.com/coleifer/peewee/pull/2483
1,044,521,423
PR_kwDOAA7yGM4uFWu9
2,483
Insert link to gevent docs for monkey-patching
{ "login": "pylipp", "id": 10617122, "node_id": "MDQ6VXNlcjEwNjE3MTIy", "avatar_url": "https://avatars.githubusercontent.com/u/10617122?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pylipp", "html_url": "https://github.com/pylipp", "followers_url": "https://api.github.com/users/pylipp/fo...
[]
closed
false
null
[]
null
[ "Not a fan of links becoming stale?\r\n" ]
2021-11-04T09:34:33
2021-11-04T15:08:27
2021-11-04T12:55:15
NONE
null
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2483/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2483/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2483", "html_url": "https://github.com/coleifer/peewee/pull/2483", "diff_url": "https://github.com/coleifer/peewee/pull/2483.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2483.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2482
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2482/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2482/comments
https://api.github.com/repos/coleifer/peewee/issues/2482/events
https://github.com/coleifer/peewee/issues/2482
1,043,929,853
I_kwDOAA7yGM4-ORr9
2,482
Postgres: db.create_tables() throws table already exists error
{ "login": "dhrumilp31", "id": 87986360, "node_id": "MDQ6VXNlcjg3OTg2MzYw", "avatar_url": "https://avatars.githubusercontent.com/u/87986360?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dhrumilp31", "html_url": "https://github.com/dhrumilp31", "followers_url": "https://api.github.com/use...
[]
closed
false
null
[]
null
[ "You need to re-bind the models to the postgres database in order for them to be created on the Pg database:\r\n\r\n```python\r\ndb = PostgresqlDatabase('prodigy_db', user='usr', password='pwd', host='host', port=5432)\r\ndb.bind(models.values())\r\ndb.create_tables(list(models.values()), safe=False)\r\n```", "Th...
2021-11-03T18:22:09
2021-11-03T19:21:28
2021-11-03T19:13:39
NONE
null
I am trying to load schema from existing SQLite database and using those definitions, would like to create three new tables in Postgres db. Following is the code that I am using: ```` from peewee import SqliteDatabase, PostgresqlDatabase, Model from playhouse.reflection import generate_models, print_model, print_tab...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2482/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2482/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2481
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2481/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2481/comments
https://api.github.com/repos/coleifer/peewee/issues/2481/events
https://github.com/coleifer/peewee/pull/2481
1,039,103,926
PR_kwDOAA7yGM4t07z6
2,481
Fix type in querying.rst
{ "login": "stenci", "id": 5955495, "node_id": "MDQ6VXNlcjU5NTU0OTU=", "avatar_url": "https://avatars.githubusercontent.com/u/5955495?v=4", "gravatar_id": "", "url": "https://api.github.com/users/stenci", "html_url": "https://github.com/stenci", "followers_url": "https://api.github.com/users/stenci/foll...
[]
closed
false
null
[]
null
[]
2021-10-29T02:28:32
2021-10-29T11:09:10
2021-10-29T11:09:10
CONTRIBUTOR
null
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2481/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2481/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2481", "html_url": "https://github.com/coleifer/peewee/pull/2481", "diff_url": "https://github.com/coleifer/peewee/pull/2481.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2481.patch", "merged_at": "2021-10-29T11:09:10" }
https://api.github.com/repos/coleifer/peewee/issues/2480
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2480/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2480/comments
https://api.github.com/repos/coleifer/peewee/issues/2480/events
https://github.com/coleifer/peewee/issues/2480
1,038,288,678
I_kwDOAA7yGM494wcm
2,480
ReconnectMixin with atomic cause exception
{ "login": "mattangus", "id": 5302804, "node_id": "MDQ6VXNlcjUzMDI4MDQ=", "avatar_url": "https://avatars.githubusercontent.com/u/5302804?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mattangus", "html_url": "https://github.com/mattangus", "followers_url": "https://api.github.com/users/ma...
[]
closed
false
null
[]
null
[ "The transaction details are wrapped by the driver, so I can't really comment on why this is the case with pymysql. I'd suggest possibly trying to ping the db before beginning transactions if its possible your connection has been idle for quite some time. You can do this quite easily.\r\n\r\nhttps://pymysql.readthe...
2021-10-28T09:23:19
2021-10-28T13:01:01
2021-10-28T13:01:01
NONE
null
Using the `ReconnectMixin` and executing a query after a long wait inside an `atomic` block causes an exception. Here is some sample code: ```python class ReconnectMySQLDatabase(ReconnectMixin, pw.MySQLDatabase): """Class to make MySQL automatically reconnect after long periods without querying the database...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2480/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2480/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2479
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2479/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2479/comments
https://api.github.com/repos/coleifer/peewee/issues/2479/events
https://github.com/coleifer/peewee/issues/2479
1,037,145,443
I_kwDOAA7yGM490ZVj
2,479
tests.apsw_ext.TestAPSWExtension tests failing (LockedError) after 10be40b2ea3d76a9 (RETURNING support)
{ "login": "mgorny", "id": 110765, "node_id": "MDQ6VXNlcjExMDc2NQ==", "avatar_url": "https://avatars.githubusercontent.com/u/110765?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mgorny", "html_url": "https://github.com/mgorny", "followers_url": "https://api.github.com/users/mgorny/follow...
[]
closed
false
null
[]
null
[ "Thanks for reporting and bisecting, I've got a fix and will push a new release later today.", "Thank you, I can confirm that tests pass on master now." ]
2021-10-27T08:47:59
2021-10-27T14:01:59
2021-10-27T12:45:32
NONE
null
I'm getting 12 test errors with the git master (and 3.14.6) release that are regressions compared to 3.14.4. An example test error looks like the following: ``` ====================================================================== ERROR: test_update_delete (tests.apsw_ext.TestAPSWExtension) ---------------------...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2479/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2479/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2478
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2478/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2478/comments
https://api.github.com/repos/coleifer/peewee/issues/2478/events
https://github.com/coleifer/peewee/issues/2478
1,034,798,619
I_kwDOAA7yGM49rcYb
2,478
Implementation of Modulo operator in documentation
{ "login": "gaspardbb", "id": 40466739, "node_id": "MDQ6VXNlcjQwNDY2NzM5", "avatar_url": "https://avatars.githubusercontent.com/u/40466739?v=4", "gravatar_id": "", "url": "https://api.github.com/users/gaspardbb", "html_url": "https://github.com/gaspardbb", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "What database driver are you using this with, out of curiosity? The example works fine with Sqlite but I'm wondering if this is a result of psycopg2 doing its mogrifying client-side.", "This was with Postgre. Indeed, the issue was raised on l. 3144, `cursor.execute(sql, params or ())`." ]
2021-10-25T07:55:13
2021-10-25T17:54:53
2021-10-25T14:32:07
NONE
null
## Problem In the [documentation](https://docs.peewee-orm.com/en/latest/peewee/query_operators.html?#adding-user-defined-operators), it is said that the modulo operator can be implemented with ```python from peewee import * from peewee import Expression # the building block for expressions def mod(lhs, rhs): ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2478/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2478/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2477
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2477/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2477/comments
https://api.github.com/repos/coleifer/peewee/issues/2477/events
https://github.com/coleifer/peewee/pull/2477
1,034,480,322
PR_kwDOAA7yGM4tl8nk
2,477
removed a consider-using-in pitfall case
{ "login": "NaelsonDouglas", "id": 8750259, "node_id": "MDQ6VXNlcjg3NTAyNTk=", "avatar_url": "https://avatars.githubusercontent.com/u/8750259?v=4", "gravatar_id": "", "url": "https://api.github.com/users/NaelsonDouglas", "html_url": "https://github.com/NaelsonDouglas", "followers_url": "https://api.gith...
[]
closed
false
null
[]
null
[ "I'll pass." ]
2021-10-24T18:15:28
2021-10-24T20:03:29
2021-10-24T20:03:29
NONE
null
**Problem**: The code was incurring into the consider-using-in pitfall case, as described by Pylint documentation here https://github.com/vald-phoenix/pylint-errors/blob/master/plerr/errors/refactoring/R1714.md **Solution**: Applied adequate refactoring. Only a single line of code was changed
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2477/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2477/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2477", "html_url": "https://github.com/coleifer/peewee/pull/2477", "diff_url": "https://github.com/coleifer/peewee/pull/2477.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2477.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2476
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2476/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2476/comments
https://api.github.com/repos/coleifer/peewee/issues/2476/events
https://github.com/coleifer/peewee/issues/2476
1,033,428,716
I_kwDOAA7yGM49mN7s
2,476
Just warrning when insert_many NULL value into a Not Allow Null field
{ "login": "ThaoPN", "id": 19179219, "node_id": "MDQ6VXNlcjE5MTc5MjE5", "avatar_url": "https://avatars.githubusercontent.com/u/19179219?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ThaoPN", "html_url": "https://github.com/ThaoPN", "followers_url": "https://api.github.com/users/ThaoPN/fo...
[]
closed
false
null
[]
null
[ "Your first query \"add_one_null_row()\" is not specifying any value at all for `not_null_field`, while your second query \"add_multiple_null_row()\" is explicitly specifying NULL for `not_null_field`. I am guessing that older MySQL (with its many quirks) handles these situations differently, raising an IntegrityEr...
2021-10-22T10:29:27
2021-10-22T15:30:58
2021-10-22T15:30:19
NONE
null
I have a table like below ``` CREATE TABLE `tests` ( `id` int(11) NOT NULL AUTO_INCREMENT, `text` varchar(45) NOT NULL, `not_null_field` varchar(45) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=latin1; ``` and the code I used to insert data: ``` class Test(BaseMode...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2476/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2476/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2475
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2475/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2475/comments
https://api.github.com/repos/coleifer/peewee/issues/2475/events
https://github.com/coleifer/peewee/issues/2475
1,033,356,408
I_kwDOAA7yGM49l8R4
2,475
Join with subquery column alias not included in result row
{ "login": "larsch", "id": 15712, "node_id": "MDQ6VXNlcjE1NzEy", "avatar_url": "https://avatars.githubusercontent.com/u/15712?v=4", "gravatar_id": "", "url": "https://api.github.com/users/larsch", "html_url": "https://github.com/larsch", "followers_url": "https://api.github.com/users/larsch/followers", ...
[]
closed
false
null
[]
null
[ "The reason for this is that Peewee is attempting to reconstruct the model-graph, so the \"sum\" attribute (which logically belongs to Bar) is placed in `row.bar.sum`.\r\n\r\nHere:\r\n\r\n```python\r\n\r\nsq = (Bar.select(Bar.foo_id, fn.SUM(Bar.value).alias('sum'))\r\n .group_by(Bar.foo_id))\r\nquery = (Foo.se...
2021-10-22T09:10:28
2021-10-22T15:16:21
2021-10-22T15:16:21
NONE
null
peewee version: 3.14.4 I can't figure out how to get the aliased column of the subquery out of the result. It is not present in `row.__dict__` and accessing gives `AttributeError: object has no attribute`. Below is a distilled reproduction of the issue. Running the `query.sql()` manually with sqlite3 actually pro...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2475/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2475/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2474
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2474/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2474/comments
https://api.github.com/repos/coleifer/peewee/issues/2474/events
https://github.com/coleifer/peewee/issues/2474
1,027,995,383
I_kwDOAA7yGM49Rfb3
2,474
Union queries containing order_by
{ "login": "SilvanVerhoeven", "id": 44174681, "node_id": "MDQ6VXNlcjQ0MTc0Njgx", "avatar_url": "https://avatars.githubusercontent.com/u/44174681?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SilvanVerhoeven", "html_url": "https://github.com/SilvanVerhoeven", "followers_url": "https://api...
[]
closed
false
null
[]
null
[ "There's a little helper you can use to wrap a select query:\r\n\r\n```python\r\nclass A(Base):\r\n a = TextField()\r\n\r\nclass B(Base):\r\n b = TextField()\r\n\r\ndb.create_tables([A, B])\r\n\r\nA.insert_many([('a%d' % i,) for i in range(10)]).execute()\r\nB.insert_many([('b%d' % i,) for i in range(10)]).ex...
2021-10-16T08:47:41
2021-10-18T14:06:06
2021-10-18T13:37:39
NONE
null
I receive two queries from separate modules and want to combine the queries using `UNION` (or `UNION ALL`). The following works like a charm in MySQL: ```python def fetch_orders_query(limit, **kwargs): return ModuleA.fetch_orders_query(limit // 2, **kwargs) | ModuleB.fetch_orders_query(limit // 2, **kwargs...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2474/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2474/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2473
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2473/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2473/comments
https://api.github.com/repos/coleifer/peewee/issues/2473/events
https://github.com/coleifer/peewee/issues/2473
1,025,972,748
I_kwDOAA7yGM49JxoM
2,473
Support for psycopg3
{ "login": "elderlabs", "id": 30255476, "node_id": "MDQ6VXNlcjMwMjU1NDc2", "avatar_url": "https://avatars.githubusercontent.com/u/30255476?v=4", "gravatar_id": "", "url": "https://api.github.com/users/elderlabs", "html_url": "https://github.com/elderlabs", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "There are a number of psycopg3 changes that look to be backwards-incompatible (which is understandable) but will likely be a pain to identify and work around. Parameter binding, especially, looks like it has changed quite a bit.\r\n\r\nIt's definitely on my radar and will be added to Peewee, but I will probably wa...
2021-10-14T05:38:37
2023-03-30T15:35:45
2021-10-14T13:08:32
NONE
null
Preemptive ticket here. The maintainer of psycopg2 has busied themself with its next iteration, [psycopg3](https://github.com/psycopg/psycopg). Are there plans to add support for the project; is there already native support by design? This ticket's more to see if the project's on your radar as it has officially release...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2473/reactions", "total_count": 5, "+1": 5, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2473/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2472
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2472/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2472/comments
https://api.github.com/repos/coleifer/peewee/issues/2472/events
https://github.com/coleifer/peewee/issues/2472
1,025,820,130
I_kwDOAA7yGM49JMXi
2,472
Model.bulk_create() ignores id of instances
{ "login": "balloonz", "id": 6794239, "node_id": "MDQ6VXNlcjY3OTQyMzk=", "avatar_url": "https://avatars.githubusercontent.com/u/6794239?v=4", "gravatar_id": "", "url": "https://api.github.com/users/balloonz", "html_url": "https://github.com/balloonz", "followers_url": "https://api.github.com/users/ballo...
[]
closed
false
null
[]
null
[ "Why are you manually specifying the ID for an auto-incrementing (opaque) primary key? The `bulk_create()` API is a shorthand for generating an `insert_many()`. Just use `insert_many()` if you really want to explicitly set these, I suppose.", "I was importing some data into the database which involve relational d...
2021-10-14T00:50:11
2021-10-14T02:31:06
2021-10-14T00:53:01
NONE
null
It seems that Model.create() method respects id while Model.bulk_create ignores id of instances. my model class: ``` class Book(Model): title = CharField(default="") author = CharField(default="") created_date = DateTimeField(default=datetime.now) class Meta: database = SqliteDatabas...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2472/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2472/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2471
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2471/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2471/comments
https://api.github.com/repos/coleifer/peewee/issues/2471/events
https://github.com/coleifer/peewee/issues/2471
1,024,681,147
I_kwDOAA7yGM49E2S7
2,471
Mariadb
{ "login": "chrisemke", "id": 63082743, "node_id": "MDQ6VXNlcjYzMDgyNzQz", "avatar_url": "https://avatars.githubusercontent.com/u/63082743?v=4", "gravatar_id": "", "url": "https://api.github.com/users/chrisemke", "html_url": "https://github.com/chrisemke", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "Added basic support in: `playhouse.mysql_ext.MariaDBConnectorDatabase`" ]
2021-10-13T02:00:36
2021-10-13T13:12:14
2021-10-13T13:09:23
NONE
null
Analyze the possibility of adding support to the mariadb database using the [official connector](https://pypi.org/project/mariadb/)
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2471/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2471/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2470
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2470/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2470/comments
https://api.github.com/repos/coleifer/peewee/issues/2470/events
https://github.com/coleifer/peewee/issues/2470
1,023,317,868
I_kwDOAA7yGM48_pds
2,470
Potential "list index out of range" in FunctionTable SQLite Extension
{ "login": "ecpost", "id": 16603401, "node_id": "MDQ6VXNlcjE2NjAzNDAx", "avatar_url": "https://avatars.githubusercontent.com/u/16603401?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ecpost", "html_url": "https://github.com/ecpost", "followers_url": "https://api.github.com/users/ecpost/fo...
[]
closed
false
null
[]
null
[ "The columns you can filter on are added as HIDDEN columns *after* the exported columns. So you would have:\r\n\r\n```\r\ntable func: series(<start=0>, <stop=None>, <step=1>)\r\n\r\nclass Series(TableFunction):\r\n params = ['start', 'stop', 'step']\r\n columns = ['value']\r\n\r\n...\r\n\r\nCREATE VIRTUAL TAB...
2021-10-12T03:27:06
2021-10-12T18:05:32
2021-10-12T13:05:08
NONE
null
Hi, I ran into an issue with this line in FunctionTable's pwBestIndex() function in _sqlite_ext.pyx: ``` columns.append(table_func_cls.params[pConstraint.iColumn - table_func_cls._ncols]) ``` The value of iColumn is some number less than _ncols, so the index ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2470/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2470/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2469
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2469/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2469/comments
https://api.github.com/repos/coleifer/peewee/issues/2469/events
https://github.com/coleifer/peewee/issues/2469
1,015,445,089
I_kwDOAA7yGM48hnZh
2,469
UPDATE queries don't work because Value objects sqlify as ?
{ "login": "Gaming32", "id": 42721887, "node_id": "MDQ6VXNlcjQyNzIxODg3", "avatar_url": "https://avatars.githubusercontent.com/u/42721887?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Gaming32", "html_url": "https://github.com/Gaming32", "followers_url": "https://api.github.com/users/Gam...
[]
closed
false
null
[]
null
[ "Detailed walkthrough of `Context.value`:\r\n```python\r\n def value(self, value, converter=None, add_param=True):\r\n # add_param = True\r\n # converter = <bound method Field.db_value of <CharField: User.token>>\r\n # value = 'ba8a310b920ece30e4e28e6f67d40a53'\r\n if converter:\r\n ...
2021-10-04T17:35:00
2021-10-04T21:07:59
2021-10-04T17:56:02
NONE
null
Whenever I update a user's token using one of the two following pieces of code: ```python # 1 user.token = token user.save(only=['token']) # 2 User.update({User.token: token}).where(User.unique_id == user_id).execute() ``` The following query is executed: ```sql UPDATE "user" SET "token" = ? WHERE ("user"."un...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2469/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2469/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2468
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2468/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2468/comments
https://api.github.com/repos/coleifer/peewee/issues/2468/events
https://github.com/coleifer/peewee/issues/2468
1,014,019,009
I_kwDOAA7yGM48cLPB
2,468
Bulk update of all null DateTimeFields fails
{ "login": "milesgranger", "id": 13764397, "node_id": "MDQ6VXNlcjEzNzY0Mzk3", "avatar_url": "https://avatars.githubusercontent.com/u/13764397?v=4", "gravatar_id": "", "url": "https://api.github.com/users/milesgranger", "html_url": "https://github.com/milesgranger", "followers_url": "https://api.github.c...
[]
closed
false
null
[]
null
[ "This is a Postgres limitation - for some reason Postgres does not behave well with certain data-types in these expressions. Related issues:\r\n\r\n* #2457\r\n* #2308\r\n* #2292\r\n* https://dba.stackexchange.com/questions/228046/why-do-i-need-to-cast-null-to-column-type/228058#228058\r\n\r\nI cannot really offer a...
2021-10-02T11:19:46
2021-10-02T14:39:29
2021-10-02T13:48:56
NONE
null
Hello there! :wave: I believe I've encountered a bug in an otherwise terrific library. Summary --- When performing a bulk update of models, where the model has a nullable `DateTimeField` and every model in the list to `bulk_update` has this field set to `None` will result in a an error complaining about it b...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2468/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2468/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2467
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2467/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2467/comments
https://api.github.com/repos/coleifer/peewee/issues/2467/events
https://github.com/coleifer/peewee/issues/2467
1,009,708,412
I_kwDOAA7yGM48Lu18
2,467
Question: Why Rollback do not work for Postgres?
{ "login": "iamthen0ise", "id": 1730030, "node_id": "MDQ6VXNlcjE3MzAwMzA=", "avatar_url": "https://avatars.githubusercontent.com/u/1730030?v=4", "gravatar_id": "", "url": "https://api.github.com/users/iamthen0ise", "html_url": "https://github.com/iamthen0ise", "followers_url": "https://api.github.com/us...
[]
closed
false
null
[]
null
[ "You are using the transaction bit incorrectly I would say. Here's how I would do it:\r\n\r\n```python\r\n\r\nfor item in insert_items:\r\n with db.atomic() as txn:\r\n try:\r\n model.create(**item)\r\n except IntegrityError:\r\n txn.rollback()\r\n else:\r\n ...
2021-09-28T12:47:50
2021-09-28T14:07:05
2021-09-28T13:14:53
NONE
null
Hi! Explicit rollback do not work. Moreover, it block all the transactions until the program end. Peewee Versions is: 3.14.4 Code: ```python from playhouse.pool import PooledPostgresqlExtDatabase from playhouse.postgres_ext import ( Model, CharField, ) def get_db(): return PooledPostgres...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2467/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2467/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2466
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2466/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2466/comments
https://api.github.com/repos/coleifer/peewee/issues/2466/events
https://github.com/coleifer/peewee/issues/2466
1,006,237,428
I_kwDOAA7yGM47-fb0
2,466
Peewee cleanups all Model.dirty_fields with only params
{ "login": "penja", "id": 2717390, "node_id": "MDQ6VXNlcjI3MTczOTA=", "avatar_url": "https://avatars.githubusercontent.com/u/2717390?v=4", "gravatar_id": "", "url": "https://api.github.com/users/penja", "html_url": "https://github.com/penja", "followers_url": "https://api.github.com/users/penja/follower...
[]
closed
false
null
[]
null
[ "Thanks, this should be fixed now.", "@coleifer Thank you for so hot fix." ]
2021-09-24T08:54:36
2021-09-24T13:03:01
2021-09-24T12:44:38
NONE
null
For me was unexpected behavior with cleanup model dirty fields if we save model with `only` params. https://github.com/coleifer/peewee/blob/master/peewee.py#L6600-L6601 In my opinion, The saved field should be just removed from dirty fields. Please see invalid behavior in the following code snippet. ``` import pe...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2466/reactions", "total_count": 2, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2466/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2465
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2465/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2465/comments
https://api.github.com/repos/coleifer/peewee/issues/2465/events
https://github.com/coleifer/peewee/issues/2465
1,000,010,798
I_kwDOAA7yGM47mvQu
2,465
UNSIGNED BIGINT AUTO_INCREMENT support in create_tables?
{ "login": "sherrrrr", "id": 31510228, "node_id": "MDQ6VXNlcjMxNTEwMjI4", "avatar_url": "https://avatars.githubusercontent.com/u/31510228?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sherrrrr", "html_url": "https://github.com/sherrrrr", "followers_url": "https://api.github.com/users/she...
[]
closed
false
null
[]
null
[ "You overrode the pk, now just subclass `ForeignKeyField` and override the field_type property:\r\n\r\n```python\r\nclass UnsignedBigAutoField(BigAutoField):\r\n field_type = 'BIGINT UNSIGNED AUTO_INCREMENT'\r\n\r\nclass UnsignedForeignKeyField(ForeignKeyField):\r\n field_type = 'BIGINT UNSIGNED'\r\n\r\nclass...
2021-09-18T11:28:21
2021-09-18T18:31:02
2021-09-18T18:31:02
NONE
null
I am using mysql and use UNSIGNED BIGINT as primary key. According to as [issue542](https://github.com/coleifer/peewee/issues/542), I try to use BIGINT UNSIGNED like this ```python class UnsignedBigAutoField(BigAutoField): field_type = 'BIGINT UNSIGNED' ``` and I try to use `ForeignKeyField` in models. ``` c...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2465/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2465/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2464
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2464/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2464/comments
https://api.github.com/repos/coleifer/peewee/issues/2464/events
https://github.com/coleifer/peewee/issues/2464
997,743,671
I_kwDOAA7yGM47eFw3
2,464
Why store _database in ThreadSafeDatabaseMetadata?
{ "login": "sherrrrr", "id": 31510228, "node_id": "MDQ6VXNlcjMxNTEwMjI4", "avatar_url": "https://avatars.githubusercontent.com/u/31510228?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sherrrrr", "html_url": "https://github.com/sherrrrr", "followers_url": "https://api.github.com/users/she...
[]
closed
false
null
[]
null
[ ">At first I thought every request is default to master, then I found that if one request switch to slave, _database in User became slave, then if gevent switch to another greenlet with a new request, then User's database is default to slave.\r\n\r\nYeah, I think you're right actually, and the implementation needs ...
2021-09-16T04:00:42
2021-09-16T13:29:17
2021-09-16T13:29:02
NONE
null
```python class ThreadSafeDatabaseMetadata(Metadata): """ Metadata class to allow swapping database at run-time in a multi-threaded application. To use: class Base(Model): class Meta: model_metadata_class = ThreadSafeDatabaseMetadata """ def __init__(self, *args, **k...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2464/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2464/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2463
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2463/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2463/comments
https://api.github.com/repos/coleifer/peewee/issues/2463/events
https://github.com/coleifer/peewee/issues/2463
994,155,602
MDU6SXNzdWU5OTQxNTU2MDI=
2,463
Help on select() and get() methods
{ "login": "Sonotoki-da", "id": 34913890, "node_id": "MDQ6VXNlcjM0OTEzODkw", "avatar_url": "https://avatars.githubusercontent.com/u/34913890?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Sonotoki-da", "html_url": "https://github.com/Sonotoki-da", "followers_url": "https://api.github.com/...
[]
closed
false
null
[]
null
[ "The problem is here. Calling `query.get()` returns a model instance (if one exists) or raises a `DoesNotExist` if not. You are comparing the return value to `is True` -- and while the result (a model instance) is \"truthy\", it is *not* `True` - it is a model instance.\r\n\r\n```python\r\nif q.get_user_status(user...
2021-09-12T13:11:21
2021-09-12T15:23:16
2021-09-12T13:53:01
NONE
null
I've already searched for solutions in the Issues, but couldn't find an answer, nor understand properly :') OS: Windows Python: 3.6.8, 3.9.6 IDE: VSCode Tested purposely in 3.6.8 (saw the peewee is developed with that version). Thought maybe I can get the code work. The ```TgUser.select(TgUser.subscribed).where(Tg...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2463/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2463/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2462
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2462/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2462/comments
https://api.github.com/repos/coleifer/peewee/issues/2462/events
https://github.com/coleifer/peewee/issues/2462
991,707,639
MDU6SXNzdWU5OTE3MDc2Mzk=
2,462
ThreadSafeDatabaseMetadata in doc is not compatible with inheritance
{ "login": "sherrrrr", "id": 31510228, "node_id": "MDQ6VXNlcjMxNTEwMjI4", "avatar_url": "https://avatars.githubusercontent.com/u/31510228?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sherrrrr", "html_url": "https://github.com/sherrrrr", "followers_url": "https://api.github.com/users/she...
[]
closed
false
null
[]
null
[ "This is expected, if somewhat non-obvious. The whole purpose of using the `ThreadSafeDatabaseMetadata` is for when you plan to switch the database at run-time in a multi-threaded application, so the assumption is that at multiple points during runtime you will be explicitly binding the models to a database, e.g.:\...
2021-09-09T03:05:37
2021-09-09T13:31:37
2021-09-09T13:31:36
NONE
null
[ThreadSafeDatabaseMetadata in doc](http://docs.peewee-orm.com/en/latest/peewee/database.html#thread-safety-and-multiple-databases) ```python import threading from peewee import Metadata class ThreadSafeDatabaseMetadata(Metadata): def __init__(self, *args, **kwargs): # database attribute is stored i...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2462/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2462/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2461
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2461/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2461/comments
https://api.github.com/repos/coleifer/peewee/issues/2461/events
https://github.com/coleifer/peewee/issues/2461
987,336,488
MDU6SXNzdWU5ODczMzY0ODg=
2,461
Trying to do bulk_update AttributeError: 'dict' object has no attribute '_pk'
{ "login": "bgriffen", "id": 2667869, "node_id": "MDQ6VXNlcjI2Njc4Njk=", "avatar_url": "https://avatars.githubusercontent.com/u/2667869?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bgriffen", "html_url": "https://github.com/bgriffen", "followers_url": "https://api.github.com/users/bgrif...
[]
closed
false
null
[]
null
[ "It turns out you can't feed it a list of dictionaries like you can with `insert_many`. I worked around it by creating a list of instances. Not sure if this is the best solution to my situation but it works.\r\n\r\n```python\r\nupdates = []\r\nfor u in self.update_l:\r\n e = db.PaperDB(**u)\r\n updates.append...
2021-09-03T02:31:33
2021-09-03T12:11:44
2021-09-03T12:11:44
NONE
null
I am trying to do a bulk_update using the example provided. ```python class BaseModel(pw.Model): class Meta: database = get_testdb('papers.db') pass class PaperDB(BaseModel): pmid = pw.IntegerField(unique=True) title = pw.CharField() abstract = pw.TextField() journal = pw...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2461/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2461/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2460
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2460/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2460/comments
https://api.github.com/repos/coleifer/peewee/issues/2460/events
https://github.com/coleifer/peewee/issues/2460
979,798,538
MDU6SXNzdWU5Nzk3OTg1Mzg=
2,460
Multiple condition splicing
{ "login": "Baloneo", "id": 16448666, "node_id": "MDQ6VXNlcjE2NDQ4NjY2", "avatar_url": "https://avatars.githubusercontent.com/u/16448666?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Baloneo", "html_url": "https://github.com/Baloneo", "followers_url": "https://api.github.com/users/Balone...
[]
closed
false
null
[]
null
[ "There are a couple ways, but probably the one I recommend for dynamically building up a query is to use reduce:\r\n\r\n```python\r\n\r\nexprs = []\r\nif name:\r\n exprs.append(ProductType.name == name)\r\nif other:\r\n exprs.append(ProductType.other == other)\r\n\r\nif exprs:\r\n query = query.where(reduc...
2021-08-26T03:36:40
2021-08-26T13:25:49
2021-08-26T13:05:23
NONE
null
Sometimes the front end will pass an empty string, if where condition like this: ``` ProductType.demand_side == "" ``` will not find results, so I used the following code ```python name = current_schema_data.get('name') demand_side = current_schema_data.get('demand_side') expression = 1 if name: expre...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2460/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2460/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2459
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2459/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2459/comments
https://api.github.com/repos/coleifer/peewee/issues/2459/events
https://github.com/coleifer/peewee/issues/2459
979,239,136
MDU6SXNzdWU5NzkyMzkxMzY=
2,459
BETWEEN does not work with datetime objects in SQlite
{ "login": "LVerneyPEReN", "id": 58298410, "node_id": "MDQ6VXNlcjU4Mjk4NDEw", "avatar_url": "https://avatars.githubusercontent.com/u/58298410?v=4", "gravatar_id": "", "url": "https://api.github.com/users/LVerneyPEReN", "html_url": "https://github.com/LVerneyPEReN", "followers_url": "https://api.github.c...
[]
closed
false
null
[]
null
[ "Sqlite does not have a dedicated date/datetime type. It is up to you, the developer, to ensure that your datetimes are stored in a way that supports correct lexicographic ordering. Additionally, Peewee does not apply any conversion at all to datetime objects - it hands them as-is to the db driver. It is actually t...
2021-08-25T14:47:27
2021-08-26T13:01:18
2021-08-25T14:58:55
NONE
null
Hi, I have an issue where `BETWEEN` operation which does not work with a `DateTimeField` in SQLite when checking against Python `datetime.datetime` objects. It seems this is due to the default adapter being used for such formats in SQLite is `str` conversion, which is not the same as an `isoformat`. Therefore, le...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2459/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2459/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2458
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2458/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2458/comments
https://api.github.com/repos/coleifer/peewee/issues/2458/events
https://github.com/coleifer/peewee/issues/2458
978,766,431
MDU6SXNzdWU5Nzg3NjY0MzE=
2,458
select (15 minutes) vs execute_sql (35 seconds)
{ "login": "netsamir", "id": 1165885, "node_id": "MDQ6VXNlcjExNjU4ODU=", "avatar_url": "https://avatars.githubusercontent.com/u/1165885?v=4", "gravatar_id": "", "url": "https://api.github.com/users/netsamir", "html_url": "https://github.com/netsamir", "followers_url": "https://api.github.com/users/netsa...
[]
closed
false
null
[]
null
[ "Hi,\r\n\r\nI think I have found the solution to my problem by logging with DEBUG.\r\n\r\nI have rewritten the query like that :\r\n\r\n for row in User.select(User.Service, fn.count(1).alias('count')).group_by(User.Service):\r\n print(row.Service, row.count)\r\n\r\n DEBUG:peewee:('SELECT \"t1\".\"Serv...
2021-08-25T06:25:21
2021-08-25T12:34:13
2021-08-25T12:34:13
NONE
null
Hi, Please find below two very simple script that execute the exact same query, but: - The first one, `select`, takes 15 min to complete - The second one, `execute_sql`, takes 35 seconds to complete Do you know how to improve performance of the first script please ? ### Here are the details of the databa...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2458/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2458/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2457
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2457/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2457/comments
https://api.github.com/repos/coleifer/peewee/issues/2457/events
https://github.com/coleifer/peewee/issues/2457
975,841,918
MDU6SXNzdWU5NzU4NDE5MTg=
2,457
UUIDField with bulk_update fails
{ "login": "milesgranger", "id": 13764397, "node_id": "MDQ6VXNlcjEzNzY0Mzk3", "avatar_url": "https://avatars.githubusercontent.com/u/13764397?v=4", "gravatar_id": "", "url": "https://api.github.com/users/milesgranger", "html_url": "https://github.com/milesgranger", "followers_url": "https://api.github.c...
[]
closed
false
null
[]
null
[ "See #2308" ]
2021-08-20T18:47:28
2021-08-20T20:22:26
2021-08-20T20:22:26
NONE
null
Summary --- It appears using `Model.bulk_update` with a model using a `UUIDField` fails. Minimal Example --- ```python def test_uuid_bulk_update(db): n_rows = 1_000 class Foo(peewee.Model): class Meta: database = db pk = peewee.IntegerField(primary_key=True) ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2457/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2457/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2456
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2456/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2456/comments
https://api.github.com/repos/coleifer/peewee/issues/2456/events
https://github.com/coleifer/peewee/issues/2456
970,796,314
MDU6SXNzdWU5NzA3OTYzMTQ=
2,456
Is there a module that implements Mock?
{ "login": "ekiim", "id": 6476691, "node_id": "MDQ6VXNlcjY0NzY2OTE=", "avatar_url": "https://avatars.githubusercontent.com/u/6476691?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ekiim", "html_url": "https://github.com/ekiim", "followers_url": "https://api.github.com/users/ekiim/follower...
[]
closed
false
null
[]
null
[ "No, mocking a sql database is an extremely complex affair. Most people use shallow mocks or just an in memory sqlite database for testing." ]
2021-08-14T02:04:42
2021-08-14T15:11:04
2021-08-14T15:11:04
NONE
null
Hello, I'm trying to find out if there is a module for mocking for models. I know it's a small project, I'm interested in finding one.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2456/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2456/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2455
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2455/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2455/comments
https://api.github.com/repos/coleifer/peewee/issues/2455/events
https://github.com/coleifer/peewee/pull/2455
963,324,836
MDExOlB1bGxSZXF1ZXN0NzA1OTYxMzQx
2,455
Update api.rst
{ "login": "aparcar", "id": 16000931, "node_id": "MDQ6VXNlcjE2MDAwOTMx", "avatar_url": "https://avatars.githubusercontent.com/u/16000931?v=4", "gravatar_id": "", "url": "https://api.github.com/users/aparcar", "html_url": "https://github.com/aparcar", "followers_url": "https://api.github.com/users/aparca...
[]
closed
false
null
[]
null
[ "Actually the solution is as simple as `(idlist.split(\",\") if idlist else [])`", "a643a6952372e22ce658c8ca9a23322bb4b2ab57" ]
2021-08-08T00:12:24
2021-08-08T13:17:59
2021-08-08T13:17:59
NONE
null
The example is wrong since it doesn't split the `idlist`. This is the same function as used in the test. However the example has a case with an empty list (`[]`) which won't work, since `None.split(",")` won't work. Any simple solutions here?
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2455/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2455/timeline
null
null
true
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2455", "html_url": "https://github.com/coleifer/peewee/pull/2455", "diff_url": "https://github.com/coleifer/peewee/pull/2455.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2455.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2454
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2454/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2454/comments
https://api.github.com/repos/coleifer/peewee/issues/2454/events
https://github.com/coleifer/peewee/issues/2454
962,626,425
MDU6SXNzdWU5NjI2MjY0MjU=
2,454
Insert Many\Upsert (PostgreSQL) doesn't work with M2M relations
{ "login": "madMathematician971", "id": 63659861, "node_id": "MDQ6VXNlcjYzNjU5ODYx", "avatar_url": "https://avatars.githubusercontent.com/u/63659861?v=4", "gravatar_id": "", "url": "https://api.github.com/users/madMathematician971", "html_url": "https://github.com/madMathematician971", "followers_url": ...
[]
closed
false
null
[]
null
[ "How is an upsert supposed to work across multiple tables? I think you do not understand how many-to-many actually works -- there is a junction table. There is no such thing as website.regions - that information is stored in the through table." ]
2021-08-06T10:51:31
2021-08-06T19:51:44
2021-08-06T19:51:44
NONE
null
Hello everyone, Trying to utilize an upsert along with an insert_many query for a model with m2m relation. The error I get is `'ManyToManyField' object has no attribute '_sort_key'` The code example is provided below. Trying to figure out if this is expected behavior due to the fact that ManyToManyField is ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2454/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2454/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2453
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2453/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2453/comments
https://api.github.com/repos/coleifer/peewee/issues/2453/events
https://github.com/coleifer/peewee/issues/2453
962,161,857
MDU6SXNzdWU5NjIxNjE4NTc=
2,453
Problem with ended parentheses alias
{ "login": "wes9319", "id": 11861951, "node_id": "MDQ6VXNlcjExODYxOTUx", "avatar_url": "https://avatars.githubusercontent.com/u/11861951?v=4", "gravatar_id": "", "url": "https://api.github.com/users/wes9319", "html_url": "https://github.com/wes9319", "followers_url": "https://api.github.com/users/wes931...
[]
closed
false
null
[]
null
[ "I don't know if I can change this logic without introducing a possible regression for users who select arbitrary sql functions and do not alias them. The current logic looks if there's a \".\" within the column name, takes the stuff to the right of it and strips `\"` and `)`, e.g.:\r\n\r\nUPPER(\"t1\".\"name\") ->...
2021-08-05T20:13:40
2021-08-08T13:29:16
2021-08-08T13:28:36
NONE
null
I had a problem trying to query data and assign an alias ended by a parentheses to each row, the data indeed is correct but the last parentheses of the alias gets cut off in the result data. Here's an example: ``` SUM(IF((((`t2`.`class` IN (%s, %s, %s)) AND (`t2`.`concept` != %s)) AND (`t3`.`cost_id` = %s)), IFNULL((...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2453/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2453/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2452
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2452/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2452/comments
https://api.github.com/repos/coleifer/peewee/issues/2452/events
https://github.com/coleifer/peewee/issues/2452
959,535,883
MDU6SXNzdWU5NTk1MzU4ODM=
2,452
Accessing views via models not possible
{ "login": "SilvanVerhoeven", "id": 44174681, "node_id": "MDQ6VXNlcjQ0MTc0Njgx", "avatar_url": "https://avatars.githubusercontent.com/u/44174681?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SilvanVerhoeven", "html_url": "https://github.com/SilvanVerhoeven", "followers_url": "https://api...
[]
closed
false
null
[]
null
[ "What version of sqlite are you using?", "The requirements.txt requires peewee 3.9.6", "No, what version of sqlite.", "I'm sorry. SQLite 3.31.1 (retrieved via `select sqlite_version()`)", "This example code is working fine for me, I suppose you have some issue in your code or you can try updating your peewe...
2021-08-03T21:38:10
2021-08-04T17:24:16
2021-08-04T17:23:18
NONE
null
I try to access a view in my SQLite database following the instructions from https://stackoverflow.com/questions/38707331/does-peewee-support-interaction-with-mysql-views. I figured that the article's `db_table` needs to be replaced with `table_name` in the current version of peewee. I used the following SQL statement ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2452/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2452/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2451
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2451/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2451/comments
https://api.github.com/repos/coleifer/peewee/issues/2451/events
https://github.com/coleifer/peewee/issues/2451
957,674,183
MDU6SXNzdWU5NTc2NzQxODM=
2,451
Peewee does not automatically reconnect to MySQL Error: peewee.InterfaceError: (0, '')
{ "login": "Baloneo", "id": 16448666, "node_id": "MDQ6VXNlcjE2NDQ4NjY2", "avatar_url": "https://avatars.githubusercontent.com/u/16448666?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Baloneo", "html_url": "https://github.com/Baloneo", "followers_url": "https://api.github.com/users/Balone...
[]
closed
false
null
[]
null
[ "db.close()\r\n```\r\n'Attempting to close database while '\r\npeewee.OperationalError: Attempting to close database while transaction is open\r\n```", "```\r\n\r\nclass ReconnectMixin(object):\r\n \"\"\"\r\n Mixin class that attempts to automatically reconnect to the database under\r\n certain error con...
2021-08-02T02:10:27
2021-08-02T13:02:56
2021-08-02T13:02:56
NONE
null
``` class ReconnectMySQLDatabase(ReconnectMixin, MySQLDatabase): pass db = ReconnectMySQLDatabase(current_config.MYSQL_DB_NAME, host=current_config.MYSQL_DB_IP, port=current_config.MYSQL_DB_PORT, user=current_config.MYSQL_DB_USER, password=current_con...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2451/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2451/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2450
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2450/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2450/comments
https://api.github.com/repos/coleifer/peewee/issues/2450/events
https://github.com/coleifer/peewee/issues/2450
955,993,414
MDU6SXNzdWU5NTU5OTM0MTQ=
2,450
SQL from migrator
{ "login": "konradkur", "id": 22791650, "node_id": "MDQ6VXNlcjIyNzkxNjUw", "avatar_url": "https://avatars.githubusercontent.com/u/22791650?v=4", "gravatar_id": "", "url": "https://api.github.com/users/konradkur", "html_url": "https://github.com/konradkur", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "This is not really exposed. Operations may be composed of multiple steps, so the migrations module uses an abstraction (`Operation`) to run potentially multiple queries. Additionally, steps may include validation that requires a previous step having been run (before the sql is generated). How do you get the sql fo...
2021-07-29T16:06:18
2021-07-29T21:27:43
2021-07-29T21:27:43
NONE
null
Hello my friends, `migrate( migrator.add_column('some_table', 'title', title_field), migrator.add_column('some_table', 'status', status_field), migrator.drop_column('some_table', 'old_column'), )` how to get SQL code? thanks, Konrad
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2450/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2450/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2449
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2449/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2449/comments
https://api.github.com/repos/coleifer/peewee/issues/2449/events
https://github.com/coleifer/peewee/issues/2449
950,542,342
MDU6SXNzdWU5NTA1NDIzNDI=
2,449
Can't import models before creating a Database object
{ "login": "AidenEllis", "id": 64432103, "node_id": "MDQ6VXNlcjY0NDMyMTAz", "avatar_url": "https://avatars.githubusercontent.com/u/64432103?v=4", "gravatar_id": "", "url": "https://api.github.com/users/AidenEllis", "html_url": "https://github.com/AidenEllis", "followers_url": "https://api.github.com/use...
[]
closed
false
null
[]
null
[]
2021-07-22T11:05:04
2021-07-22T12:28:55
2021-07-22T12:28:55
NONE
null
.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2449/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 1, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2449/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2448
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2448/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2448/comments
https://api.github.com/repos/coleifer/peewee/issues/2448/events
https://github.com/coleifer/peewee/issues/2448
946,093,107
MDU6SXNzdWU5NDYwOTMxMDc=
2,448
Dynamic table names refer to global variables
{ "login": "Baloneo", "id": 16448666, "node_id": "MDQ6VXNlcjE2NDQ4NjY2", "avatar_url": "https://avatars.githubusercontent.com/u/16448666?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Baloneo", "html_url": "https://github.com/Baloneo", "followers_url": "https://api.github.com/users/Balone...
[]
closed
false
null
[]
null
[ "table name is not a pointer, it is set and stored in the model class' `table_name` attribute. If you want to change it at run-time, then you need to call `ModelClass._meta.set_table_name()`." ]
2021-07-16T09:06:40
2021-07-16T13:05:42
2021-07-16T13:05:41
NONE
null
``` GLOBAL_VAR_TABLE_NAME = "foo_table" def make_table_name(model_class): model_name = model_class.__name__ return GLOBAL_VAR_TABLE_NAME class BaseModel(Model): class Meta: table_function = make_table_name class User(BaseModel): # table_name will be "user_tbl". ``` update g...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2448/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2448/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2447
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2447/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2447/comments
https://api.github.com/repos/coleifer/peewee/issues/2447/events
https://github.com/coleifer/peewee/pull/2447
945,804,361
MDExOlB1bGxSZXF1ZXN0NjkxMDc5ODQy
2,447
Delete TODO.rst
{ "login": "alexpirine", "id": 1610035, "node_id": "MDQ6VXNlcjE2MTAwMzU=", "avatar_url": "https://avatars.githubusercontent.com/u/1610035?v=4", "gravatar_id": "", "url": "https://api.github.com/users/alexpirine", "html_url": "https://github.com/alexpirine", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "I like to keep it as a placeholder in case I want to fill it in." ]
2021-07-15T22:46:55
2021-07-16T00:35:08
2021-07-16T00:35:07
NONE
null
Seems like it hasn't been used for two years.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2447/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2447/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2447", "html_url": "https://github.com/coleifer/peewee/pull/2447", "diff_url": "https://github.com/coleifer/peewee/pull/2447.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2447.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2446
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2446/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2446/comments
https://api.github.com/repos/coleifer/peewee/issues/2446/events
https://github.com/coleifer/peewee/issues/2446
945,654,400
MDU6SXNzdWU5NDU2NTQ0MDA=
2,446
This ORM doesn't seem to work anymore.
{ "login": "Evert-Arends", "id": 16082595, "node_id": "MDQ6VXNlcjE2MDgyNTk1", "avatar_url": "https://avatars.githubusercontent.com/u/16082595?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Evert-Arends", "html_url": "https://github.com/Evert-Arends", "followers_url": "https://api.github.c...
[]
closed
false
null
[]
null
[ "I want to apologize. This worked like a charm. My database tool however is completely fucked. Sorry for the inconvenience." ]
2021-07-15T18:38:26
2021-07-15T19:04:51
2021-07-15T19:04:51
NONE
null
I'm using Python 3.9.6, and the example provided in the readme is broken: ``` import datetime import peewee db = peewee.SqliteDatabase('my_database.db') class BaseModel(peewee.Model): class Meta: database = db class User(BaseModel): username = peewee.CharField(unique=True) cl...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2446/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2446/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2445
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2445/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2445/comments
https://api.github.com/repos/coleifer/peewee/issues/2445/events
https://github.com/coleifer/peewee/pull/2445
937,125,654
MDExOlB1bGxSZXF1ZXN0NjgzNzMxNDc3
2,445
Fixes bug in JSON IN query for iterables
{ "login": "dustinrb", "id": 3378450, "node_id": "MDQ6VXNlcjMzNzg0NTA=", "avatar_url": "https://avatars.githubusercontent.com/u/3378450?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dustinrb", "html_url": "https://github.com/dustinrb", "followers_url": "https://api.github.com/users/dusti...
[]
closed
false
null
[]
null
[ "I don't like this patch for a couple of reasons, nor am I sure I understand the goal behind supporting such a query. Namely because it mutates the expression state when sql() is called, which is not done elsewhere in the codebase. Additionally, searching for an exact array within a json field seems problematic bec...
2021-07-05T14:04:18
2021-07-05T14:57:19
2021-07-05T14:57:19
NONE
null
Resolves issue #2444
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2445/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2445/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2445", "html_url": "https://github.com/coleifer/peewee/pull/2445", "diff_url": "https://github.com/coleifer/peewee/pull/2445.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2445.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2444
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2444/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2444/comments
https://api.github.com/repos/coleifer/peewee/issues/2444/events
https://github.com/coleifer/peewee/issues/2444
937,124,555
MDU6SXNzdWU5MzcxMjQ1NTU=
2,444
IN queries on fields with iterable Python representations
{ "login": "dustinrb", "id": 3378450, "node_id": "MDQ6VXNlcjMzNzg0NTA=", "avatar_url": "https://avatars.githubusercontent.com/u/3378450?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dustinrb", "html_url": "https://github.com/dustinrb", "followers_url": "https://api.github.com/users/dusti...
[]
closed
false
null
[]
null
[ "I see why you closed #2445; it didn't make sense to single out the IN clause in that part of the code.\r\n\r\nI think the broader issue is that you cannot use any field for an IN query where it's Python representation is a sequence. You might be able to get around this by calling\r\n\r\n```python\r\n...where(KeyD...
2021-07-05T14:03:13
2021-07-30T14:48:41
2021-07-30T14:48:41
NONE
null
When using arrays in a JSON field, the IN operator unpacks all the values into a single list. For example: ```python itr_select_query = (KeyData .select() .where(KeyData.data.in_( [[1], [2], [1,2]] ))) ``` will generate the SQL query: ```python ('SELECT "t1"."id", "t1"."key", "t1"."dat...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2444/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2444/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2443
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2443/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2443/comments
https://api.github.com/repos/coleifer/peewee/issues/2443/events
https://github.com/coleifer/peewee/pull/2443
936,477,112
MDExOlB1bGxSZXF1ZXN0NjgzMTg5MDU0
2,443
Fix decimal.InvalidOperation error for empty string
{ "login": "soyoung97", "id": 29880214, "node_id": "MDQ6VXNlcjI5ODgwMjE0", "avatar_url": "https://avatars.githubusercontent.com/u/29880214?v=4", "gravatar_id": "", "url": "https://api.github.com/users/soyoung97", "html_url": "https://github.com/soyoung97", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "FYI, this was the full stack trace for my application.\r\n```Traceback (most recent call last):\r\n File \"/usr/local/lib/python3.6/site-packages/flask/app.py\", line 2309, in __call__\r\n return self.wsgi_app(environ, start_response)\r\n File \"/usr/local/lib/python3.6/site-packages/flask/app.py\", line 2295...
2021-07-04T15:04:28
2021-07-06T03:20:34
2021-07-04T22:36:20
NONE
null
Hello, thank you for making such a good opensource code! I was working with [sqlite db viewer](https://github.com/nitinprakash96/sqlite-db-viewer) that uses peewee. However, when I was trying to iterate through None values at integer field (by {% for row in query %} in html code), there was a peewee error saying deci...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2443/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2443/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2443", "html_url": "https://github.com/coleifer/peewee/pull/2443", "diff_url": "https://github.com/coleifer/peewee/pull/2443.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2443.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2442
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2442/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2442/comments
https://api.github.com/repos/coleifer/peewee/issues/2442/events
https://github.com/coleifer/peewee/issues/2442
935,515,520
MDU6SXNzdWU5MzU1MTU1MjA=
2,442
how should i use ModelSelect.select()?
{ "login": "CooperWanng", "id": 45349258, "node_id": "MDQ6VXNlcjQ1MzQ5MjU4", "avatar_url": "https://avatars.githubusercontent.com/u/45349258?v=4", "gravatar_id": "", "url": "https://api.github.com/users/CooperWanng", "html_url": "https://github.com/CooperWanng", "followers_url": "https://api.github.com/...
[]
closed
false
null
[]
null
[ "If you are explicitly re-selecting columns, you need to specify which columns you want.", "> If you are explicitly re-selecting columns, you need to specify which columns you want.\r\n\r\nthanks,the usage of peewee differs between the two versions(3.6->3.14)" ]
2021-07-02T07:52:58
2021-07-11T13:58:45
2021-07-02T12:59:02
NONE
null
I ran into a problem when I used select function of ModelSelect >query = Auth.select(Auth.id) # Model.select() select t1.id FROM auth AS t1; query = Auth.select(Auth.id).select() # ModelSelect.select() > select FROM auth AS t1; how should i do?
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2442/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2442/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2441
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2441/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2441/comments
https://api.github.com/repos/coleifer/peewee/issues/2441/events
https://github.com/coleifer/peewee/pull/2441
935,050,691
MDExOlB1bGxSZXF1ZXN0NjgyMDMxOTUw
2,441
Add reuse_if_open flag to playhouse.dataset.DataSet
{ "login": "Xezed", "id": 22517386, "node_id": "MDQ6VXNlcjIyNTE3Mzg2", "avatar_url": "https://avatars.githubusercontent.com/u/22517386?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Xezed", "html_url": "https://github.com/Xezed", "followers_url": "https://api.github.com/users/Xezed/follow...
[]
closed
false
null
[]
null
[]
2021-07-01T17:09:50
2021-07-01T20:35:45
2021-07-01T20:35:45
NONE
null
Hey :) I need to use the existing connection with `DataSet`. This pull request will allow me to do so. Thank you for your work on the project. :rays_of_love:
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2441/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2441/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2441", "html_url": "https://github.com/coleifer/peewee/pull/2441", "diff_url": "https://github.com/coleifer/peewee/pull/2441.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2441.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2440
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2440/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2440/comments
https://api.github.com/repos/coleifer/peewee/issues/2440/events
https://github.com/coleifer/peewee/issues/2440
934,606,810
MDU6SXNzdWU5MzQ2MDY4MTA=
2,440
[QueryBuilder] Missing alias when filtering on a nested subquery
{ "login": "kozlek", "id": 3019422, "node_id": "MDQ6VXNlcjMwMTk0MjI=", "avatar_url": "https://avatars.githubusercontent.com/u/3019422?v=4", "gravatar_id": "", "url": "https://api.github.com/users/kozlek", "html_url": "https://github.com/kozlek", "followers_url": "https://api.github.com/users/kozlek/foll...
[]
closed
false
null
[]
null
[ "Have you tried attaching an alias to your subquery? Here's my code and the output, which looks OK to me:\r\n\r\n```python\r\n# Get product IDs of best-selling products.\r\nbp = (Sales\r\n .select(Sales.c.product_id, fn.SUM(Sales.c.price).alias('price__sum'))\r\n .group_by(Sales.c.product_id)\r\n .al...
2021-07-01T09:08:27
2021-07-02T13:37:33
2021-07-01T13:23:25
NONE
null
Hi ! I'm using peewee's QueryBuilder API these days and I'm enjoying its powerful capabilities 😃 However, I have a complex use case where I need to produce a `WHERE IN <subquery>` condition ; where `subquery` is itself a subquery (nested subquery). ## Issue I've tried to recreate a minimal example. Let's ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2440/reactions", "total_count": 6, "+1": 5, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 1 }
https://api.github.com/repos/coleifer/peewee/issues/2440/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2439
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2439/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2439/comments
https://api.github.com/repos/coleifer/peewee/issues/2439/events
https://github.com/coleifer/peewee/issues/2439
933,280,236
MDU6SXNzdWU5MzMyODAyMzY=
2,439
migrate leave foreignkey out of consideration
{ "login": "woshimanong1990", "id": 13585117, "node_id": "MDQ6VXNlcjEzNTg1MTE3", "avatar_url": "https://avatars.githubusercontent.com/u/13585117?v=4", "gravatar_id": "", "url": "https://api.github.com/users/woshimanong1990", "html_url": "https://github.com/woshimanong1990", "followers_url": "https://api...
[]
closed
false
null
[]
null
[ "The foreign keys are returned by `pragma foreign_key_list(\"...\")`. I'm not sure I understand the issue you're describing." ]
2021-06-30T03:55:50
2021-06-30T13:17:55
2021-06-30T13:17:55
NONE
null
I drop a field to a tabel ,but not I success. Finally, I found, it's a bug. you create a tmp table and then, drop old tabel. BUT, leave foreignkey out of consideration ` # Find any foreign keys we may need to remove. self.database.get_foreign_keys(table) ` do nothing I used sqlite. ma...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2439/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2439/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2438
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2438/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2438/comments
https://api.github.com/repos/coleifer/peewee/issues/2438/events
https://github.com/coleifer/peewee/issues/2438
933,265,316
MDU6SXNzdWU5MzMyNjUzMTY=
2,438
migrator.add_column throws error on column with default value for sqlite
{ "login": "binh-vu", "id": 4346739, "node_id": "MDQ6VXNlcjQzNDY3Mzk=", "avatar_url": "https://avatars.githubusercontent.com/u/4346739?v=4", "gravatar_id": "", "url": "https://api.github.com/users/binh-vu", "html_url": "https://github.com/binh-vu", "followers_url": "https://api.github.com/users/binh-vu/...
[]
closed
false
null
[]
null
[ "Closing the issue. I found the root of this problem.\r\n\r\nI added the new field to my model definition with index. When I run my migration script, peewee saw a new field, it doesn't create the column. However, it creates the index. So the database has an index of an unknown column. A query to create column is fi...
2021-06-30T03:13:57
2021-06-30T04:03:10
2021-06-30T04:03:10
NONE
null
Peewee version: `3.14.4` SQLite version: `3.33.0` When I run, ``` migrator = SqliteMigrator(db) with db.atomic(): migrate( migrator.add_column("table", 'is_deleted', BooleanField(default=True)), ) ``` It throws the following error: ``` peewee.DatabaseError: database disk image is malform...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2438/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2438/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2437
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2437/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2437/comments
https://api.github.com/repos/coleifer/peewee/issues/2437/events
https://github.com/coleifer/peewee/issues/2437
932,902,106
MDU6SXNzdWU5MzI5MDIxMDY=
2,437
How do I union queries where the model contains a JSON field?
{ "login": "dsmurrell", "id": 4035854, "node_id": "MDQ6VXNlcjQwMzU4NTQ=", "avatar_url": "https://avatars.githubusercontent.com/u/4035854?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dsmurrell", "html_url": "https://github.com/dsmurrell", "followers_url": "https://api.github.com/users/ds...
[]
closed
false
null
[]
null
[ "Doing a bit of searching, it looks like the UNION operation is trying to take out duplicates and needs to compare the JSON content... is there any way in the union from peewee that I can specify that I'd like only apply distinct on say `id`?", "Yes, you need to use UNION ALL if you don't want duplicates removed ...
2021-06-29T16:35:24
2021-06-29T18:53:32
2021-06-29T17:57:26
NONE
null
If I have two or more queries to join (say q1, q2 and q3) and I'm using set operations on them like: `query = q1 & q2` or `query = q2 | q3` or `query = q1 - q3` I know that there is a limitation that the selected columns for these should be the same, but I'm finding that I get the errors: `peewee.ProgrammingE...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2437/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2437/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2436
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2436/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2436/comments
https://api.github.com/repos/coleifer/peewee/issues/2436/events
https://github.com/coleifer/peewee/issues/2436
931,789,027
MDU6SXNzdWU5MzE3ODkwMjc=
2,436
What you think about rename to "peewo"?
{ "login": "Timtaran", "id": 60805088, "node_id": "MDQ6VXNlcjYwODA1MDg4", "avatar_url": "https://avatars.githubusercontent.com/u/60805088?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Timtaran", "html_url": "https://github.com/Timtaran", "followers_url": "https://api.github.com/users/Tim...
[]
closed
false
null
[]
null
[]
2021-06-28T17:16:07
2021-06-28T17:22:28
2021-06-28T17:22:28
NONE
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2436/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2436/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2435
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2435/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2435/comments
https://api.github.com/repos/coleifer/peewee/issues/2435/events
https://github.com/coleifer/peewee/issues/2435
931,134,143
MDU6SXNzdWU5MzExMzQxNDM=
2,435
Some obstacles when trying to add a driver for ClickHouse
{ "login": "pm5", "id": 119645, "node_id": "MDQ6VXNlcjExOTY0NQ==", "avatar_url": "https://avatars.githubusercontent.com/u/119645?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pm5", "html_url": "https://github.com/pm5", "followers_url": "https://api.github.com/users/pm5/followers", "fol...
[]
closed
false
null
[]
null
[ "I've fixed the first item, thank you for bringing that to my attention.\r\n\r\nThe second item will not be so easy, since it implies that you are passing the parameters as a `dict`. Every other driver I know of just uses a tuple to represent the query parameters, so there is probably some work involved in getting ...
2021-06-28T03:38:57
2021-06-28T12:50:43
2021-06-28T12:50:43
NONE
null
I saw #912 and tried to add a driver for [ClickHouse](https://clickhouse.tech/) using [clickhouse-driver](https://clickhouse-driver.readthedocs.io/en/latest/features.html#python-db-api-2-0) but there seems to be some obstacles: - The [documentation](http://docs.peewee-orm.com/en/latest/peewee/database.html#adding-a-...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2435/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2435/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2434
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2434/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2434/comments
https://api.github.com/repos/coleifer/peewee/issues/2434/events
https://github.com/coleifer/peewee/issues/2434
930,942,716
MDU6SXNzdWU5MzA5NDI3MTY=
2,434
time generation on linux vs windows
{ "login": "naamlev", "id": 66517559, "node_id": "MDQ6VXNlcjY2NTE3NTU5", "avatar_url": "https://avatars.githubusercontent.com/u/66517559?v=4", "gravatar_id": "", "url": "https://api.github.com/users/naamlev", "html_url": "https://github.com/naamlev", "followers_url": "https://api.github.com/users/naamle...
[]
closed
false
null
[]
null
[ "I think you are misusing `prefetch()`. In your first example, you shouldn't need prefetch at all if each X has only one (or zero) Y / Z. Just write:\r\n\r\n```python\r\n(X\r\n .select(X, Y, Z)\r\n .join_from(X, Y, JOIN.LEFT_OUTER)\r\n .join_from(X, Z, JOIN.LEFT_OUTER))\r\n```\r\n\r\nFor your new version, since a Z...
2021-06-27T14:19:49
2021-06-27T14:56:44
2021-06-27T14:56:43
NONE
null
Hey , I am using peewee 3.13.2 Part of the project include using join over multiple tables and retrieving foreign keys using prefetch. I've recently added to the join new table that has many to many relationship and prefetch to retrieve it key. **example:** _old version:_ X.select(X) .join_from(X, Y, ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2434/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2434/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2433
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2433/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2433/comments
https://api.github.com/repos/coleifer/peewee/issues/2433/events
https://github.com/coleifer/peewee/issues/2433
930,723,091
MDU6SXNzdWU5MzA3MjMwOTE=
2,433
Prefetching from multiple models
{ "login": "jonathanmach", "id": 12788052, "node_id": "MDQ6VXNlcjEyNzg4MDUy", "avatar_url": "https://avatars.githubusercontent.com/u/12788052?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jonathanmach", "html_url": "https://github.com/jonathanmach", "followers_url": "https://api.github.c...
[]
closed
false
null
[]
null
[ "You don't need prefetch. Prefetch is for when the direction of traversal is reversed, e.g. you have a list of users and you want to get all their kits as well.\r\n\r\nJust do joins (you'll need aliases because you reference User multiple times):\r\n\r\n```python\r\n\r\nOrderUser = User.alias()\r\nOrderApprover = U...
2021-06-26T15:54:47
2021-06-28T15:46:49
2021-06-26T21:51:42
CONTRIBUTOR
null
Hi all! Hoping everyone is safe! I've read the documentation about N+1 queries and prefetch, but I'm facing a strange behavior. Let's say I have the following models: ``` Users Orders user (FK) approved_by_user (FK) Kits order (FK) claimed_by_user (FK) cancelled_by_user (FK) ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2433/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2433/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2432
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2432/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2432/comments
https://api.github.com/repos/coleifer/peewee/issues/2432/events
https://github.com/coleifer/peewee/issues/2432
928,623,933
MDU6SXNzdWU5Mjg2MjM5MzM=
2,432
Question: Is there a way to use one field to set another field when the create method is used?
{ "login": "dsmurrell", "id": 4035854, "node_id": "MDQ6VXNlcjQwMzU4NTQ=", "avatar_url": "https://avatars.githubusercontent.com/u/4035854?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dsmurrell", "html_url": "https://github.com/dsmurrell", "followers_url": "https://api.github.com/users/ds...
[]
closed
false
null
[]
null
[ "I think I got there:\r\n\r\n```\r\n @classmethod\r\n def create(cls, **query):\r\n query['email_lower'] = query[\"email\"].lower()\r\n return super(Users, cls).create(**query)\r\n```\r\n\r\n@coleifer, is there any reason to use signals over this way of doing it?", "The proper way to do this would pro...
2021-06-23T20:40:16
2021-06-24T13:05:28
2021-06-24T13:05:28
NONE
null
There are multiple uses of the `Users.create(email=X)` method in our codebase. Is there any way to modify the Users class or override the create method to make a field `email_lower` get set to another field that is always passed in (`email`)? I've tried: ``` def create(self, **kwargs): super().create(em...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2432/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2432/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2431
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2431/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2431/comments
https://api.github.com/repos/coleifer/peewee/issues/2431/events
https://github.com/coleifer/peewee/pull/2431
921,538,451
MDExOlB1bGxSZXF1ZXN0NjcwNTI2Mzgw
2,431
feat(style): let the output follows PEP8
{ "login": "HydrogenDeuterium", "id": 36532302, "node_id": "MDQ6VXNlcjM2NTMyMzAy", "avatar_url": "https://avatars.githubusercontent.com/u/36532302?v=4", "gravatar_id": "", "url": "https://api.github.com/users/HydrogenDeuterium", "html_url": "https://github.com/HydrogenDeuterium", "followers_url": "https...
[]
closed
false
null
[]
null
[ "Eh, I'll pass." ]
2021-06-15T15:43:38
2021-06-15T15:58:08
2021-06-15T15:58:07
NONE
null
when using pwiz generates file to import,IDE always warning 'PEP 8: E302 expected 2 blank lines, found 1'. I try to fix it.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2431/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2431/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2431", "html_url": "https://github.com/coleifer/peewee/pull/2431", "diff_url": "https://github.com/coleifer/peewee/pull/2431.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2431.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2430
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2430/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2430/comments
https://api.github.com/repos/coleifer/peewee/issues/2430/events
https://github.com/coleifer/peewee/issues/2430
919,888,943
MDU6SXNzdWU5MTk4ODg5NDM=
2,430
[Feature request] Add more items to the log output
{ "login": "iHalt10", "id": 24728342, "node_id": "MDQ6VXNlcjI0NzI4MzQy", "avatar_url": "https://avatars.githubusercontent.com/u/24728342?v=4", "gravatar_id": "", "url": "https://api.github.com/users/iHalt10", "html_url": "https://github.com/iHalt10", "followers_url": "https://api.github.com/users/iHalt1...
[]
closed
false
null
[]
null
[ "I'm going to pass on this for now." ]
2021-06-13T21:55:20
2021-06-14T12:57:04
2021-06-14T12:57:04
NONE
null
Hello, this is a small feature request, but I'd like to add more items to the log output. ```py from peewee import * import logging logger = logging.getLogger('peewee') logger.addHandler(logging.StreamHandler()) logger.setLevel(logging.DEBUG) a_db = SqliteDatabase('a.db') b_db = SqliteDatabase('b.db') clas...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2430/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2430/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2429
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2429/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2429/comments
https://api.github.com/repos/coleifer/peewee/issues/2429/events
https://github.com/coleifer/peewee/issues/2429
919,671,266
MDU6SXNzdWU5MTk2NzEyNjY=
2,429
create_table / drop_table implementation for MySQLMigrator and other engines
{ "login": "krokwen", "id": 4995998, "node_id": "MDQ6VXNlcjQ5OTU5OTg=", "avatar_url": "https://avatars.githubusercontent.com/u/4995998?v=4", "gravatar_id": "", "url": "https://api.github.com/users/krokwen", "html_url": "https://github.com/krokwen", "followers_url": "https://api.github.com/users/krokwen/...
[]
closed
false
null
[]
null
[ "Peewee has a schema migrations module: http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#schema-migrations\r\n\r\nI don't quite understand the issue, so I don't know what to tell you, but this doesn't seem to me a peewee-specific issue.", "I'm talking about same module.\nIt's not able to create/drop tab...
2021-06-12T22:09:25
2021-06-13T16:06:04
2021-06-13T00:45:08
NONE
null
It's a required functionality for cases when you have global schema changes, Use case: day 1: Model A. Dataset A day 2: Model B. Dataset B day 3: Model B updated. Dataset A patrially moved to model B day 4: Model A is no longer needed and removed from code. And i have to apply these changes on late environment ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2429/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2429/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2428
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2428/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2428/comments
https://api.github.com/repos/coleifer/peewee/issues/2428/events
https://github.com/coleifer/peewee/issues/2428
918,622,711
MDU6SXNzdWU5MTg2MjI3MTE=
2,428
Cannot reset ForeignKeyField to None
{ "login": "orsinium", "id": 9638362, "node_id": "MDQ6VXNlcjk2MzgzNjI=", "avatar_url": "https://avatars.githubusercontent.com/u/9638362?v=4", "gravatar_id": "", "url": "https://api.github.com/users/orsinium", "html_url": "https://github.com/orsinium", "followers_url": "https://api.github.com/users/orsin...
[]
closed
false
null
[]
null
[ "This was happening because peewee only cleared the related object reference (the A instance on B) if the actual value of the FK changed. Since it was `NULL` to start with (e.g. A.id is None), peewee did not register that there was anything to do. In practice I don't believe this would lead to any inconsistency in ...
2021-06-11T11:24:44
2021-06-13T14:59:08
2021-06-11T12:58:56
NONE
null
```python import peewee class A(peewee.Model): pass class B(peewee.Model): a = peewee.ForeignKeyField(A, null=True) b = B(a=A()) # works as expected: b.a # <A: None> # unexpected: b.a = None b.a # <A: None> ``` Expected behavior: when `None` is assigned to the ForeignKeyField, the fie...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2428/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2428/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2427
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2427/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2427/comments
https://api.github.com/repos/coleifer/peewee/issues/2427/events
https://github.com/coleifer/peewee/issues/2427
913,595,164
MDU6SXNzdWU5MTM1OTUxNjQ=
2,427
peewee create and use id field for deferred foreign key with primary_key=true
{ "login": "penja", "id": 2717390, "node_id": "MDQ6VXNlcjI3MTczOTA=", "avatar_url": "https://avatars.githubusercontent.com/u/2717390?v=4", "gravatar_id": "", "url": "https://api.github.com/users/penja", "html_url": "https://github.com/penja", "followers_url": "https://api.github.com/users/penja/follower...
[]
closed
false
null
[]
null
[]
2021-06-07T14:12:07
2021-06-08T00:05:47
2021-06-08T00:05:47
NONE
null
Hello. We have the deferred foreign key that used like primary key in new table. In this case peewee ignore `primary_key=True` param in column declaration and try to use `id` like identifier in all sql queries. Please see invalid behavior in following code snippet. ``` import peewee from peewee import * import log...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2427/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/2427/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2426
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2426/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2426/comments
https://api.github.com/repos/coleifer/peewee/issues/2426/events
https://github.com/coleifer/peewee/issues/2426
912,118,561
MDU6SXNzdWU5MTIxMTg1NjE=
2,426
Syntax error when selecting in VALUES
{ "login": "Hippopotas", "id": 9470058, "node_id": "MDQ6VXNlcjk0NzAwNTg=", "avatar_url": "https://avatars.githubusercontent.com/u/9470058?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Hippopotas", "html_url": "https://github.com/Hippopotas", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "This works fine for me:\r\n\r\n```python\r\ndb = SqliteDatabase(':memory:')\r\n\r\nclass KV(Model):\r\n key = TextField()\r\n value = IntegerField()\r\n class Meta:\r\n database = db\r\n\r\ndb.create_tables([KV])\r\n\r\nKV.insert_many([('k1', 1), ('k2', 2), ('k3', 3), ('k4', 4), ('k5', 5)]).execute...
2021-06-05T06:27:19
2021-06-06T05:12:51
2021-06-05T13:35:46
NONE
null
Peewee version: 3.4.14 SQLite version: 3.35 When running code of the form (as recommended in issues [2344](https://github.com/coleifer/peewee/issues/2344), [2411](https://github.com/coleifer/peewee/issues/2411), [2414](https://github.com/coleifer/peewee/issues/2414)): ```python foo = [(1, 2), (3, 4)] bar = Value...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2426/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2426/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2425
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2425/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2425/comments
https://api.github.com/repos/coleifer/peewee/issues/2425/events
https://github.com/coleifer/peewee/issues/2425
911,302,399
MDU6SXNzdWU5MTEzMDIzOTk=
2,425
Multi-encoding support in playhouse DataSet
{ "login": "JarneVerhaeghe", "id": 61466015, "node_id": "MDQ6VXNlcjYxNDY2MDE1", "avatar_url": "https://avatars.githubusercontent.com/u/61466015?v=4", "gravatar_id": "", "url": "https://api.github.com/users/JarneVerhaeghe", "html_url": "https://github.com/JarneVerhaeghe", "followers_url": "https://api.gi...
[]
closed
false
null
[]
null
[]
2021-06-04T09:16:26
2021-06-04T12:50:29
2021-06-04T12:50:29
NONE
null
It appears the DataSet module from playhouse does not support other encodings such as 'latin-1'. I locally solved it by adjusting the open_file, thaw, and freeze function to have an extra argument: Line 21-22 ``` def open_file(f, mode,encoding_='utf8'): return open(f, mode, encoding=encoding_) ``` ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2425/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2425/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2423
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2423/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2423/comments
https://api.github.com/repos/coleifer/peewee/issues/2423/events
https://github.com/coleifer/peewee/issues/2423
907,659,141
MDU6SXNzdWU5MDc2NTkxNDE=
2,423
Create tables from ModelSelect outside the public schema
{ "login": "albireox", "id": 568775, "node_id": "MDQ6VXNlcjU2ODc3NQ==", "avatar_url": "https://avatars.githubusercontent.com/u/568775?v=4", "gravatar_id": "", "url": "https://api.github.com/users/albireox", "html_url": "https://github.com/albireox", "followers_url": "https://api.github.com/users/albireo...
[]
closed
false
null
[]
null
[ "I've chosen to support this by allowing a tuple for the `table_name` parameter. So:\r\n\r\n```python\r\n\r\nquery = SomeModel.select()...\r\nquery.create_table('my_new_table')\r\n\r\n# OR\r\nquery.create_table(('schema', 'my_new_table'))\r\n```" ]
2021-05-31T18:43:49
2021-06-16T13:08:58
2021-06-16T13:07:57
NONE
null
I think there is a bug or limitation in the `ModelSelect.create_table()` method. The way it works right now, you can only create tables in the public schema. This is because `Entity` expects multiple arguments, one for each part of the path, but `create_table` can send only one. If you pass the whole path as a string (...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2423/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2423/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2422
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2422/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2422/comments
https://api.github.com/repos/coleifer/peewee/issues/2422/events
https://github.com/coleifer/peewee/pull/2422
906,971,690
MDExOlB1bGxSZXF1ZXN0NjU3ODgxODkz
2,422
Update quickstart.rst
{ "login": "universuen", "id": 52519513, "node_id": "MDQ6VXNlcjUyNTE5NTEz", "avatar_url": "https://avatars.githubusercontent.com/u/52519513?v=4", "gravatar_id": "", "url": "https://api.github.com/users/universuen", "html_url": "https://github.com/universuen", "followers_url": "https://api.github.com/use...
[]
closed
false
null
[]
null
[ "Opener requested I delete this PR. Unfortunately, I don't believe I can delete this - I don't see an option in the github UI." ]
2021-05-31T02:07:36
2021-06-03T15:16:24
2021-05-31T22:36:20
NONE
null
Found a missing word
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2422/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2422/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2422", "html_url": "https://github.com/coleifer/peewee/pull/2422", "diff_url": "https://github.com/coleifer/peewee/pull/2422.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2422.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2421
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2421/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2421/comments
https://api.github.com/repos/coleifer/peewee/issues/2421/events
https://github.com/coleifer/peewee/issues/2421
905,310,745
MDU6SXNzdWU5MDUzMTA3NDU=
2,421
Preferred way to do `database.execute_sql` ?
{ "login": "andersentobias", "id": 4043059, "node_id": "MDQ6VXNlcjQwNDMwNTk=", "avatar_url": "https://avatars.githubusercontent.com/u/4043059?v=4", "gravatar_id": "", "url": "https://api.github.com/users/andersentobias", "html_url": "https://github.com/andersentobias", "followers_url": "https://api.gith...
[]
closed
false
null
[]
null
[ "Peewee has been on 3.0 for about 3 years now, so you might want to upgrade as there are many improvements.\r\n\r\nThat said, as long as you're opening the pool connection before the request starts, and closing it (returning it back to the pool) after the request, then your code should work just fine." ]
2021-05-28T12:26:05
2021-05-28T12:36:58
2021-05-28T12:36:58
NONE
null
We're using a DB connection pool with peewee 2.8.0. We needed to optimize a query by writing handwritten SQL to our PostgreSQL db. What is the preferred way of doing such a query? We're using peewee together with a Flask app, if that helps. Right now, the code is: ```python database = PooledPostgresqlExtDat...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2421/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2421/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2420
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2420/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2420/comments
https://api.github.com/repos/coleifer/peewee/issues/2420/events
https://github.com/coleifer/peewee/issues/2420
903,470,809
MDU6SXNzdWU5MDM0NzA4MDk=
2,420
How to get BaseModel Fields?
{ "login": "beucismis", "id": 40023234, "node_id": "MDQ6VXNlcjQwMDIzMjM0", "avatar_url": "https://avatars.githubusercontent.com/u/40023234?v=4", "gravatar_id": "", "url": "https://api.github.com/users/beucismis", "html_url": "https://github.com/beucismis", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "Post questions on stackoverflow or IRC. This is for tracking issues.\r\n\r\n```python\r\n\r\nUser._meta.fields # dict of field name -> field instance\r\nUser._meta.sorted_fields # list of field instances in order\r\nUser._meta.sorted_field_names # Just the names\r\n```", "Thanks." ]
2021-05-27T09:35:26
2021-05-27T12:49:13
2021-05-27T12:43:22
NONE
null
I want to get the defined `Fields` as a list. ``` class User(BaseModel): id = BigIntegerField(primary_key=True) nick = CharField(unique=True) age = SmallIntegerField(unique=True) class Meta: database = db ```
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2420/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2420/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2419
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2419/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2419/comments
https://api.github.com/repos/coleifer/peewee/issues/2419/events
https://github.com/coleifer/peewee/issues/2419
901,992,407
MDU6SXNzdWU5MDE5OTI0MDc=
2,419
The client was disconnected by the server because of inactivity.
{ "login": "GreatBahram", "id": 14103831, "node_id": "MDQ6VXNlcjE0MTAzODMx", "avatar_url": "https://avatars.githubusercontent.com/u/14103831?v=4", "gravatar_id": "", "url": "https://api.github.com/users/GreatBahram", "html_url": "https://github.com/GreatBahram", "followers_url": "https://api.github.com/...
[]
closed
false
null
[]
null
[ "Thanks" ]
2021-05-26T08:28:09
2021-05-26T15:36:53
2021-05-26T12:38:35
NONE
null
Hi there, I got this exception when I have a long connection that exceeds both `wait_timeout` and `interactive_timeout` timeouts: ```python File "/usr/lib/python3/dist-packages/peewee.py", line 5513, in get return sq.get() File "/usr/lib/python3/dist-packages/peewee.py", line 5911, in get return clone...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2419/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2419/timeline
null
completed
null
null