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/2318
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2318/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2318/comments
https://api.github.com/repos/coleifer/peewee/issues/2318/events
https://github.com/coleifer/peewee/issues/2318
775,076,603
MDU6SXNzdWU3NzUwNzY2MDM=
2,318
DateTimeField should return a datetime instance
{ "login": "yuriescl", "id": 26092447, "node_id": "MDQ6VXNlcjI2MDkyNDQ3", "avatar_url": "https://avatars.githubusercontent.com/u/26092447?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yuriescl", "html_url": "https://github.com/yuriescl", "followers_url": "https://api.github.com/users/yur...
[]
closed
false
null
[]
null
[ "You are probably using sqlite and storing the datetimes in some unrecognizable format. If you look at the code you can see what format are supported out of the box. Using these formats is recommended because they allow for lexicographic ordering.\r\n\r\nThis is also explained in detail in the documentation:\r\n\r\...
2020-12-27T17:25:30
2020-12-27T23:02:00
2020-12-27T18:29:53
NONE
null
`DateTimeField` should return a `datetime` instance when accessed instead of a `str` instance. I imagine one of the main reasons to use a `DateTimeField` instead of `CharField` is to work with the field as a `datetime` instance without worrying about converting to/from `str`. Model: ``` class Entry(Model): cr...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2318/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2318/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2317
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2317/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2317/comments
https://api.github.com/repos/coleifer/peewee/issues/2317/events
https://github.com/coleifer/peewee/issues/2317
773,512,475
MDU6SXNzdWU3NzM1MTI0NzU=
2,317
When a where clause query has any param as None, the query errors at _escape_like_expr
{ "login": "bsodhi", "id": 7951778, "node_id": "MDQ6VXNlcjc5NTE3Nzg=", "avatar_url": "https://avatars.githubusercontent.com/u/7951778?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bsodhi", "html_url": "https://github.com/bsodhi", "followers_url": "https://api.github.com/users/bsodhi/foll...
[]
closed
false
null
[]
null
[ "Peewee doesn't support \"`<x is None>`\" expressions, for starters. This may have worked in previous versions, but it boils down to concatenating \"%\" with NULL and then performing a LIKE query - which is just gross.\r\n\r\nI suggest that you clean up your code and refactor those expressions. I think I'll mark th...
2020-12-23T06:06:52
2020-12-23T21:58:29
2020-12-23T21:57:57
NONE
null
When the params (such the `dept_name, org_id, fname, lname, role` in the following example) are `None`, then the queries like the following (see failing code below) are failing with the error shown next. This code used to work prior to upgrading to 3.14.0 version of peewee. Though it looks a bit ugly, for now I'm th...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2317/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2317/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2316
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2316/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2316/comments
https://api.github.com/repos/coleifer/peewee/issues/2316/events
https://github.com/coleifer/peewee/issues/2316
771,806,124
MDU6SXNzdWU3NzE4MDYxMjQ=
2,316
How to generate a background management page based on the database
{ "login": "1019157263", "id": 31230637, "node_id": "MDQ6VXNlcjMxMjMwNjM3", "avatar_url": "https://avatars.githubusercontent.com/u/31230637?v=4", "gravatar_id": "", "url": "https://api.github.com/users/1019157263", "html_url": "https://github.com/1019157263", "followers_url": "https://api.github.com/use...
[]
closed
false
null
[]
null
[]
2020-12-21T03:28:21
2020-12-21T04:05:38
2020-12-21T04:05:38
NONE
null
How to generate a background management page based on the database
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2316/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2316/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2315
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2315/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2315/comments
https://api.github.com/repos/coleifer/peewee/issues/2315/events
https://github.com/coleifer/peewee/issues/2315
767,339,913
MDU6SXNzdWU3NjczMzk5MTM=
2,315
Can't update backref record?
{ "login": "dzpt", "id": 5781080, "node_id": "MDQ6VXNlcjU3ODEwODA=", "avatar_url": "https://avatars.githubusercontent.com/u/5781080?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dzpt", "html_url": "https://github.com/dzpt", "followers_url": "https://api.github.com/users/dzpt/followers", ...
[]
closed
false
null
[]
null
[ "But if i do this , it works.\r\n```\r\nt = Topic.get_by_id(420426)\r\np = t.post\r\np.content = 'test'\r\np.save(only=[Post.content])\r\n```", "Every time you access `topic.post` using that property you are re-fetching a new instance (and the one you modified is discarded)." ]
2020-12-15T08:53:09
2020-12-15T15:07:33
2020-12-15T15:07:15
NONE
null
``` class Post(BaseModel): content = CharField() topic = ForeignKeyField(Topic, null=True, backref='Posts') class Topic(BaseModel): @property def post(self): return self.posts.get() ``` Then if i do update, it won't work ``` t = Topic.get_by_id(420426) t.post.content = 'test' # p...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2315/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2315/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2314
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2314/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2314/comments
https://api.github.com/repos/coleifer/peewee/issues/2314/events
https://github.com/coleifer/peewee/issues/2314
764,245,368
MDU6SXNzdWU3NjQyNDUzNjg=
2,314
Model dependencies list with auto-id field and relations
{ "login": "mrkovalchuk", "id": 18255783, "node_id": "MDQ6VXNlcjE4MjU1Nzgz", "avatar_url": "https://avatars.githubusercontent.com/u/18255783?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mrkovalchuk", "html_url": "https://github.com/mrkovalchuk", "followers_url": "https://api.github.com/...
[]
closed
false
null
[]
null
[ "An un-saved model, by definition, will not have any dependencies -- so this does not strike me as a bug." ]
2020-12-12T19:25:57
2020-12-12T19:44:38
2020-12-12T19:44:38
NONE
null
Good day. Model.dependencies method bring some exception for me. Python 3.7 Peewee 3.14.0 Example: ```python from peewee import Model, CharField, ForeignKeyField class A(Model): text = CharField() class B(Model): a = ForeignKeyField(A, backref='bbbs') list(A().dependencies()) ``...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2314/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2314/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2313
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2313/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2313/comments
https://api.github.com/repos/coleifer/peewee/issues/2313/events
https://github.com/coleifer/peewee/issues/2313
762,383,898
MDU6SXNzdWU3NjIzODM4OTg=
2,313
MySQL ([Errno 111] Connection refused) running inside Docker
{ "login": "sriveros95", "id": 16345170, "node_id": "MDQ6VXNlcjE2MzQ1MTcw", "avatar_url": "https://avatars.githubusercontent.com/u/16345170?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sriveros95", "html_url": "https://github.com/sriveros95", "followers_url": "https://api.github.com/use...
[]
closed
false
null
[]
null
[ "The error indicates that you cannot connect to the server, so I fail to see how this is a peewee issue. Probably some docker networking issue on your end.\r\n\r\nCan you connect to the mysql server using the mysql cli on the same host as the code is running? That'd be the best place to start debugging. But yeah --...
2020-12-11T14:18:09
2020-12-11T15:44:37
2020-12-11T15:11:33
NONE
null
Hello and thanks for the amazing work. I'm trying to use Peewee inside Docker but I keep receiving `peewee.OperationalError: (2003, "Can't connect to MySQL server on '127.0.0.1' ([Errno 111] Connection refused)")` DB name, user, port host are all correct (I'm using 127.0.0.1 as host). I don't think the proble...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2313/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2313/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2312
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2312/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2312/comments
https://api.github.com/repos/coleifer/peewee/issues/2312/events
https://github.com/coleifer/peewee/issues/2312
756,682,468
MDU6SXNzdWU3NTY2ODI0Njg=
2,312
Validation in Custom Field Classes? Question - NOT an Issue
{ "login": "jvickroy", "id": 9497294, "node_id": "MDQ6VXNlcjk0OTcyOTQ=", "avatar_url": "https://avatars.githubusercontent.com/u/9497294?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jvickroy", "html_url": "https://github.com/jvickroy", "followers_url": "https://api.github.com/users/jvick...
[]
closed
false
null
[]
null
[ "Putting it in a check constraint means needing to use a database-provided function. Unless you're using sqlite and will always have such a user-defined function available, I'm not sure how you would do this.\r\n\r\nPeewee does not really do validation in the `db_value()` or `python_value()` methods. This should be...
2020-12-03T23:54:04
2020-12-04T02:41:06
2020-12-04T01:23:50
NONE
null
A custom field to store/retrieve folder/directory path names is: ``` class FolderField (TextField): """ custom peewee field type for folder (directory) path name """ def db_value (self, name :str) -> Path: """ database string to Python Path converter """ if not ( path := Path (name) ) .is_...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2312/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2312/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2311
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2311/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2311/comments
https://api.github.com/repos/coleifer/peewee/issues/2311/events
https://github.com/coleifer/peewee/issues/2311
755,674,184
MDU6SXNzdWU3NTU2NzQxODQ=
2,311
pwiz not importing primary key in model
{ "login": "mudasirmirza", "id": 1905439, "node_id": "MDQ6VXNlcjE5MDU0Mzk=", "avatar_url": "https://avatars.githubusercontent.com/u/1905439?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mudasirmirza", "html_url": "https://github.com/mudasirmirza", "followers_url": "https://api.github.com...
[]
closed
false
null
[]
null
[ "Peewee uses a convention of implicitly assigning an auto-incrementing integer primary key named \"id\" (in the absence of the user explicitly declaring a column as the primary key). Since your table follows this convention, there is no need to explicitly declare the id field." ]
2020-12-02T23:01:55
2020-12-03T01:28:40
2020-12-03T01:28:40
NONE
null
Hey all, I using pwiz to create a model from mysql database and unable to figure out why the primary key column `id` is not being added in the model When I run this command `python -m pwiz -o -e mysql -u root -P myapp -t reviews` I get the below output ``` class UnknownField(object): def __init__(sel...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2311/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2311/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2310
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2310/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2310/comments
https://api.github.com/repos/coleifer/peewee/issues/2310/events
https://github.com/coleifer/peewee/issues/2310
755,177,233
MDU6SXNzdWU3NTUxNzcyMzM=
2,310
Missing timeout on a select() to a crashed MariaDB
{ "login": "davnat", "id": 35222812, "node_id": "MDQ6VXNlcjM1MjIyODEy", "avatar_url": "https://avatars.githubusercontent.com/u/35222812?v=4", "gravatar_id": "", "url": "https://api.github.com/users/davnat", "html_url": "https://github.com/davnat", "followers_url": "https://api.github.com/users/davnat/fo...
[]
closed
false
null
[]
null
[ "Ok, I found that using mysqlclient instead of PyMySQL I can pass a `connect_timeout` option to `MySQLDatabase` that works as expected.", ">I can pass a connect_timeout option to MySQLDatabase that works as expected.\r\n\r\nPerfect." ]
2020-12-02T11:09:33
2020-12-02T14:11:56
2020-12-02T14:11:55
NONE
null
Hi, I'm connecting to a crashed MariaDB 10.5, the log says: ```Dec 01 20:31:29 db2 mysqld[683]: max_threads=102 Dec 01 20:31:29 db2 mysqld[683]: thread_count=3 Dec 01 20:31:29 db2 mysqld[683]: It is possible that mysqld could use up to Dec 01 20:31:29 db2 mysqld[683]: key_buffer_size + (read_buffer_size + sort_buf...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2310/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2310/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2309
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2309/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2309/comments
https://api.github.com/repos/coleifer/peewee/issues/2309/events
https://github.com/coleifer/peewee/issues/2309
755,017,182
MDU6SXNzdWU3NTUwMTcxODI=
2,309
string_agg / group_concat in a multi-engine environment
{ "login": "RickMeasham", "id": 79414, "node_id": "MDQ6VXNlcjc5NDE0", "avatar_url": "https://avatars.githubusercontent.com/u/79414?v=4", "gravatar_id": "", "url": "https://api.github.com/users/RickMeasham", "html_url": "https://github.com/RickMeasham", "followers_url": "https://api.github.com/users/Rick...
[]
closed
false
null
[]
null
[ ">But isinstance returns true even when the database is SqliteExtDatabase\r\n\r\nThat doesn't sound correct to me:\r\n\r\n```python\r\nIn [1]: from playhouse.sqlite_ext import SqliteExtDatabase\r\n\r\nIn [2]: from playhouse.postgres_ext import PostgresqlExtDatabase\r\n\r\nIn [3]: d1 = SqliteExtDatabase(':memory:')\...
2020-12-02T07:18:58
2020-12-05T23:37:54
2020-12-02T14:06:47
NONE
null
I'm running postgres in public, but my unit tests are running sqlite. postgres provides `string_agg(field, 'joiner')` while sqlite (and mysql) has `group_concat(field, 'joiner')` Therefore any queries I write with `fn.GROUP_CONCAT` only work in testing, and any I write with `fn.string_agg` only work in productio...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2309/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2309/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2308
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2308/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2308/comments
https://api.github.com/repos/coleifer/peewee/issues/2308/events
https://github.com/coleifer/peewee/issues/2308
754,284,110
MDU6SXNzdWU3NTQyODQxMTA=
2,308
Error with bulk_update, UUID fields and Postgresql
{ "login": "spl0k", "id": 2974943, "node_id": "MDQ6VXNlcjI5NzQ5NDM=", "avatar_url": "https://avatars.githubusercontent.com/u/2974943?v=4", "gravatar_id": "", "url": "https://api.github.com/users/spl0k", "html_url": "https://github.com/spl0k", "followers_url": "https://api.github.com/users/spl0k/follower...
[]
closed
false
null
[]
null
[ "This came up recently related to array fields: #2292 - I believe this is either the same (or very similar) issue. I can't offer a fix for this at present and suggest the following workarounds:\r\n\r\n* write your Case() explicitly with the appropriate cast\r\n* begin a transaction and issue your updates one-at-a-t...
2020-12-01T10:49:00
2021-12-09T18:46:14
2020-12-01T14:45:10
NONE
null
Hello Postgres raises an error when using an `UUID` field in a `bulk_update`. The following code ```python import logging import uuid from peewee import Model, UUIDField, IntegerField, PostgresqlDatabase database = PostgresqlDatabase( "test", user="test", password="test", host="192.168.1.84", port=5432...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2308/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2308/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2307
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2307/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2307/comments
https://api.github.com/repos/coleifer/peewee/issues/2307/events
https://github.com/coleifer/peewee/issues/2307
753,124,049
MDU6SXNzdWU3NTMxMjQwNDk=
2,307
Does peewee currently support json fields?
{ "login": "zhenzi0322", "id": 34839719, "node_id": "MDQ6VXNlcjM0ODM5NzE5", "avatar_url": "https://avatars.githubusercontent.com/u/34839719?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zhenzi0322", "html_url": "https://github.com/zhenzi0322", "followers_url": "https://api.github.com/use...
[]
closed
false
null
[]
null
[ "Read the manual\r\n\r\n* http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#pgjson\r\n* http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#mysql-ext\r\n* http://docs.peewee-orm.com/en/latest/peewee/sqlite_ext.html#sqlite-json1" ]
2020-11-30T04:07:59
2020-11-30T12:11:28
2020-11-30T12:11:28
NONE
null
Does peewee currently support json fields?
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2307/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2307/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2306
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2306/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2306/comments
https://api.github.com/repos/coleifer/peewee/issues/2306/events
https://github.com/coleifer/peewee/issues/2306
753,056,031
MDU6SXNzdWU3NTMwNTYwMzE=
2,306
Dynamically select Postgres schema
{ "login": "dhnchandan", "id": 1688383, "node_id": "MDQ6VXNlcjE2ODgzODM=", "avatar_url": "https://avatars.githubusercontent.com/u/1688383?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dhnchandan", "html_url": "https://github.com/dhnchandan", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "That data is not stored thread-local and you are advised that it is a bad idea. It's probably better to dynamically generate a model-class with the desired schema than to try swapping it around. Generally this is not going to be well-supported." ]
2020-11-30T00:27:22
2020-11-30T00:45:11
2020-11-30T00:43:05
NONE
null
I am thinking about changing Postgres schema dynamically. Every user will have a schema name in the user database and when he will login his data will be queried from his own named schema. ``` class PublicBaseModel(peewee.Model): class Meta: database = sql_db class BaseModel(peewee.Model): class...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2306/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2306/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2305
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2305/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2305/comments
https://api.github.com/repos/coleifer/peewee/issues/2305/events
https://github.com/coleifer/peewee/pull/2305
751,507,418
MDExOlB1bGxSZXF1ZXN0NTI4MDA3Mjgz
2,305
Unexpected column names when using fn and .dicts
{ "login": "albatros69", "id": 5740149, "node_id": "MDQ6VXNlcjU3NDAxNDk=", "avatar_url": "https://avatars.githubusercontent.com/u/5740149?v=4", "gravatar_id": "", "url": "https://api.github.com/users/albatros69", "html_url": "https://github.com/albatros69", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "I'm OK with adding this, but you should *really* be explicitly aliasing these so that it is not database-dependent and fragile. I believe, furthermore, this example is specific to sqlite - postgres behaves differently (I believe the columns will be named \"min\" and \"max\", at least that's how it behaves on my la...
2020-11-26T11:15:47
2020-11-26T19:37:24
2020-11-26T16:39:51
NONE
null
Consider the following example (I tried to shave it to a minimum): ```python class Test(Model): start_date = DateTimeField(null=True) end_date = DateTimeField(null=True) >>> list(Test.select(fn.MIN(Test.start_date), fn.MAX(Test.end_date)).dicts()) [{'start_date")': datetime.datetime(2020, 9, 11, 9, 56),...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2305/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2305/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2305", "html_url": "https://github.com/coleifer/peewee/pull/2305", "diff_url": "https://github.com/coleifer/peewee/pull/2305.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2305.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2304
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2304/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2304/comments
https://api.github.com/repos/coleifer/peewee/issues/2304/events
https://github.com/coleifer/peewee/issues/2304
751,094,968
MDU6SXNzdWU3NTEwOTQ5Njg=
2,304
Select by foreign key doesn't works as expected
{ "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 for the succinct issue report. For now I've made a provisional fix which correctly delegates to the `ForeignKeyField.db_value()` method when a model instance is converted. The fix is not perfect since we still want a way to convert model instances when a converter is present (but is not able to handle the g...
2020-11-25T20:20:53
2020-11-25T22:07:34
2020-11-25T21:31:41
NONE
null
Hello. We have the foreign keys with related field that is not equal the primary key to the related model. The following code snippet shows an invalid SELECT query when we use in the select query related model object instead of just identifier. ``` from peewee import * db = SqliteDatabase(':memory:') class B...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2304/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2304/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2303
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2303/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2303/comments
https://api.github.com/repos/coleifer/peewee/issues/2303/events
https://github.com/coleifer/peewee/issues/2303
748,720,639
MDU6SXNzdWU3NDg3MjA2Mzk=
2,303
migrator.rename_table doesn't work
{ "login": "tres45", "id": 64437846, "node_id": "MDQ6VXNlcjY0NDM3ODQ2", "avatar_url": "https://avatars.githubusercontent.com/u/64437846?v=4", "gravatar_id": "", "url": "https://api.github.com/users/tres45", "html_url": "https://github.com/tres45", "followers_url": "https://api.github.com/users/tres45/fo...
[]
closed
false
null
[]
null
[ "This code is covered by unit-tests and I believe it is working properly.\r\n\r\nhttps://github.com/coleifer/peewee/blob/efb41a944e926ea201d120e50d3d864028fbf899/tests/migrations.py#L392-L420" ]
2020-11-23T11:30:24
2020-11-23T13:33:14
2020-11-23T13:33:14
NONE
null
Hi, I use peewee 3.14.0 and can't rename table: peewee.ProgrammingError: relation "test_table_new" does not exist `migrator.rename_table('test_table', 'test_table_new')` ```migration | File "/usr/local/lib/python3.8/site-packages/peewee_migrate/router.py", line 183, in run migration ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2303/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2303/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2302
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2302/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2302/comments
https://api.github.com/repos/coleifer/peewee/issues/2302/events
https://github.com/coleifer/peewee/issues/2302
747,490,030
MDU6SXNzdWU3NDc0OTAwMzA=
2,302
About transaction commit
{ "login": "xiaoqge", "id": 8544686, "node_id": "MDQ6VXNlcjg1NDQ2ODY=", "avatar_url": "https://avatars.githubusercontent.com/u/8544686?v=4", "gravatar_id": "", "url": "https://api.github.com/users/xiaoqge", "html_url": "https://github.com/xiaoqge", "followers_url": "https://api.github.com/users/xiaoqge/...
[]
closed
false
null
[]
null
[ ">I saw the data has been written into the database\r\n\r\nAssuming you mean you were using a separate connection and saw the data before it had been committed by the peewee connection? You might check your read [isolation settings](https://dev.mysql.com/doc/refman/8.0/en/innodb-transaction-isolation-levels.html).\...
2020-11-20T13:27:05
2020-11-20T15:10:12
2020-11-20T14:34:59
NONE
null
I am using mysql 8.0, using the innodb engine, using the version of peewee 3.14, I use peewee transaction commit, without executing commit, I saw the data has been written into the database, but I did not execute db.commit() , I manually execute commands in mysql. If I don’t execute commit, I won’t be able to write. Ho...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2302/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2302/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2301
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2301/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2301/comments
https://api.github.com/repos/coleifer/peewee/issues/2301/events
https://github.com/coleifer/peewee/pull/2301
745,876,653
MDExOlB1bGxSZXF1ZXN0NTIzMzY1MTcw
2,301
Fix ModelSelect.get() documentation
{ "login": "ilyakamens", "id": 3293811, "node_id": "MDQ6VXNlcjMyOTM4MTE=", "avatar_url": "https://avatars.githubusercontent.com/u/3293811?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ilyakamens", "html_url": "https://github.com/ilyakamens", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "http://docs.peewee-orm.com/en/latest/peewee/api.html#Model.get" ]
2020-11-18T17:48:21
2020-11-18T23:01:39
2020-11-18T23:01:37
CONTRIBUTOR
null
``` In [4]: (Transaction.select().where(Transaction.id == 999999)).get() --------------------------------------------------------------------------- IndexError Traceback (most recent call last) /usr/local/lib/python3.7/site-packages/peewee.py in get(self, database) 6806 tr...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2301/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2301/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2301", "html_url": "https://github.com/coleifer/peewee/pull/2301", "diff_url": "https://github.com/coleifer/peewee/pull/2301.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2301.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2300
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2300/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2300/comments
https://api.github.com/repos/coleifer/peewee/issues/2300/events
https://github.com/coleifer/peewee/issues/2300
745,592,118
MDU6SXNzdWU3NDU1OTIxMTg=
2,300
help me BinaryField query
{ "login": "cbingos", "id": 2985444, "node_id": "MDQ6VXNlcjI5ODU0NDQ=", "avatar_url": "https://avatars.githubusercontent.com/u/2985444?v=4", "gravatar_id": "", "url": "https://api.github.com/users/cbingos", "html_url": "https://github.com/cbingos", "followers_url": "https://api.github.com/users/cbingos/...
[]
closed
false
null
[]
null
[ "Questions belong on stack overflow or you can ask in IRC. This is covered here: http://docs.peewee-orm.com/en/latest/peewee/contributing.html#questions\r\n\r\nI'm not sure what you mean by \"query the gdmc field\", so I'm guessing you mean test it's value?\r\n\r\n```python\r\n\r\n# test if the \"gdmc\" field equal...
2020-11-18T11:50:06
2020-11-18T14:16:04
2020-11-18T14:15:51
NONE
null
Sorry to help here: How to query the “gdmc“ field in List ? **`sdgdList = BinaryJSONField(verbose_name="sdgdList",null=True,)`** **`sdgdList List `** ` [{"x": "1", "cgs": "11.00", "gbxz": "A", "gdmc": "aaa", "zjqk": "0.48", "zzgs": "0.18", "zjqkCss": "red", "gdblockid": "10",}, {"x": "2", "cgs": "10.06", ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2300/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2300/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2299
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2299/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2299/comments
https://api.github.com/repos/coleifer/peewee/issues/2299/events
https://github.com/coleifer/peewee/issues/2299
742,479,073
MDU6SXNzdWU3NDI0NzkwNzM=
2,299
Parameter validators in fields?
{ "login": "ghost", "id": 10137, "node_id": "MDQ6VXNlcjEwMTM3", "avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ghost", "html_url": "https://github.com/ghost", "followers_url": "https://api.github.com/users/ghost/followers", "f...
[]
closed
false
null
[]
null
[ "Going to pass. Presumably you are validating untrusted user input in the input layer, or relying on database constraints for the sql layer." ]
2020-11-13T14:14:30
2020-11-13T14:35:31
2020-11-13T14:35:31
NONE
null
Maybe you should add validators to the fields? To check whether the value added to the database matches the value that is set? Just like Django
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2299/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2299/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2298
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2298/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2298/comments
https://api.github.com/repos/coleifer/peewee/issues/2298/events
https://github.com/coleifer/peewee/issues/2298
740,659,801
MDU6SXNzdWU3NDA2NTk4MDE=
2,298
Support "on_conflict" in bulk_create
{ "login": "albatros69", "id": 5740149, "node_id": "MDQ6VXNlcjU3NDAxNDk=", "avatar_url": "https://avatars.githubusercontent.com/u/5740149?v=4", "gravatar_id": "", "url": "https://api.github.com/users/albatros69", "html_url": "https://github.com/albatros69", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "This came up recently and it is not something I plan to support. See:\r\n\r\nhttps://github.com/coleifer/peewee/issues/2275", "OK, thanks anyway for the answer and support and sorry to have overlooked the existing issue (only looked for the opened ones, I admit).\r\n", "No problem. Like I said in the last issu...
2020-11-11T10:37:20
2020-11-11T12:49:06
2020-11-11T12:41:31
NONE
null
Hello, I was trying to take advantage of `bulk_create` (and its batch-support) to insert a lot of new objects. However, unlike `insert_many`, I didn't find a way to specify the `on_conflict` behavior to handle duplicate key errors. Would this be a possible feature to add?
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2298/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2298/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2297
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2297/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2297/comments
https://api.github.com/repos/coleifer/peewee/issues/2297/events
https://github.com/coleifer/peewee/issues/2297
740,647,833
MDU6SXNzdWU3NDA2NDc4MzM=
2,297
Select by tuple in values
{ "login": "ak4nv", "id": 73960, "node_id": "MDQ6VXNlcjczOTYw", "avatar_url": "https://avatars.githubusercontent.com/u/73960?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ak4nv", "html_url": "https://github.com/ak4nv", "followers_url": "https://api.github.com/users/ak4nv/followers", "f...
[]
closed
false
null
[]
null
[ "See: http://docs.peewee-orm.com/en/latest/peewee/query_operators.html#row-values" ]
2020-11-11T10:19:26
2020-11-11T12:51:04
2020-11-11T12:51:04
NONE
null
Hi there! I haven't found in the docs (maybe missed, sorry). Is it possible to make a query like this: ```sql select * from table where (field1, field2) in (('a', 'b'), ('a', 'c'), ('b', 'c')); ``` Thanks a lot for the greatest library! p.s. Waiting for `asyncio` support out of the box, don't suggest please thi...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2297/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2297/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2296
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2296/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2296/comments
https://api.github.com/repos/coleifer/peewee/issues/2296/events
https://github.com/coleifer/peewee/issues/2296
740,142,992
MDU6SXNzdWU3NDAxNDI5OTI=
2,296
ImportWarning on PooledPostgresqlExtDatabase
{ "login": "alecgerona", "id": 6406447, "node_id": "MDQ6VXNlcjY0MDY0NDc=", "avatar_url": "https://avatars.githubusercontent.com/u/6406447?v=4", "gravatar_id": "", "url": "https://api.github.com/users/alecgerona", "html_url": "https://github.com/alecgerona", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "That's odd. The line you're referencing, 305, is wrapped in a try/except on `ImportError`, as is the code in `sqlite_ext.py` which attempts to import from the C extension. This doesn't seem to be an error, but rather a warning?\r\n\r\nThe `pyx` file is the cython source file, which gets compiled into a C extension...
2020-11-10T18:28:20
2021-03-09T13:00:59
2020-11-10T19:45:17
NONE
null
Hi all so we're using the query builder feature (not the ORM at all) of peewee and it's been great so far. Been using it with fastapi and it's been working great until the 3.14.0 update. Now we're getting the following issue: ``` tests/test_lib/integration/test_pagination.py:3: in <module> from app.user.models ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2296/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2296/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2295
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2295/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2295/comments
https://api.github.com/repos/coleifer/peewee/issues/2295/events
https://github.com/coleifer/peewee/issues/2295
740,130,116
MDU6SXNzdWU3NDAxMzAxMTY=
2,295
The chain of joins with None fields
{ "login": "andr-04", "id": 2203770, "node_id": "MDQ6VXNlcjIyMDM3NzA=", "avatar_url": "https://avatars.githubusercontent.com/u/2203770?v=4", "gravatar_id": "", "url": "https://api.github.com/users/andr-04", "html_url": "https://github.com/andr-04", "followers_url": "https://api.github.com/users/andr-04/...
[]
closed
false
null
[]
null
[ "Yes, this was a design decision. If you omit the model how will you traverse the graph?", "I can't continue traversing the graph if some _node_ will have all fields equal to None. But it gives the wrong info that the node (model) _exists_. So, this decision doesn't give benefits.\r\n\r\nFor traversing I use the ...
2020-11-10T18:07:36
2020-11-10T19:09:20
2020-11-10T18:24:27
NONE
null
I've found unexpected behavior due to [this](https://github.com/coleifer/peewee/commit/6bdcd7dc3800654ba034d03b3e7dc01971388e34#r44050928). In case of join to a base model, joined model (but absent; through `LEFT JOIN`) to the field will not be None unless it is the last in the join chain. Models with all fields equal ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2295/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2295/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2294
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2294/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2294/comments
https://api.github.com/repos/coleifer/peewee/issues/2294/events
https://github.com/coleifer/peewee/issues/2294
739,943,994
MDU6SXNzdWU3Mzk5NDM5OTQ=
2,294
get_id() method returns the foreign key instead of the primary key of model instance
{ "login": "theosotr", "id": 6434138, "node_id": "MDQ6VXNlcjY0MzQxMzg=", "avatar_url": "https://avatars.githubusercontent.com/u/6434138?v=4", "gravatar_id": "", "url": "https://api.github.com/users/theosotr", "html_url": "https://github.com/theosotr", "followers_url": "https://api.github.com/users/theos...
[]
closed
false
null
[]
null
[ "You're joining on `B` but you're selecting from `B_al`. The following works just fine for me:\r\n\r\n```python\r\nfrom peewee import *\r\n\r\ndb = SqliteDatabase(':memory:')\r\nclass Base(Model):\r\n class Meta:\r\n database = db\r\n\r\nclass A(Base):\r\n a = IntegerField()\r\n\r\nclass B(Base):\r\n ...
2020-11-10T14:12:45
2020-11-10T16:20:30
2020-11-10T14:33:35
NONE
null
I have the following query (simplified for opening the issue) ``` python B_al = B.alias() ret = A.select(B_al.id, A.id) ret = ret.switch(A).join(B).objects() for r in ret: print(r.get_id()) ``` Unfortunately, the method `get_id()` unexpectedly returns the foreign key of the table (i.e., B.id) instead o...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2294/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2294/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2293
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2293/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2293/comments
https://api.github.com/repos/coleifer/peewee/issues/2293/events
https://github.com/coleifer/peewee/issues/2293
738,220,570
MDU6SXNzdWU3MzgyMjA1NzA=
2,293
positional argument is ignored by `Model.filter()`
{ "login": "Incanus3", "id": 82725, "node_id": "MDQ6VXNlcjgyNzI1", "avatar_url": "https://avatars.githubusercontent.com/u/82725?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Incanus3", "html_url": "https://github.com/Incanus3", "followers_url": "https://api.github.com/users/Incanus3/foll...
[]
closed
false
null
[]
null
[ "Thanks, this is a bad regression. I've patched this and will make a new release early in the week.", "Scratch that, never put off til tomorrow what you can do today, and all that.\r\n\r\nI've tagged and released a new version 3.14, which contains this fix. Thanks again for the excellent bug report.", "wow, tha...
2020-11-07T11:01:59
2020-11-08T09:24:38
2020-11-07T18:28:53
NONE
null
Hi, I've just run into this issue. This is the query building code: ```python BillItem.filter(~DQ(id = orig_bill_item.id), subtable = orig_bill_item.subtable, product_ident = orig_bill_item.product_ident) ``` But when I run this, the first param is completely ignored. This can...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2293/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2293/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2292
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2292/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2292/comments
https://api.github.com/repos/coleifer/peewee/issues/2292/events
https://github.com/coleifer/peewee/issues/2292
737,129,149
MDU6SXNzdWU3MzcxMjkxNDk=
2,292
bulk_update throws error when setting array field to None
{ "login": "bdoms", "id": 126839, "node_id": "MDQ6VXNlcjEyNjgzOQ==", "avatar_url": "https://avatars.githubusercontent.com/u/126839?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bdoms", "html_url": "https://github.com/bdoms", "followers_url": "https://api.github.com/users/bdoms/followers"...
[]
closed
false
null
[]
null
[ "psycopg2 uses \"%s\" for all parameter placeholders, and automatically converts `None` to `NULL` so I do not believe this is the issue. To be honest this one has me stumped, as entering the following into the postgres shell also fails with the same error:\r\n\r\n```sql\r\nupdate users \r\nset emails = case users.i...
2020-11-05T17:31:55
2020-11-06T16:00:42
2020-11-06T02:58:03
NONE
null
Here's the situation: I have a model that has an array field where `null=True`. Something like this: ```python class User(Model): emails = ArrayField(CharField, null=True) ``` That's all good, but when I do this: ```python user = User.create(emails=None) # or get it from a query, etc. User.bulk_upda...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2292/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2292/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2291
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2291/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2291/comments
https://api.github.com/repos/coleifer/peewee/issues/2291/events
https://github.com/coleifer/peewee/issues/2291
736,817,549
MDU6SXNzdWU3MzY4MTc1NDk=
2,291
'Expression' object has no attribute 'seconds'
{ "login": "ahvahsky2008", "id": 8035828, "node_id": "MDQ6VXNlcjgwMzU4Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/8035828?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ahvahsky2008", "html_url": "https://github.com/ahvahsky2008", "followers_url": "https://api.github.com...
[]
closed
false
null
[]
null
[ "You're overthinking this. It is quite simple:\r\n\r\n```python\r\n\r\ncutoff = datetime.datetime.now() - datetime.timedelta(minutes=60)\r\nquery = Zayavki.select().where(Zayavki.req_data >= cutoff)\r\n```\r\n\r\nAs to why this doesn't work, you cannot access the \".seconds\" attribute on a peewee expression, as th...
2020-11-05T10:40:01
2020-11-05T14:29:44
2020-11-05T14:29:44
NONE
null
I try get data with creation time more 60 mins. But its show error ``` hour = datetime.datetime.now() - datetime.timedelta(minutes = 60) zayavkis =Zayavki.select().where(Zayavki.req_data-hour).seconds/60>60) ```
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2291/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2291/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2290
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2290/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2290/comments
https://api.github.com/repos/coleifer/peewee/issues/2290/events
https://github.com/coleifer/peewee/issues/2290
736,114,651
MDU6SXNzdWU3MzYxMTQ2NTE=
2,290
Peewee constantly reruns select count in PyCharm REPL
{ "login": "dominusmi", "id": 11195159, "node_id": "MDQ6VXNlcjExMTk1MTU5", "avatar_url": "https://avatars.githubusercontent.com/u/11195159?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dominusmi", "html_url": "https://github.com/dominusmi", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "Pycharm is probably calling all kinds of stuff. Specifically it's probably evaluating the truthiness or len(). Definitely not a peewee bug. I'd take it up with the pycharm folks.\r\n\r\nUsing a regular python repl or ipython has no problems at all.", "Alright thanks for the feedback!" ]
2020-11-04T13:27:33
2020-11-04T13:44:14
2020-11-04T13:37:28
NONE
null
In the pycharm REPL, once a database model is imported, it will keep running a select count after each instruction execution. Putting the logger on debug mode, this message appears for each model loaded: ```DEBUG::peewee.py:3087::('SELECT COUNT(1) FROM (SELECT 1 FROM `Model` AS `t1`) AS `_wrapped`', [])``` The p...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2290/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2290/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2289
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2289/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2289/comments
https://api.github.com/repos/coleifer/peewee/issues/2289/events
https://github.com/coleifer/peewee/issues/2289
733,088,950
MDU6SXNzdWU3MzMwODg5NTA=
2,289
Using CTE in a UNION ALL query
{ "login": "8BitMate", "id": 14078867, "node_id": "MDQ6VXNlcjE0MDc4ODY3", "avatar_url": "https://avatars.githubusercontent.com/u/14078867?v=4", "gravatar_id": "", "url": "https://api.github.com/users/8BitMate", "html_url": "https://github.com/8BitMate", "followers_url": "https://api.github.com/users/8Bi...
[]
closed
false
null
[]
null
[ "Can you share the SQL for the query you're trying to write? It might be easier for me to help you work backwards from that.", "Sure, I'm trying to write something like this:\r\n\r\n```SQL\r\nWITH vehicle_insert (id) AS (\r\n INSERT INTO vehicle (uid, type_id, provider_id)\r\n VALUES ('Some:ID', 2, 3)\r\n ...
2020-10-30T11:13:27
2020-10-31T03:31:42
2020-10-31T03:31:42
NONE
null
I'm trying to use a CTE on the top level of a UNION ALL query, but I can't figure out how to do it in peewee. The functionality I'm trying to achieve is an "INSERT INTO ... ON CONFLICT DO NOTHING RETURNING ..." query where it always returns the value(s) even when it already exists. The peewee code I'm using looks so...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2289/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2289/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2288
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2288/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2288/comments
https://api.github.com/repos/coleifer/peewee/issues/2288/events
https://github.com/coleifer/peewee/pull/2288
730,664,165
MDExOlB1bGxSZXF1ZXN0NTEwOTMxNTU3
2,288
Fix typo in querying docs
{ "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
[ "merged an equivalent patch" ]
2020-10-27T17:26:55
2020-10-27T18:29:25
2020-10-27T18:29:25
NONE
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2288/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2288/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2288", "html_url": "https://github.com/coleifer/peewee/pull/2288", "diff_url": "https://github.com/coleifer/peewee/pull/2288.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2288.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2287
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2287/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2287/comments
https://api.github.com/repos/coleifer/peewee/issues/2287/events
https://github.com/coleifer/peewee/issues/2287
730,294,359
MDU6SXNzdWU3MzAyOTQzNTk=
2,287
peewee AttributeError 'datetime.datetime' object has no attribute 'get_sort_key'
{ "login": "hungter007", "id": 32872324, "node_id": "MDQ6VXNlcjMyODcyMzI0", "avatar_url": "https://avatars.githubusercontent.com/u/32872324?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hungter007", "html_url": "https://github.com/hungter007", "followers_url": "https://api.github.com/use...
[]
closed
false
null
[]
null
[ "I don't have enough information to help debug this. Can you provide the query?", "('INSERT INTO `t_group` (`c_id`, `c_group_name`, `c_group_code`, `c_doc_ids`, `c_company_id`, `c_is_delete`, `c_add_by`, `c_add_dt`, `c_update_dt`) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)', ['185ede639b654695869c87b28d31b28d', ...
2020-10-27T09:57:58
2020-10-27T12:05:29
2020-10-27T12:05:28
NONE
null
peewee version: 3.13.3 python version: py3.8 error: ![image](https://user-images.githubusercontent.com/32872324/97285859-b9ac7d80-187d-11eb-93aa-1bafec0024ca.png) model: add_dt = peewee.DateTimeField(null=False, default=datetime_now, column_name="c_add_dt")
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2287/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2287/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2286
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2286/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2286/comments
https://api.github.com/repos/coleifer/peewee/issues/2286/events
https://github.com/coleifer/peewee/issues/2286
729,413,268
MDU6SXNzdWU3Mjk0MTMyNjg=
2,286
Database(autoconnect=True) is not thread-safe
{ "login": "notEvil", "id": 4567628, "node_id": "MDQ6VXNlcjQ1Njc2Mjg=", "avatar_url": "https://avatars.githubusercontent.com/u/4567628?v=4", "gravatar_id": "", "url": "https://api.github.com/users/notEvil", "html_url": "https://github.com/notEvil", "followers_url": "https://api.github.com/users/notEvil/...
[]
closed
false
null
[]
null
[ "By default peewee databases use a connection-per-thread." ]
2020-10-26T09:47:58
2020-10-26T12:53:02
2020-10-26T12:53:02
NONE
null
In `Database.cursor`, `self.connect()` may be attempted by multiple threads and even though the first one will create the connection, all others will get an `OperationalError` due to `connect(reuse_if_open=False)`. I'm not familiar enough with the code to say that this is the only place where `reuse_if_open` should ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2286/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2286/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2285
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2285/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2285/comments
https://api.github.com/repos/coleifer/peewee/issues/2285/events
https://github.com/coleifer/peewee/issues/2285
728,952,429
MDU6SXNzdWU3Mjg5NTI0Mjk=
2,285
peewee.ImproperlyConfigured: database attribute does not appear to be set on the model: <Model: Branch>
{ "login": "medoosh79", "id": 72854950, "node_id": "MDQ6VXNlcjcyODU0OTUw", "avatar_url": "https://avatars.githubusercontent.com/u/72854950?v=4", "gravatar_id": "", "url": "https://api.github.com/users/medoosh79", "html_url": "https://github.com/medoosh79", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "First off, please take the time to format your code properly. GitHub has links and controls in the editor that will show you how to do this.\r\n\r\nSecond, please see the documentation. This is covered in all the basic examples.\r\n\r\nhttp://docs.peewee-orm.com/en/latest/peewee/quickstart.html#model-definition\r\...
2020-10-25T06:26:38
2020-10-25T11:22:19
2020-10-25T11:21:52
NONE
null
from peewee import * db = MySQLDatabase('library',user='root', password= '', host='localhost', port=3306 ) class Branch(Model): name = CharField() code = CharField(null=True,unique=True) location = CharField(null=True) db.connect() db.create_tables([Branch]) how to solve th...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2285/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2285/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2284
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2284/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2284/comments
https://api.github.com/repos/coleifer/peewee/issues/2284/events
https://github.com/coleifer/peewee/pull/2284
727,541,905
MDExOlB1bGxSZXF1ZXN0NTA4NDE1MDEz
2,284
Use link_shared_object instead of link_executable in SQLite detection
{ "login": "sboisson", "id": 238806, "node_id": "MDQ6VXNlcjIzODgwNg==", "avatar_url": "https://avatars.githubusercontent.com/u/238806?v=4", "gravatar_id": "", "url": "https://api.github.com/users/sboisson", "html_url": "https://github.com/sboisson", "followers_url": "https://api.github.com/users/sboisso...
[]
closed
false
null
[]
null
[ "Excellent, thank you!" ]
2020-10-22T16:27:19
2020-10-22T16:44:57
2020-10-22T16:44:57
CONTRIBUTOR
null
`link_executable` doesn't use environment variable `LDFLAGS`, only environment variable `CC` (which usually only contains the name of the compiler, not the linking options)… which can be problematic and cause false negative on setups where SQLite is not installed in system path, but on a custom path. Also the setup ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2284/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2284/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2284", "html_url": "https://github.com/coleifer/peewee/pull/2284", "diff_url": "https://github.com/coleifer/peewee/pull/2284.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2284.patch", "merged_at": "2020-10-22T16:44:57" }
https://api.github.com/repos/coleifer/peewee/issues/2283
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2283/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2283/comments
https://api.github.com/repos/coleifer/peewee/issues/2283/events
https://github.com/coleifer/peewee/issues/2283
724,693,259
MDU6SXNzdWU3MjQ2OTMyNTk=
2,283
foreign key with "_id" in the migrate.add_index
{ "login": "alpo", "id": 977573, "node_id": "MDQ6VXNlcjk3NzU3Mw==", "avatar_url": "https://avatars.githubusercontent.com/u/977573?v=4", "gravatar_id": "", "url": "https://api.github.com/users/alpo", "html_url": "https://github.com/alpo", "followers_url": "https://api.github.com/users/alpo/followers", ...
[]
closed
false
null
[]
null
[ "I cannot replicate this problem:\r\n\r\n```python\r\n\r\nfrom peewee import *\r\n\r\ndb = SqliteDatabase(':memory:')\r\n\r\nclass Base(Model):\r\n class Meta:\r\n database = db\r\n\r\nclass User(Base):\r\n username = TextField()\r\n\r\nclass Tweet(Base):\r\n user_id = ForeignKeyField(User, backref=...
2020-10-19T14:41:04
2020-10-19T15:57:07
2020-10-19T15:57:06
NONE
null
I have a foreign key in the ORM object and in the database with name ending with '_id'. Like this: ``` class Thing(BaseThing): master_id = ForeignKeyField(AnotherThing, backref='details', index=True) other_field = BigIntegerField(index=True) ... ``` and I'm trying to create an index in migration u...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2283/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2283/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2282
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2282/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2282/comments
https://api.github.com/repos/coleifer/peewee/issues/2282/events
https://github.com/coleifer/peewee/issues/2282
723,141,094
MDU6SXNzdWU3MjMxNDEwOTQ=
2,282
JSON/dict integer keys getting converted to strings when read.
{ "login": "pydatasci-repos", "id": 71051965, "node_id": "MDQ6VXNlcjcxMDUxOTY1", "avatar_url": "https://avatars.githubusercontent.com/u/71051965?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pydatasci-repos", "html_url": "https://github.com/pydatasci-repos", "followers_url": "https://api...
[]
closed
false
null
[]
null
[ "Just going to read it with `folds = {int(k):v for k,v in folds.items()}` when I need that attribute.\r\n\r\nMakes me think of this:\r\n![image](https://user-images.githubusercontent.com/71051965/96255136-6a647400-0f84-11eb-9590-7d7185976284.png)", "What database are you using? Postgres, Sqlite or MySQL?", "@co...
2020-10-16T11:34:03
2020-10-16T18:38:54
2020-10-16T15:41:55
NONE
null
Here, I have provided a dictionary with integer-based keys `{0:_,1:_,2:_}` to a `JSONField()` attribute named 'folds'. When I create the object and return it, the folds attribute still serializes with integer keys as expected. However, when I fetch the object using `get_by_id()`, the `folds.keys()` are now string...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2282/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2282/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2281
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2281/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2281/comments
https://api.github.com/repos/coleifer/peewee/issues/2281/events
https://github.com/coleifer/peewee/issues/2281
719,177,130
MDU6SXNzdWU3MTkxNzcxMzA=
2,281
peewee.ModelBase has no attribute 'bulk_update'
{ "login": "instantrad", "id": 66900828, "node_id": "MDQ6VXNlcjY2OTAwODI4", "avatar_url": "https://avatars.githubusercontent.com/u/66900828?v=4", "gravatar_id": "", "url": "https://api.github.com/users/instantrad", "html_url": "https://github.com/instantrad", "followers_url": "https://api.github.com/use...
[]
closed
false
null
[]
null
[ "```python\r\nIn [1]: from peewee import * \r\n\r\nIn [2]: class MyModel(Model): \r\n ...: pass \r\n ...: \r\n\r\nIn [3]: MyModel.bulk_update ...
2020-10-12T08:23:59
2020-10-12T12:45:21
2020-10-12T12:45:21
NONE
null
As you can see below, when l print type of the peewee model, l get **<class 'peewee.ModelBase'>** However, it complains bulk_update does not exist. Also running dir on the Model class, does not contain the **bulk_update** [2020-10-12 08:20:36,241] {test.py:250} INFO - <class 'peewee.ModelBase'> [2020-10-12 08:30:...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2281/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2281/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2280
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2280/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2280/comments
https://api.github.com/repos/coleifer/peewee/issues/2280/events
https://github.com/coleifer/peewee/issues/2280
717,468,715
MDU6SXNzdWU3MTc0Njg3MTU=
2,280
Spurious SQL queries when creating tables
{ "login": "acepace", "id": 231135, "node_id": "MDQ6VXNlcjIzMTEzNQ==", "avatar_url": "https://avatars.githubusercontent.com/u/231135?v=4", "gravatar_id": "", "url": "https://api.github.com/users/acepace", "html_url": "https://github.com/acepace", "followers_url": "https://api.github.com/users/acepace/fo...
[]
closed
false
null
[]
null
[ "```python\r\n\r\nfrom peewee import * \r\n\r\ndb = SqliteDatabase(':memory:')\r\n\r\nimport logging\r\nlogger = logging.getLogger('peewee')\r\nlogger.addHandler(logging.StreamHandler())\r\nlogger.setLevel(logging.DEBUG)...
2020-10-08T15:55:08
2020-10-08T16:21:08
2020-10-08T16:21:08
NONE
null
The following code snippet creates an invalid SELECT query before creating tables, causing create_tables to fail. ``` psycopg2.extras.register_default_jsonb() database = PostgresqlExtDatabase('postgres', user=options.username, password=options.password, host=options....
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2280/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2280/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2279
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2279/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2279/comments
https://api.github.com/repos/coleifer/peewee/issues/2279/events
https://github.com/coleifer/peewee/pull/2279
716,498,792
MDExOlB1bGxSZXF1ZXN0NDk5MjI0NTE2
2,279
Enable use of range for IN filters in python 3
{ "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
[ "I've merged an equivalent patch. I had hoped to also support `map` but that's more like a generator and doesn't support multiple iterations, so that doesn't work. At any rate, thanks for the suggestion." ]
2020-10-07T12:47:41
2020-10-07T13:43:56
2020-10-07T13:43:27
CONTRIBUTOR
null
While it is currently possible to do something like `Model.select().where(Model.id << range(42, 256))` in Python 2, this is not possible in Python3. The reason being, that `range()` returns a `list` in Python 2, which is currently a member of `Value._multi_types`, but is of type `range` in Python 3. Therefor I ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2279/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2279/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2279", "html_url": "https://github.com/coleifer/peewee/pull/2279", "diff_url": "https://github.com/coleifer/peewee/pull/2279.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2279.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2278
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2278/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2278/comments
https://api.github.com/repos/coleifer/peewee/issues/2278/events
https://github.com/coleifer/peewee/pull/2278
716,411,268
MDExOlB1bGxSZXF1ZXN0NDk5MTUyODM5
2,278
GeneratedHashField
{ "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
[ "F-Strings are not supported in Python 2.x and Python 3 < 3.6.\r\nThis is why the check fails.", "I see that, thanks! :+1: Didn't think it was worth fixing right away since I imagine changes will be needed anyway, if this is at all even wanted. ", "I'm not interested in maintaining or supporting this, but feel...
2020-10-07T10:38:54
2020-10-09T07:44:57
2020-10-07T13:34:42
NONE
null
Hi! :wave: First, thank you so much for such a great library. :+1: Feature request :ribbon: --- I would like to make use of PostgreSQL's `GENERATED ALWAYS AS` statement, for computing a hashed key based on one or more other fields. Specifically for a generating a hash Solution :question: --- I've provi...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2278/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2278/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2278", "html_url": "https://github.com/coleifer/peewee/pull/2278", "diff_url": "https://github.com/coleifer/peewee/pull/2278.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2278.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2277
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2277/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2277/comments
https://api.github.com/repos/coleifer/peewee/issues/2277/events
https://github.com/coleifer/peewee/issues/2277
716,402,167
MDU6SXNzdWU3MTY0MDIxNjc=
2,277
delete().execute() on model object deletes all records from the table.
{ "login": "p1v2", "id": 13005815, "node_id": "MDQ6VXNlcjEzMDA1ODE1", "avatar_url": "https://avatars.githubusercontent.com/u/13005815?v=4", "gravatar_id": "", "url": "https://api.github.com/users/p1v2", "html_url": "https://github.com/p1v2", "followers_url": "https://api.github.com/users/p1v2/followers"...
[]
closed
false
null
[]
null
[ "To delete a single model instance, you should use `.delete_instance()`.\r\n\r\nThe documentation covers this in detail: http://docs.peewee-orm.com/en/latest/peewee/querying.html#deleting-records" ]
2020-10-07T10:25:06
2020-10-07T13:33:31
2020-10-07T13:33:31
NONE
null
Hey. Recently I ran into issue, when accidentally dropping all records from the table. if we have: ``` from peewee import Model class Entity(Model): # fields list pass # entity is single record from DB entity = Entity.select()[0] # entity delete is query that deletes all records in table # nex...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2277/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 1, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2277/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2276
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2276/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2276/comments
https://api.github.com/repos/coleifer/peewee/issues/2276/events
https://github.com/coleifer/peewee/issues/2276
715,871,477
MDU6SXNzdWU3MTU4NzE0Nzc=
2,276
KeyError when trying to dynamically add pre-existing field with a new default
{ "login": "bdoms", "id": 126839, "node_id": "MDQ6VXNlcjEyNjgzOQ==", "avatar_url": "https://avatars.githubusercontent.com/u/126839?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bdoms", "html_url": "https://github.com/bdoms", "followers_url": "https://api.github.com/users/bdoms/followers"...
[]
closed
false
null
[]
null
[ "The default is only removed if the original field instance has a default, so this seems like something that only would come about in a very weird way. Going to pass on any changes." ]
2020-10-06T17:16:31
2020-10-06T20:02:02
2020-10-06T20:02:02
NONE
null
This is a funny situation, but essentially I'm trying to dynamically rebuild a database. It starts with a call to `generate_models` (which is totally amazing, thank you!) but that does not include any defaults. In order to add them back in, I'm looping through the fields and adding the default on the fly. Rather than m...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2276/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2276/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2275
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2275/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2275/comments
https://api.github.com/repos/coleifer/peewee/issues/2275/events
https://github.com/coleifer/peewee/issues/2275
708,880,331
MDU6SXNzdWU3MDg4ODAzMzE=
2,275
on_conflict support in bulk_create
{ "login": "AntonioL", "id": 13491207, "node_id": "MDQ6VXNlcjEzNDkxMjA3", "avatar_url": "https://avatars.githubusercontent.com/u/13491207?v=4", "gravatar_id": "", "url": "https://api.github.com/users/AntonioL", "html_url": "https://github.com/AntonioL", "followers_url": "https://api.github.com/users/Ant...
[]
closed
false
null
[]
null
[ "I'm going to pass on implementing this as part of `bulk_create()` since this can be easily handled by:\r\n\r\n```python\r\nModel.insert_many([....]).on_conflict_ignore()\r\n```\r\n\r\nThe problem arises w/postgres where the insert cursor returns IDs only for the rows that are created, which can't be mapped back to...
2020-09-25T11:59:27
2020-09-25T18:49:14
2020-09-25T18:49:13
NONE
null
Please provide mechanism to ignore conflicts when calling bulk_create. My target database is PostgreSQL. At th moment I am handrolling my own query.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2275/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2275/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2274
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2274/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2274/comments
https://api.github.com/repos/coleifer/peewee/issues/2274/events
https://github.com/coleifer/peewee/issues/2274
708,427,993
MDU6SXNzdWU3MDg0Mjc5OTM=
2,274
Documentation - Example of `choices` parameter.
{ "login": "ghost", "id": 10137, "node_id": "MDQ6VXNlcjEwMTM3", "avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ghost", "html_url": "https://github.com/ghost", "followers_url": "https://api.github.com/users/ghost/followers", "f...
[]
closed
false
null
[]
null
[ "That's not the correct way. An iterable of 2-tuples looks like this:\r\n\r\n```python\r\n[('key1', 'Label 1'), ('key2', 'Label 2')]\r\n```" ]
2020-09-24T19:42:48
2020-09-24T22:26:48
2020-09-24T22:26:48
NONE
null
Hey there. Thank you for the simple ORM! It's ideal for a pypi package I am building that has no django/flask gui. Do have an example of `choices=[(),()]` that could be added to the docs? It is not clear to me. ``` choices (list) – An iterable of 2-tuples mapping column values to display labels. http://docs.p...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2274/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2274/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2273
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2273/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2273/comments
https://api.github.com/repos/coleifer/peewee/issues/2273/events
https://github.com/coleifer/peewee/issues/2273
706,403,507
MDU6SXNzdWU3MDY0MDM1MDc=
2,273
peewee saves value of foreign key field wrongly
{ "login": "hamidb80", "id": 33871336, "node_id": "MDQ6VXNlcjMzODcxMzM2", "avatar_url": "https://avatars.githubusercontent.com/u/33871336?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hamidb80", "html_url": "https://github.com/hamidb80", "followers_url": "https://api.github.com/users/ham...
[]
closed
false
null
[]
null
[ "I think you've got some issue with your code, your base model class, or something. What you're suggesting is that peewee is somehow fundamentally broken, and the tests are all passing:\r\n\r\nhttps://travis-ci.org/github/coleifer/peewee" ]
2020-09-22T13:50:32
2020-09-23T03:25:30
2020-09-22T20:19:27
NONE
null
Hello. I think peewee saves the value of foreign key wrongly. Because: user.id is an integer but in the token records, `user_id` saves as "t<user_id>". ```python class User(BaseModel): name = CharField() identifier = CharField(index=True, unique=True) email = CharField(unique=True) passwor...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2273/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2273/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2272
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2272/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2272/comments
https://api.github.com/repos/coleifer/peewee/issues/2272/events
https://github.com/coleifer/peewee/issues/2272
706,283,272
MDU6SXNzdWU3MDYyODMyNzI=
2,272
Join multiple foreign keys on same table.
{ "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
[ "You should not call `.select()` twice. Just build up your joins. I suggest you familiarize yourself with the documentation, which covers many topics like querying and joins:\r\n\r\n* http://docs.peewee-orm.com/en/latest/peewee/querying.html\r\n* http://docs.peewee-orm.com/en/latest/peewee/relationships.html\r\n\r\...
2020-09-22T11:04:34
2020-09-22T20:17:42
2020-09-22T20:16:40
CONTRIBUTOR
null
I have a use case, where I need to join a table that has two foreign keys on another table to this table: ``` COND_DEPLOYMENT = (System.deployment == Deployment.id).alias('deployment') COND_DATASET = (System.dataset == Deployment.id).alias('dataset') SYSTEMS = System.select().join( Deployment, on=COND_DEPLOY...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2272/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2272/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2271
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2271/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2271/comments
https://api.github.com/repos/coleifer/peewee/issues/2271/events
https://github.com/coleifer/peewee/issues/2271
704,614,498
MDU6SXNzdWU3MDQ2MTQ0OTg=
2,271
Request: Option to disable numbered table name aliases (t1, t2, t3... etc)
{ "login": "ibushong", "id": 9298422, "node_id": "MDQ6VXNlcjkyOTg0MjI=", "avatar_url": "https://avatars.githubusercontent.com/u/9298422?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ibushong", "html_url": "https://github.com/ibushong", "followers_url": "https://api.github.com/users/ibush...
[]
closed
false
null
[]
null
[ "I don't have any plans to add such, but you are welcome to write a monkey-patch for AliasManager.add and maintain it separately for your own debugging purposes." ]
2020-09-18T19:46:15
2020-09-18T20:13:45
2020-09-18T20:13:45
NONE
null
Is it possible to add an option to disable the automatic mapping of table names to numbered aliases? When debugging/reading raw queries, it's much easier to read something like ``WHERE (`mytable`.`name` == 'foo')`` instead of ``WHERE (`t3`.`name` == 'foo')`` quick hack: ```python class AliasManager(object): ....
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2271/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2271/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2270
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2270/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2270/comments
https://api.github.com/repos/coleifer/peewee/issues/2270/events
https://github.com/coleifer/peewee/issues/2270
702,460,602
MDU6SXNzdWU3MDI0NjA2MDI=
2,270
Next result cached in Select.iterator()
{ "login": "jacobian91", "id": 26308586, "node_id": "MDQ6VXNlcjI2MzA4NTg2", "avatar_url": "https://avatars.githubusercontent.com/u/26308586?v=4", "gravatar_id": "", "url": "https://api.github.com/users/jacobian91", "html_url": "https://github.com/jacobian91", "followers_url": "https://api.github.com/use...
[]
closed
false
null
[]
null
[ "If you read the peewee code for `CursorWrapper` you will see that peewee is not eagerly fetching anything. The behavior you are seeing is a side-effect of the interaction between pysqlite (the stdlib sqlite driver) and how sqlite operates. You can see that [here](https://github.com/coleifer/pysqlite3/blob/master/s...
2020-09-16T05:20:54
2020-09-16T15:56:24
2020-09-16T13:19:19
NONE
null
I ran into an unexpected behavior that didn't seem to match what _I assume_ the documentation is saying. In the documentation under [Iterating over large result-sets](http://docs.peewee-orm.com/en/latest/peewee/querying.html#iterating-over-large-result-sets) it states: > To reduce the amount of memory used by pe...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2270/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2270/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2269
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2269/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2269/comments
https://api.github.com/repos/coleifer/peewee/issues/2269/events
https://github.com/coleifer/peewee/issues/2269
702,460,112
MDU6SXNzdWU3MDI0NjAxMTI=
2,269
Saving `only` no fields saves all fields.
{ "login": "arel", "id": 153497, "node_id": "MDQ6VXNlcjE1MzQ5Nw==", "avatar_url": "https://avatars.githubusercontent.com/u/153497?v=4", "gravatar_id": "", "url": "https://api.github.com/users/arel", "html_url": "https://github.com/arel", "followers_url": "https://api.github.com/users/arel/followers", ...
[]
closed
false
null
[]
null
[ "Thanks, I've made the change as suggested (although it is `if only is not None`). Peewee is active-record so calling save with no data will raise a `ValueError`." ]
2020-09-16T05:19:45
2020-09-16T12:53:08
2020-09-16T12:52:41
NONE
null
## The issue I use the pattern of saving only fields that have changed in a model, as such: ```python obj.save(only=obj.dirty_fields) ``` However, if the `dirty_fields` value is an empty list, I would expect `save()` to save _no_ fields (i.e., be a no-op.) Instead, it saves _all_ the fields, which is counter...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2269/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2269/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2268
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2268/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2268/comments
https://api.github.com/repos/coleifer/peewee/issues/2268/events
https://github.com/coleifer/peewee/issues/2268
701,290,544
MDU6SXNzdWU3MDEyOTA1NDQ=
2,268
Please add support for enums
{ "login": "emdete", "id": 3251523, "node_id": "MDQ6VXNlcjMyNTE1MjM=", "avatar_url": "https://avatars.githubusercontent.com/u/3251523?v=4", "gravatar_id": "", "url": "https://api.github.com/users/emdete", "html_url": "https://github.com/emdete", "followers_url": "https://api.github.com/users/emdete/foll...
[]
closed
false
null
[]
null
[ "I have no plans at present to support this. It should be easy, if you so desire, to implement an `EnumField` as a separate class." ]
2020-09-14T17:29:55
2020-09-14T19:49:21
2020-09-14T19:49:21
NONE
null
Postgresql allows to create enum-types like ``` CREATE TYPE colors AS ENUM ('red', 'green', 'blue'); ``` which is quite useful. Its a feature i really would like to see supported in peewee. Thank you! :)
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2268/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2268/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2267
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2267/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2267/comments
https://api.github.com/repos/coleifer/peewee/issues/2267/events
https://github.com/coleifer/peewee/pull/2267
699,684,538
MDExOlB1bGxSZXF1ZXN0NDg1NDAxMDU3
2,267
Update SQLite max_variable_number info
{ "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 merged an equivalent patch w/slightly different wording." ]
2020-09-11T19:45:50
2020-09-12T00:18:20
2020-09-12T00:18:20
CONTRIBUTOR
null
Missed in #2263
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2267/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2267/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2267", "html_url": "https://github.com/coleifer/peewee/pull/2267", "diff_url": "https://github.com/coleifer/peewee/pull/2267.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2267.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2266
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2266/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2266/comments
https://api.github.com/repos/coleifer/peewee/issues/2266/events
https://github.com/coleifer/peewee/issues/2266
699,515,231
MDU6SXNzdWU2OTk1MTUyMzE=
2,266
Support Meta inheritance
{ "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
[ "The meta class is a weird kind of a hack inspired by similar deal in Django. The meta class is not what gets inherited, but instead the \"inheritable\" settings of the Meta class are inherited by the model.\r\n\r\nEx:\r\n\r\n```python\r\n\r\nclass BaseModel(Model):\r\n class Meta:\r\n database = db\r\n\r...
2020-09-11T16:34:10
2020-09-11T19:09:22
2020-09-11T18:24:52
CONTRIBUTOR
null
Would be nice if this worked: ```py class DefaultMeta: database = db ... class Foo(Model): ... class Meta(DefaultMeta): ... ``` Right now it silently ignores the `DefaultMeta` fields.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2266/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2266/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2265
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2265/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2265/comments
https://api.github.com/repos/coleifer/peewee/issues/2265/events
https://github.com/coleifer/peewee/issues/2265
699,482,941
MDU6SXNzdWU2OTk0ODI5NDE=
2,265
Add support for select clause in bulk_update
{ "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
[ "Since you are already explicitly specifying the `model_list` this seems redundant.", "It's not – think of my use case as \"defensive\" bulk updating of an attribute, for example allow only changes to `x` if `x` wasn't ever set and still has its default value of 0.\r\n\r\nI *think* this can be done in Django as f...
2020-09-11T15:59:56
2020-09-11T19:31:54
2020-09-11T19:07:30
CONTRIBUTOR
null
Add support for optional select clause in `bulk_update`, for example to allow for something like ```py foos = [... list of Foos ...] # Only allow updates to x when x=0. nchanged = Foo.bulk_update(foos, [Foo.x], q=(Foo.x == 0)) if nchanged != len(foos): raise Error("Some Foos had x != 0") ``` I quickly h...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2265/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2265/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2264
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2264/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2264/comments
https://api.github.com/repos/coleifer/peewee/issues/2264/events
https://github.com/coleifer/peewee/issues/2264
698,467,451
MDU6SXNzdWU2OTg0Njc0NTE=
2,264
Limit on backrefs ?
{ "login": "hrishikeshrt", "id": 62871, "node_id": "MDQ6VXNlcjYyODcx", "avatar_url": "https://avatars.githubusercontent.com/u/62871?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hrishikeshrt", "html_url": "https://github.com/hrishikeshrt", "followers_url": "https://api.github.com/users/h...
[]
closed
false
null
[]
null
[ "Just define which models or foreign-keys to exclude and they won't be traversed. Alternatively, you can explicitly implement your serialization strategy.", "Oh wait, I think I understand now -- no, this is something you will probably want to implement in a custom serializer if you want to control how the back-re...
2020-09-10T20:39:47
2020-09-10T21:46:24
2020-09-10T20:54:37
NONE
null
When using `model_to_dict on` a model with possibly a large number of `backrefs`, could there be an argument to `model_to_dict` which limits the number of entries in any back reference to the given value? (or any alternate way to achieve the same.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2264/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2264/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2263
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2263/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2263/comments
https://api.github.com/repos/coleifer/peewee/issues/2263/events
https://github.com/coleifer/peewee/pull/2263
697,913,966
MDExOlB1bGxSZXF1ZXN0NDgzODA5NDM5
2,263
Update SQLite max_variable_number info
{ "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
[]
2020-09-10T12:50:58
2020-09-10T13:58:03
2020-09-10T13:58:02
CONTRIBUTOR
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2263/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2263/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2263", "html_url": "https://github.com/coleifer/peewee/pull/2263", "diff_url": "https://github.com/coleifer/peewee/pull/2263.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2263.patch", "merged_at": "2020-09-10T13:58:02" }
https://api.github.com/repos/coleifer/peewee/issues/2262
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2262/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2262/comments
https://api.github.com/repos/coleifer/peewee/issues/2262/events
https://github.com/coleifer/peewee/issues/2262
697,050,414
MDU6SXNzdWU2OTcwNTA0MTQ=
2,262
'Playhouse" Feature request: Add support for Postgresql Range types
{ "login": "bjmc", "id": 328557, "node_id": "MDQ6VXNlcjMyODU1Nw==", "avatar_url": "https://avatars.githubusercontent.com/u/328557?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bjmc", "html_url": "https://github.com/bjmc", "followers_url": "https://api.github.com/users/bjmc/followers", ...
[]
closed
false
null
[]
null
[ "No plans to support this, but feel free to implement as a 3rd-party extension." ]
2020-09-09T18:33:12
2020-09-09T19:00:27
2020-09-09T19:00:27
NONE
null
Postgresql range types [are fantastic](https://wiki.postgresql.org/images/7/73/Range-types-pgopen-2012.pdf) and it would be great to be able to use them directly in Peewee.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2262/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2262/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2261
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2261/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2261/comments
https://api.github.com/repos/coleifer/peewee/issues/2261/events
https://github.com/coleifer/peewee/issues/2261
690,955,225
MDU6SXNzdWU2OTA5NTUyMjU=
2,261
Question: get chagnes
{ "login": "mrquokka", "id": 36193265, "node_id": "MDQ6VXNlcjM2MTkzMjY1", "avatar_url": "https://avatars.githubusercontent.com/u/36193265?v=4", "gravatar_id": "", "url": "https://api.github.com/users/mrquokka", "html_url": "https://github.com/mrquokka", "followers_url": "https://api.github.com/users/mrq...
[]
closed
false
null
[]
null
[ "I'm not sure how to answer this, but I'd suggest providing examples and asking on stackoverflow. This sounds more like a question rather than a peewee-specific issue." ]
2020-09-02T11:49:26
2020-09-02T12:41:30
2020-09-02T12:41:30
NONE
null
I look for orm with work with save steps to apply it later. I need to get all changes what happend on python, but dont sended to database. Can i get simular of this?
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2261/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2261/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2260
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2260/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2260/comments
https://api.github.com/repos/coleifer/peewee/issues/2260/events
https://github.com/coleifer/peewee/issues/2260
690,886,126
MDU6SXNzdWU2OTA4ODYxMjY=
2,260
bulk_update() generated SQL with high number of SQL variables
{ "login": "CarstenGrohmann", "id": 4849907, "node_id": "MDQ6VXNlcjQ4NDk5MDc=", "avatar_url": "https://avatars.githubusercontent.com/u/4849907?v=4", "gravatar_id": "", "url": "https://api.github.com/users/CarstenGrohmann", "html_url": "https://github.com/CarstenGrohmann", "followers_url": "https://api.g...
[]
closed
false
null
[]
null
[ "This is why the `batch_size` is exposed. Performing bulk updates necessarily involves a lot of variables because you essentially have to provide a mapping from each primary-key to the values that are to be updated. I don't know of any other way to do this when each row may have a different value.\r\n\r\nNot a bug,...
2020-09-02T09:57:25
2020-09-02T12:49:35
2020-09-02T12:49:34
NONE
null
Hello Charles, I'm still working on my mass updates. Now I've trouble with the maximum numbers of variables in a SQLite statement. If I use `Model.bulk_update(batch_size=800)` my code raises ```OperationalError: too many SQL variables```. If I use `Model.update()` with same number of items all works fine. I lo...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2260/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2260/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2259
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2259/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2259/comments
https://api.github.com/repos/coleifer/peewee/issues/2259/events
https://github.com/coleifer/peewee/issues/2259
690,141,053
MDU6SXNzdWU2OTAxNDEwNTM=
2,259
Hybrid properties and insert_many
{ "login": "qacollective", "id": 25289661, "node_id": "MDQ6VXNlcjI1Mjg5NjYx", "avatar_url": "https://avatars.githubusercontent.com/u/25289661?v=4", "gravatar_id": "", "url": "https://api.github.com/users/qacollective", "html_url": "https://github.com/qacollective", "followers_url": "https://api.github.c...
[]
closed
false
null
[]
null
[ "Can you produce a test-case that illustrates what you believe to be the problem? Without seeing what the order dicts look like it's hard to say.", "I'm a little confused as to how to reproduce this bug or what exactly your intent is. The whole reason to use a hybrid property is to express a computation (or scala...
2020-09-01T13:25:09
2020-09-05T00:33:07
2020-09-01T20:05:19
NONE
null
Hello, Peewee **rocks**. I use it everywhere I go! Really hoping this isn't a facepalm moment for me but here goes ... I have a model with a hybrid property: ``` class Order(BaseModel): id = IntegerField(primary_key = True) _time_setup_msc = DateTimeField() @hybrid.hybrid_property de...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2259/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2259/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2258
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2258/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2258/comments
https://api.github.com/repos/coleifer/peewee/issues/2258/events
https://github.com/coleifer/peewee/issues/2258
689,496,029
MDU6SXNzdWU2ODk0OTYwMjk=
2,258
Is it possible to modify the columns for a TableFunction in SQLite at runtime?
{ "login": "pacuna", "id": 1724136, "node_id": "MDQ6VXNlcjE3MjQxMzY=", "avatar_url": "https://avatars.githubusercontent.com/u/1724136?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pacuna", "html_url": "https://github.com/pacuna", "followers_url": "https://api.github.com/users/pacuna/foll...
[]
closed
false
null
[]
null
[ "Not really, look at the docs for the sqlite virtual table interface if you're curious how it works:\r\n\r\nhttps://sqlite.org/vtab.html\r\n\r\nThe virtual table, when registered, has to declare it's structure." ]
2020-08-31T20:47:20
2020-08-31T20:51:04
2020-08-31T20:51:03
NONE
null
I'm trying to create a table function that generates columns depending on the input. For example if the input is `("a", 1, "b", 2)` it should generate columns **a** and **b** with values **1** and **2**. My code is working but I have to hardcode the columns in the class variable `columns` and I can't modify it after. ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2258/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2258/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2257
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2257/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2257/comments
https://api.github.com/repos/coleifer/peewee/issues/2257/events
https://github.com/coleifer/peewee/issues/2257
688,678,285
MDU6SXNzdWU2ODg2NzgyODU=
2,257
Model.update() fails for BitFields if using flags
{ "login": "CarstenGrohmann", "id": 4849907, "node_id": "MDQ6VXNlcjQ4NDk5MDc=", "avatar_url": "https://avatars.githubusercontent.com/u/4849907?v=4", "gravatar_id": "", "url": "https://api.github.com/users/CarstenGrohmann", "html_url": "https://github.com/CarstenGrohmann", "followers_url": "https://api.g...
[]
closed
false
null
[]
null
[ "The flags is a descriptor which, when no instance is present (e.g. accessing `BitTest.F_4`) returns an expression equivalent to `BitTest.flags & 4 != 0` which is useful for testing truthiness. What we would need to support your example is to detect that the flag bit is being used in the left-hand side of a set ope...
2020-08-30T08:31:41
2020-09-01T13:56:28
2020-08-31T13:50:54
NONE
null
I use peewee in an application with millions of objects. I would use `Model.update()` for an effective mass update instead of creating objects and running `Model.bulk_update()`. Currently peewee generates wrong SQL statements for BitFields with flags: ``` >>> queue = BitTest.update(is_8=False) >>> queue.sql() (...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2257/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2257/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2256
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2256/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2256/comments
https://api.github.com/repos/coleifer/peewee/issues/2256/events
https://github.com/coleifer/peewee/issues/2256
688,109,705
MDU6SXNzdWU2ODgxMDk3MDU=
2,256
Adding a new ForeignKeyField to an existing model gives an error
{ "login": "fmors", "id": 1216208, "node_id": "MDQ6VXNlcjEyMTYyMDg=", "avatar_url": "https://avatars.githubusercontent.com/u/1216208?v=4", "gravatar_id": "", "url": "https://api.github.com/users/fmors", "html_url": "https://github.com/fmors", "followers_url": "https://api.github.com/users/fmors/follower...
[]
closed
false
null
[]
null
[ "Peewee does not have any automatic schema migration when you change a model definition. You can write migrations quite easily using the playhouse extension:\r\n\r\nhttp://docs.peewee-orm.com/en/latest/peewee/playhouse.html#migrate\r\n\r\nDo I understand correctly that you're describing:\r\n\r\n1. changed your mode...
2020-08-28T14:19:55
2020-08-28T15:21:17
2020-08-28T15:21:17
NONE
null
I've noticed that, when you add a new field to an already existing model, it will try to do all steps to create a table: 1. create sequences 2. create table (proper) 3. create indexes However, the "safe" parameter will make sure that the schema of the table itself will not be changed (after all, the table exist...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2256/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2256/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2255
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2255/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2255/comments
https://api.github.com/repos/coleifer/peewee/issues/2255/events
https://github.com/coleifer/peewee/issues/2255
688,070,320
MDU6SXNzdWU2ODgwNzAzMjA=
2,255
question: Aborted transaction is not being rolled back and connection closed after conflict handling
{ "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
[ "I cannot replicate this and I believe it is peculiar to aws lambda. Also I'm not sure why you have autocommit/autorollback enabled -- autocommit is deprecated (no-op) and displays a warning. If you have auto-rollback enabled then you don't need to roll-back in the except block (although doing so won't hurt anythin...
2020-08-28T13:19:45
2020-08-29T12:34:31
2020-08-28T14:04:47
NONE
null
Hello there, I am facing an issue that has been talked over a few times already, but none of your suggestions helped. I am trying to handle insert_many conflict and do some logic afterwards. My API is hosted on AWS Lambda. DB init: `self.__db = pw.PostgresqlDatabase(**DB_CREDENTIALS, autocommit=True, autorollb...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2255/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2255/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2254
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2254/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2254/comments
https://api.github.com/repos/coleifer/peewee/issues/2254/events
https://github.com/coleifer/peewee/issues/2254
686,712,851
MDU6SXNzdWU2ODY3MTI4NTE=
2,254
Problems with Peewee and Python 3.8
{ "login": "Petesta", "id": 1114813, "node_id": "MDQ6VXNlcjExMTQ4MTM=", "avatar_url": "https://avatars.githubusercontent.com/u/1114813?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Petesta", "html_url": "https://github.com/Petesta", "followers_url": "https://api.github.com/users/Petesta/...
[]
closed
false
null
[]
null
[ "You probably need to re-install psycopg2. Peewee is reporting that it found psycopg2 but that json support was not present. https://www.psycopg.org/docs/extras.html#json-adaptation", "@coleifer I have already tried reinstalling the packages `psycopg2` and `psycopg2-binary` together and separately, prior to openi...
2020-08-26T22:41:34
2020-08-27T16:15:39
2020-08-27T00:30:17
NONE
null
I currently have a working implementation running on `Python 3.6` running `peewee 3.13.3` and `psycopg2-binary 2.8.5` with `Postgres 9.6`. I upgraded the Python runtime to `Python 3.8` and started receiving this error. ``` [ERROR] Exception: Your version of psycopg2 does not support JSON. Traceback (most recent ca...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2254/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2254/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2253
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2253/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2253/comments
https://api.github.com/repos/coleifer/peewee/issues/2253/events
https://github.com/coleifer/peewee/issues/2253
684,332,926
MDU6SXNzdWU2ODQzMzI5MjY=
2,253
Custom SQL
{ "login": "ghost", "id": 10137, "node_id": "MDQ6VXNlcjEwMTM3", "avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ghost", "html_url": "https://github.com/ghost", "followers_url": "https://api.github.com/users/ghost/followers", "f...
[]
closed
false
null
[]
null
[ "That syntax is not currently supported out of the box. I'd suggest looking at the query builder internals.\r\n\r\nIf you have more questions feel free to ask on the mailing list or #peewee on freenode and I'll try to help.", "ok, thanks." ]
2020-08-24T03:30:33
2020-08-24T14:11:09
2020-08-24T12:24:12
NONE
null
Hello... Who to change? SELECT "t1"."id", "t1"."text" FROM "fields" AS "t1" WHERE ("t1"."id" = 1) LIMIT 1 For: SELECT FIRST 1 "t1"."id", "t1"."text" FROM "fields" AS "t1" WHERE ("t1"."id" = 1) Thanks
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2253/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2253/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2252
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2252/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2252/comments
https://api.github.com/repos/coleifer/peewee/issues/2252/events
https://github.com/coleifer/peewee/issues/2252
684,262,996
MDU6SXNzdWU2ODQyNjI5OTY=
2,252
Found some potential code quality issues in peewee
{ "login": "pnijhara", "id": 40136154, "node_id": "MDQ6VXNlcjQwMTM2MTU0", "avatar_url": "https://avatars.githubusercontent.com/u/40136154?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pnijhara", "html_url": "https://github.com/pnijhara", "followers_url": "https://api.github.com/users/pni...
[]
closed
false
null
[]
null
[]
2020-08-23T21:52:42
2020-08-23T22:08:43
2020-08-23T22:08:43
NONE
null
I was reading peewee's documentation last month and so I thought of forking this repo and running a code quality analysis on it. In that analysis, [DeepSource](https://deepsource.io/) found somewhat around 1000 code quality issues. Some interesting issues found in the source code: - [(Bug-risk) Multiple imports fo...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2252/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2252/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2251
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2251/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2251/comments
https://api.github.com/repos/coleifer/peewee/issues/2251/events
https://github.com/coleifer/peewee/pull/2251
681,140,283
MDExOlB1bGxSZXF1ZXN0NDY5NTc5MzIy
2,251
Update hacks.rst
{ "login": "vltr", "id": 1540275, "node_id": "MDQ6VXNlcjE1NDAyNzU=", "avatar_url": "https://avatars.githubusercontent.com/u/1540275?v=4", "gravatar_id": "", "url": "https://api.github.com/users/vltr", "html_url": "https://github.com/vltr", "followers_url": "https://api.github.com/users/vltr/followers", ...
[]
closed
false
null
[]
null
[]
2020-08-18T15:37:58
2020-08-18T16:40:43
2020-08-18T16:40:42
CONTRIBUTOR
null
fix to a minimal typo that was messing up RST formatting
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2251/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2251/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2251", "html_url": "https://github.com/coleifer/peewee/pull/2251", "diff_url": "https://github.com/coleifer/peewee/pull/2251.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2251.patch", "merged_at": "2020-08-18T16:40:42" }
https://api.github.com/repos/coleifer/peewee/issues/2250
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2250/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2250/comments
https://api.github.com/repos/coleifer/peewee/issues/2250/events
https://github.com/coleifer/peewee/issues/2250
680,594,385
MDU6SXNzdWU2ODA1OTQzODU=
2,250
TypeError: <lambda>() takes 1 positional argument but 2 were given
{ "login": "feelingnothing", "id": 47575622, "node_id": "MDQ6VXNlcjQ3NTc1NjIy", "avatar_url": "https://avatars.githubusercontent.com/u/47575622?v=4", "gravatar_id": "", "url": "https://api.github.com/users/feelingnothing", "html_url": "https://github.com/feelingnothing", "followers_url": "https://api.gi...
[]
closed
false
null
[]
null
[ "I shared a working example of this code, did you not see it? You are replacing methods with lambdas but they need to take the implicit \"self\" when called on the instance.\r\n\r\n```python\r\n# e.g.\r\npython_value = lambda self, v: int(v)\r\n```\r\n\r\nPlease do not post this kind of question on the issue tracke...
2020-08-17T23:59:45
2020-08-18T12:46:10
2020-08-18T12:46:10
NONE
null
My model: ```python class Notification(BaseModel): id = CharField(default=uuid4, max_length=36) created_at = DateTimeField(default=datetime.now) channel = BigIntField() time = TimeField() title = CharField(max_length=256, null=True) description = CharField(max_length=2048, null=True) ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2250/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2250/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2249
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2249/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2249/comments
https://api.github.com/repos/coleifer/peewee/issues/2249/events
https://github.com/coleifer/peewee/issues/2249
679,468,473
MDU6SXNzdWU2Nzk0Njg0NzM=
2,249
OverflowError: Python int too large to convert to SQLite INTEGER
{ "login": "feelingnothing", "id": 47575622, "node_id": "MDQ6VXNlcjQ3NTc1NjIy", "avatar_url": "https://avatars.githubusercontent.com/u/47575622?v=4", "gravatar_id": "", "url": "https://api.github.com/users/feelingnothing", "html_url": "https://github.com/feelingnothing", "followers_url": "https://api.gi...
[]
closed
false
null
[]
null
[ "Have a look at the [docs](http://docs.peewee-orm.com/en/latest/peewee/models.html#field-types-table) there is a `BigIntegerField`, it should be sufficient for your use:\r\n```\r\n>>> v = 735095020402769941\r\n>>> (v/(2**31-1) > 1)\r\nTrue\r\n>>> (v/(2**63-1) > 1)\r\nFalse\r\n```", "This works fine for me, I'm no...
2020-08-15T00:53:08
2020-08-15T16:03:15
2020-08-15T16:02:08
NONE
null
Error: ``` {'name': 'VIP1', 'description': 'TEST1', 'price': 1.0, 'currency': 'rub', 'role_id': '735095020402769941'} Traceback (most recent call last): File "C:\Users\dolabaeb\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\menus\__init__.py", line 638, in update await button(self, payl...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2249/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2249/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2248
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2248/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2248/comments
https://api.github.com/repos/coleifer/peewee/issues/2248/events
https://github.com/coleifer/peewee/issues/2248
679,211,665
MDU6SXNzdWU2NzkyMTE2NjU=
2,248
Lost type of aliased column from subquery
{ "login": "Nurbel", "id": 7353807, "node_id": "MDQ6VXNlcjczNTM4MDc=", "avatar_url": "https://avatars.githubusercontent.com/u/7353807?v=4", "gravatar_id": "", "url": "https://api.github.com/users/Nurbel", "html_url": "https://github.com/Nurbel", "followers_url": "https://api.github.com/users/Nurbel/foll...
[]
closed
false
null
[]
null
[ "That's correct, and peewee will figure it out correctly most of the time, but when you're pulling stuff up from subqueries you may need to explicitly tell peewee how to coerce it.\r\n\r\nDid you try:\r\n\r\n```python\r\n\r\n.select(MyModel.date, sub.c.date, sub.c.date, sub.c.aliased.coerce(MyModel.date.db_value))\...
2020-08-14T14:52:40
2021-01-11T10:41:07
2020-08-14T19:42:46
NONE
null
Hi, when using aliased colums in a subquery, peewee seems to loose the type of the column In the following script, I access a date from a subquery, with and without an alias. Without the alias, I get a python date as expected, but with the alias, I get a string ```python from peewee import * from datetime i...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2248/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2248/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2247
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2247/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2247/comments
https://api.github.com/repos/coleifer/peewee/issues/2247/events
https://github.com/coleifer/peewee/issues/2247
679,163,947
MDU6SXNzdWU2NzkxNjM5NDc=
2,247
Misleading query generated on SQLite
{ "login": "theosotr", "id": 6434138, "node_id": "MDQ6VXNlcjY0MzQxMzg=", "avatar_url": "https://avatars.githubusercontent.com/u/6434138?v=4", "gravatar_id": "", "url": "https://api.github.com/users/theosotr", "html_url": "https://github.com/theosotr", "followers_url": "https://api.github.com/users/theos...
[]
closed
false
null
[]
null
[ "Sqlite does not support parentheses on union queries, nor does it support ORDER BY or LIMIT on the individual queries that comprise the union. Read the sqlite docs:\r\n\r\nhttps://sqlite.org/lang_select.html#compound_select_statements\r\n\r\n>As the components of a compound SELECT must be simple SELECT statements,...
2020-08-14T13:39:01
2020-08-14T14:45:56
2020-08-14T14:39:55
NONE
null
I run the following query on SQLite. ```python q1 = Table1.select(Table1.colA).objects() q2 = Table2.select(Table2.colB).order_by(Table2.colB).limit(1).objects() q1.union(q2) ``` the query generated by `peewee` is misleading, and not equivalent to the initial one ```sql SELECT "t1"."colA" FROM "table1"...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2247/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2247/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2246
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2246/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2246/comments
https://api.github.com/repos/coleifer/peewee/issues/2246/events
https://github.com/coleifer/peewee/issues/2246
679,054,792
MDU6SXNzdWU2NzkwNTQ3OTI=
2,246
Query with Syntax Error on MySQL
{ "login": "theosotr", "id": 6434138, "node_id": "MDQ6VXNlcjY0MzQxMzg=", "avatar_url": "https://avatars.githubusercontent.com/u/6434138?v=4", "gravatar_id": "", "url": "https://api.github.com/users/theosotr", "html_url": "https://github.com/theosotr", "followers_url": "https://api.github.com/users/theos...
[]
closed
false
null
[]
null
[ "If you want your ORDER BY or LIMIT to be applied to an individual query within the union, then you need to apply that ordering before you union them together. Otherwise peewee thinks you're trying to apply that to the overall compound result set. It's complicated because the ordering can be either applied to the i...
2020-08-14T10:12:51
2020-08-14T15:56:53
2020-08-14T14:37:33
NONE
null
I have the following peewee query (over-simplified for opening the issue). ```python q1 = Table1.select(Table1.colA).objects() q2 = Table2.select(Table2.colB).objects() q3 = Table3.select(Table3.colC).objects() comb = q1.union(q2).order_by(Table1.colA).limit(10) q3.union(comb).order_by(Table3.colC) ``` th...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2246/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2246/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2245
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2245/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2245/comments
https://api.github.com/repos/coleifer/peewee/issues/2245/events
https://github.com/coleifer/peewee/issues/2245
677,060,555
MDU6SXNzdWU2NzcwNjA1NTU=
2,245
doc website seems to be hacked
{ "login": "azs0309", "id": 40914458, "node_id": "MDQ6VXNlcjQwOTE0NDU4", "avatar_url": "https://avatars.githubusercontent.com/u/40914458?v=4", "gravatar_id": "", "url": "https://api.github.com/users/azs0309", "html_url": "https://github.com/azs0309", "followers_url": "https://api.github.com/users/azs030...
[]
closed
false
null
[]
null
[ "It seems to be working fine for me. This is the output of `curl http://docs.peewee-orm.com/en/3.6.0/peewee/quickstart.html`:\r\n\r\nhttps://gist.github.com/coleifer/d6450e6d5bdcb4460cd6bbf36b8dcb4c" ]
2020-08-11T17:31:31
2020-08-11T18:07:10
2020-08-11T18:07:10
NONE
null
The document website http://docs.peewee-orm.com/en/3.6.0/peewee/quickstart.html seems to be hacked and whenever I click a link pointing me to fryruejoust.cam
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2245/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2245/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2244
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2244/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2244/comments
https://api.github.com/repos/coleifer/peewee/issues/2244/events
https://github.com/coleifer/peewee/issues/2244
677,042,818
MDU6SXNzdWU2NzcwNDI4MTg=
2,244
left_outer_join doesn't works as expected
{ "login": "slavkoja", "id": 5506544, "node_id": "MDQ6VXNlcjU1MDY1NDQ=", "avatar_url": "https://avatars.githubusercontent.com/u/5506544?v=4", "gravatar_id": "", "url": "https://api.github.com/users/slavkoja", "html_url": "https://github.com/slavkoja", "followers_url": "https://api.github.com/users/slavk...
[]
closed
false
null
[]
null
[ "The `left_outer_join()` method is implemented on a lower-level of the query-builder and does not take into account important aspects of the model layer.\r\n\r\nYou should stick to using the standard ways of doing things, namely `.join()` when using models." ]
2020-08-11T17:03:20
2021-08-02T13:03:31
2020-08-11T18:09:35
NONE
null
I do not know, if i am doing something wrong, but query with `left_outer_join()` doesn't work for me. I can reproduce it with this simple example: ```python import peewee as pw DBFILE = ":memory:" db = pw.SqliteDatabase(DBFILE, pragmas={'foreign_keys': 1,}) class BaseModel(pw.Model): class Meta: ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2244/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/2244/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2243
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2243/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2243/comments
https://api.github.com/repos/coleifer/peewee/issues/2243/events
https://github.com/coleifer/peewee/issues/2243
677,019,062
MDU6SXNzdWU2NzcwMTkwNjI=
2,243
Fatal Python error: GC object already tracked
{ "login": "simpassi", "id": 38055305, "node_id": "MDQ6VXNlcjM4MDU1MzA1", "avatar_url": "https://avatars.githubusercontent.com/u/38055305?v=4", "gravatar_id": "", "url": "https://api.github.com/users/simpassi", "html_url": "https://github.com/simpassi", "followers_url": "https://api.github.com/users/sim...
[]
closed
false
null
[]
null
[ "I'd take it up with the cpython / pysqlite folks. Sharing sqlite connections across python threads is weird, and peewee uses a connection-per-thread model anyways so I am not even sure how that is working for you.", "You probably need a minimal repro using threads and stdlib sqlite3." ]
2020-08-11T16:27:47
2020-08-11T18:02:25
2020-08-11T18:02:03
NONE
null
I'm having a weird intermittent error when all of the following conditions are met: * Using an in-memory sqlite3 database initialized with thread_safe=False, check_same_thread=False * Running in a different thread than the one that initialized the database * Accessing an object's _meta.backrefs values Running ins...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2243/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2243/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2242
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2242/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2242/comments
https://api.github.com/repos/coleifer/peewee/issues/2242/events
https://github.com/coleifer/peewee/issues/2242
676,606,899
MDU6SXNzdWU2NzY2MDY4OTk=
2,242
MariaDB/Mysql index type
{ "login": "chewvader", "id": 7836093, "node_id": "MDQ6VXNlcjc4MzYwOTM=", "avatar_url": "https://avatars.githubusercontent.com/u/7836093?v=4", "gravatar_id": "", "url": "https://api.github.com/users/chewvader", "html_url": "https://github.com/chewvader", "followers_url": "https://api.github.com/users/ch...
[]
closed
false
null
[]
null
[ "Thank you for the report, I'll see about putting together a fix." ]
2020-08-11T06:01:54
2020-08-11T18:51:22
2020-08-11T18:51:22
NONE
null
I believe peewee isn't creating the correct "create index" syntax for mysql index_types. This was tested with mariadb==10.5.4, peewee==3.13.3. ``` import logging from peewee import * pwlogger = logging.getLogger('peewee') pwlogger.addHandler(logging.StreamHandler()) pwlogger.setLevel(logging.DEBUG) db = My...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2242/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2242/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2241
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2241/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2241/comments
https://api.github.com/repos/coleifer/peewee/issues/2241/events
https://github.com/coleifer/peewee/issues/2241
675,763,352
MDU6SXNzdWU2NzU3NjMzNTI=
2,241
After upgrading from version 2.x to 3.x getting, TypeError: _connect() missing 1 ...
{ "login": "wilberh", "id": 6799242, "node_id": "MDQ6VXNlcjY3OTkyNDI=", "avatar_url": "https://avatars.githubusercontent.com/u/6799242?v=4", "gravatar_id": "", "url": "https://api.github.com/users/wilberh", "html_url": "https://github.com/wilberh", "followers_url": "https://api.github.com/users/wilberh/...
[]
closed
false
null
[]
null
[ "`_connect()` does not take a database parameter in 3.x. It is `self.database`." ]
2020-08-09T20:07:58
2020-08-10T14:06:25
2020-08-10T14:06:14
NONE
null
After upgrading from version 2.x to 3.x getting, I'm getting the error below. It worked fine in version 2.x ``` File "/.../lib/python3.6/site-packages/peewee.py", line 403, in inner with self: File "/.../lib/python3.6/site-packages/peewee.py", line 2936, in __enter__ self.db.connect() File "/...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2241/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2241/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2240
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2240/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2240/comments
https://api.github.com/repos/coleifer/peewee/issues/2240/events
https://github.com/coleifer/peewee/issues/2240
675,551,419
MDU6SXNzdWU2NzU1NTE0MTk=
2,240
SQLite database generates GLOB for %, however GLOB is not LIKE…
{ "login": "zx80", "id": 8624205, "node_id": "MDQ6VXNlcjg2MjQyMDU=", "avatar_url": "https://avatars.githubusercontent.com/u/8624205?v=4", "gravatar_id": "", "url": "https://api.github.com/users/zx80", "html_url": "https://github.com/zx80", "followers_url": "https://api.github.com/users/zx80/followers", ...
[]
closed
false
null
[]
null
[ "This has been this way for many years and I've no plans to change it. I do understand that it may have been confusing.", "Hmmm… Indeed it is pretty confusing.", "![s1597080267 5538623](https://user-images.githubusercontent.com/119974/89811582-7fe09c00-db04-11ea-9d0f-d01e1900180d.png)\r\n" ]
2020-08-08T16:29:33
2020-08-10T17:24:59
2020-08-10T14:05:08
NONE
null
The documentation says that `%` stands for `LIKE` in query expressions, but the traces shows a `GLOB` instead with SQLite, hoewever the regexp syntax is not the same between the two operators, eg `LIKE 'h%'` is `GLOB 'h*'`. Version affected: *3.13.3* Code: ```Python res = Store.select().where(Store.key % ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2240/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2240/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2239
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2239/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2239/comments
https://api.github.com/repos/coleifer/peewee/issues/2239/events
https://github.com/coleifer/peewee/issues/2239
674,076,608
MDU6SXNzdWU2NzQwNzY2MDg=
2,239
Using bitwise (&|~)in a query
{ "login": "TaceyWong", "id": 5282810, "node_id": "MDQ6VXNlcjUyODI4MTA=", "avatar_url": "https://avatars.githubusercontent.com/u/5282810?v=4", "gravatar_id": "", "url": "https://api.github.com/users/TaceyWong", "html_url": "https://github.com/TaceyWong", "followers_url": "https://api.github.com/users/Ta...
[]
closed
false
null
[]
null
[ "Since it's a unary operator, you can probably get it working with something like:\r\n\r\n```python\r\n\r\ndef bin_not(value):\r\n return NodeList((SQL('~'), value))\r\n```" ]
2020-08-06T07:09:00
2020-08-06T12:55:11
2020-08-06T12:55:11
NONE
null
IN http://docs.peewee-orm.com/en/latest/peewee/query_operators.html .bin_and(value) -> Binary AND .bin_or(value) -> Binary OR but,I can not find the replace of Binary NOT .How can I write a peewee-style c=a&(~b)?
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2239/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2239/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2238
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2238/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2238/comments
https://api.github.com/repos/coleifer/peewee/issues/2238/events
https://github.com/coleifer/peewee/issues/2238
672,162,214
MDU6SXNzdWU2NzIxNjIyMTQ=
2,238
CTE executed multiple times
{ "login": "frafra", "id": 4068, "node_id": "MDQ6VXNlcjQwNjg=", "avatar_url": "https://avatars.githubusercontent.com/u/4068?v=4", "gravatar_id": "", "url": "https://api.github.com/users/frafra", "html_url": "https://github.com/frafra", "followers_url": "https://api.github.com/users/frafra/followers", ...
[]
closed
false
null
[]
null
[ "Please see the docs for cte usage. I get the sense you're missing something:\r\n\r\nhttp://docs.peewee-orm.com/en/latest/peewee/querying.html#common-table-expressions\r\n\r\nThe tests also have numerous examples.", "My misunderstanding was based on the assumption that `.with_cte(...)` should have been added to e...
2020-08-03T15:34:32
2020-08-04T08:23:44
2020-08-03T15:53:30
NONE
null
Hi, Peewee defines CTE in subqueries, even if that means to compute the same thing twice. For example: `SELECT ... FROM ... JOIN (WITH cte ... SELECT ... FROM cte) JOIN (WITH cte ... SELECT ... FROM cte) ...` I have a rather complex example I can show, but it surprises me that the CTE is not placed at the beginn...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2238/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2238/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2237
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2237/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2237/comments
https://api.github.com/repos/coleifer/peewee/issues/2237/events
https://github.com/coleifer/peewee/issues/2237
671,566,605
MDU6SXNzdWU2NzE1NjY2MDU=
2,237
Add the auto_now parameter to the TimestampField field
{ "login": "ghost", "id": 10137, "node_id": "MDQ6VXNlcjEwMTM3", "avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ghost", "html_url": "https://github.com/ghost", "followers_url": "https://api.github.com/users/ghost/followers", "f...
[]
closed
false
null
[]
null
[ "You can already do this by overloading the default datetime class, something like:\r\n``` python\r\nfrom datetime import datetime\r\n\r\nimport peewee as pw\r\n\r\n\r\n# pylint: disable=locally-disabled, invalid-name\r\ndef NowDateTimeField(**kwargs):\r\n \"\"\" A peewee DateTimeField which defaults to 'now'\r\...
2020-08-02T07:08:14
2020-08-02T14:39:10
2020-08-02T14:39:10
NONE
null
I want to add this parameter, when set to True, the database entry will be updated and changed to the current time
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2237/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2237/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2236
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2236/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2236/comments
https://api.github.com/repos/coleifer/peewee/issues/2236/events
https://github.com/coleifer/peewee/pull/2236
669,738,844
MDExOlB1bGxSZXF1ZXN0NDYwMDc1Njk0
2,236
Added JSONField
{ "login": "ghost", "id": 10137, "node_id": "MDQ6VXNlcjEwMTM3", "avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4", "gravatar_id": "", "url": "https://api.github.com/users/ghost", "html_url": "https://github.com/ghost", "followers_url": "https://api.github.com/users/ghost/followers", "f...
[]
closed
false
null
[]
null
[ "I'm going to pass. There are vendor-specific JSON field implementations, which are recommended. Those who wish to just store json in a textfield can subclass the existing TextField implementation or use a 3rd party package." ]
2020-07-31T11:55:03
2020-07-31T14:05:31
2020-07-31T14:05:31
NONE
null
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2236/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2236/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2236", "html_url": "https://github.com/coleifer/peewee/pull/2236", "diff_url": "https://github.com/coleifer/peewee/pull/2236.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2236.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2235
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2235/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2235/comments
https://api.github.com/repos/coleifer/peewee/issues/2235/events
https://github.com/coleifer/peewee/issues/2235
668,759,799
MDU6SXNzdWU2Njg3NTk3OTk=
2,235
What does the `gametight` tag mean?
{ "login": "pxeger", "id": 67427173, "node_id": "MDQ6VXNlcjY3NDI3MTcz", "avatar_url": "https://avatars.githubusercontent.com/u/67427173?v=4", "gravatar_id": "", "url": "https://api.github.com/users/pxeger", "html_url": "https://github.com/pxeger", "followers_url": "https://api.github.com/users/pxeger/fo...
[]
closed
false
null
[]
null
[ "https://www.youtube.com/watch?v=McnTeuKtmfg&t=1m24s" ]
2020-07-30T13:59:47
2020-07-30T14:14:00
2020-07-30T14:14:00
NONE
null
Random question - the tag `gametight` is used on only two other repos - kt and ukt, both by you (coleifer). What does it mean?
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2235/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2235/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2234
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2234/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2234/comments
https://api.github.com/repos/coleifer/peewee/issues/2234/events
https://github.com/coleifer/peewee/pull/2234
668,718,838
MDExOlB1bGxSZXF1ZXN0NDU5MTcwNjQ2
2,234
Add ping reconnect mysql connection
{ "login": "bagel", "id": 706788, "node_id": "MDQ6VXNlcjcwNjc4OA==", "avatar_url": "https://avatars.githubusercontent.com/u/706788?v=4", "gravatar_id": "", "url": "https://api.github.com/users/bagel", "html_url": "https://github.com/bagel", "followers_url": "https://api.github.com/users/bagel/followers"...
[]
closed
false
null
[]
null
[ "See: https://github.com/coleifer/peewee/blob/master/playhouse/shortcuts.py#L174-L229", "I use like this before, Why not use ping auto reconnect?" ]
2020-07-30T13:24:08
2020-07-30T13:49:31
2020-07-30T13:40:18
CONTRIBUTOR
null
When mysql server restart or lost connection, connection not reconnect and database.is_closed is False. Add ping(reconnect=True) auto reconnect. Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 1987, in __len__ self._en...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2234/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2234/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2234", "html_url": "https://github.com/coleifer/peewee/pull/2234", "diff_url": "https://github.com/coleifer/peewee/pull/2234.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2234.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2233
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2233/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2233/comments
https://api.github.com/repos/coleifer/peewee/issues/2233/events
https://github.com/coleifer/peewee/issues/2233
667,905,729
MDU6SXNzdWU2Njc5MDU3Mjk=
2,233
Inconsistency in treatment of '\' character
{ "login": "theosotr", "id": 6434138, "node_id": "MDQ6VXNlcjY0MzQxMzg=", "avatar_url": "https://avatars.githubusercontent.com/u/6434138?v=4", "gravatar_id": "", "url": "https://api.github.com/users/theosotr", "html_url": "https://github.com/theosotr", "followers_url": "https://api.github.com/users/theos...
[]
closed
false
null
[]
null
[ "Depending on your database, you may need to double-up the backslash, as many databases treat it as the default escape.\r\n\r\nJust use four: '\\\\\\\\\\\\\\\\'.", "I think this behaviour needs to be hidden from the programmer. Besides, an ORM is abstraction layer over databases.\r\nBecause adding `\\\\\\\\` in t...
2020-07-29T14:49:14
2020-07-29T15:19:10
2020-07-29T15:19:10
NONE
null
I have the following database schema ```sql CREATE TABLE "table" ( "id" integer, "str" varchar(50), PRIMARY KEY (id) ); INSERT INTO "table"("id","str") VALUES (1,'bar_foo\baz'); INSERT INTO "table"("id","str") VALUES (2,'bar'); INSERT INTO "table"("id","str") VALUES (3,'bar\foo'); ``` and the following ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2233/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2233/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2232
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2232/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2232/comments
https://api.github.com/repos/coleifer/peewee/issues/2232/events
https://github.com/coleifer/peewee/pull/2232
667,668,594
MDExOlB1bGxSZXF1ZXN0NDU4MjkxNzgw
2,232
Support queries of all types of pkey in `get()`
{ "login": "wooparadog", "id": 1130984, "node_id": "MDQ6VXNlcjExMzA5ODQ=", "avatar_url": "https://avatars.githubusercontent.com/u/1130984?v=4", "gravatar_id": "", "url": "https://api.github.com/users/wooparadog", "html_url": "https://github.com/wooparadog", "followers_url": "https://api.github.com/users...
[]
closed
false
null
[]
null
[ "I'm going to pass, but thanks." ]
2020-07-29T08:51:23
2020-07-29T13:32:12
2020-07-29T13:32:12
NONE
null
In https://github.com/coleifer/peewee/issues/1835 get by primary key is added for `int`, but there're cases when primary key is other than integer, especially in analytics domain. Using `Node` to exclude `Expression` seems a good idea, need more insight though.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2232/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2232/timeline
null
null
false
{ "url": "https://api.github.com/repos/coleifer/peewee/pulls/2232", "html_url": "https://github.com/coleifer/peewee/pull/2232", "diff_url": "https://github.com/coleifer/peewee/pull/2232.diff", "patch_url": "https://github.com/coleifer/peewee/pull/2232.patch", "merged_at": null }
https://api.github.com/repos/coleifer/peewee/issues/2231
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2231/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2231/comments
https://api.github.com/repos/coleifer/peewee/issues/2231/events
https://github.com/coleifer/peewee/issues/2231
667,420,609
MDU6SXNzdWU2Njc0MjA2MDk=
2,231
Unable to pass database parameter to mysql-connector-python through peewee
{ "login": "dshefman1", "id": 25602097, "node_id": "MDQ6VXNlcjI1NjAyMDk3", "avatar_url": "https://avatars.githubusercontent.com/u/25602097?v=4", "gravatar_id": "", "url": "https://api.github.com/users/dshefman1", "html_url": "https://github.com/dshefman1", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "You need to use `playhouse.mysql_ext.MySQLConnectorDatabase` to connect using the mysql-connector driver. That will resolve your issue." ]
2020-07-28T22:23:54
2020-07-29T13:33:46
2020-07-29T13:33:46
NONE
null
The database parameter 'tls_versions' does not appear to be getting passed through to mysql-connector-python. The [documentation ](http://docs.peewee-orm.com/en/latest/peewee/database.html#initializing-a-database) says, "Subsequent keyword arguments are passed to the underlying database driver when establishing the con...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2231/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2231/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2230
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2230/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2230/comments
https://api.github.com/repos/coleifer/peewee/issues/2230/events
https://github.com/coleifer/peewee/issues/2230
665,368,056
MDU6SXNzdWU2NjUzNjgwNTY=
2,230
passing custom/additonal metadata
{ "login": "wilberh", "id": 6799242, "node_id": "MDQ6VXNlcjY3OTkyNDI=", "avatar_url": "https://avatars.githubusercontent.com/u/6799242?v=4", "gravatar_id": "", "url": "https://api.github.com/users/wilberh", "html_url": "https://github.com/wilberh", "followers_url": "https://api.github.com/users/wilberh/...
[]
closed
false
null
[]
null
[ "No this is not supported" ]
2020-07-24T19:23:35
2020-07-24T19:51:20
2020-07-24T19:51:20
NONE
null
Is there any way to pass additional metada when creating a table (in class Meta or some other way)? Meaning, adding additional information after table creation section - see bold section below. Example: CREATE TABLE testing ( name VARCHAR ) **COMMENT 'This is an internal table' ROW FORMAT DELIMITED NUL...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2230/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2230/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2229
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2229/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2229/comments
https://api.github.com/repos/coleifer/peewee/issues/2229/events
https://github.com/coleifer/peewee/issues/2229
664,677,651
MDU6SXNzdWU2NjQ2Nzc2NTE=
2,229
How to handle 'Duplicate entry' warnings when using `on_conflict_ignore()`?
{ "login": "SilentGene", "id": 15141939, "node_id": "MDQ6VXNlcjE1MTQxOTM5", "avatar_url": "https://avatars.githubusercontent.com/u/15141939?v=4", "gravatar_id": "", "url": "https://api.github.com/users/SilentGene", "html_url": "https://github.com/SilentGene", "followers_url": "https://api.github.com/use...
[]
closed
false
null
[]
null
[ "The warning is not raised by peewee. The warning is not generated by pymysql. The warning is coming directly from the sql database.\r\n\r\nFor general information about warnings, check here:\r\n\r\nhttps://docs.python.org/3/library/warnings.html#module-warnings\r\n\r\nNext time please spend more time looking into ...
2020-07-23T18:22:26
2020-07-24T16:47:33
2020-07-23T21:44:58
NONE
null
Hello, when using `insert.on_conflict_ignore().execute()` method to insert new entries, there are always warnings shown as below: ```bash C:\Users\...\AppData\Local\Programs\Python\Python37\lib\site-packages\pymysql\cursors.py:170: Warning: (1062, "Duplicate entry 'http://link.aps.org/doi/10.1103/RevModPhys.90.015006...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2229/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2229/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2228
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2228/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2228/comments
https://api.github.com/repos/coleifer/peewee/issues/2228/events
https://github.com/coleifer/peewee/issues/2228
664,307,679
MDU6SXNzdWU2NjQzMDc2Nzk=
2,228
Drop Constraint Syntax Error in MySQL 8.0.18
{ "login": "hfudev", "id": 23117153, "node_id": "MDQ6VXNlcjIzMTE3MTUz", "avatar_url": "https://avatars.githubusercontent.com/u/23117153?v=4", "gravatar_id": "", "url": "https://api.github.com/users/hfudev", "html_url": "https://github.com/hfudev", "followers_url": "https://api.github.com/users/hfudev/fo...
[]
closed
false
null
[]
null
[ "For MySQL you would use the `drop_foreign_key_constraint` migrator method.", "I couldn't find it in peewee's documentation. Maybe could add it later. Thanks!", "Oh, it's spent a lot of time to find `drop_foreign_key_constraint` method... It will be very usefull to add it to the docs.", "The foreign-key const...
2020-07-23T08:55:47
2020-09-10T13:22:02
2020-07-23T13:23:28
NONE
null
Hi, I'm using `peewee.playhouse.migrate.drop_constraint` to do some migrations on MySQL 8.0.18. If failed with error message: <pre> `Error in query (1064): Syntax error near 'CONSTRAINT `constraint_name`' at line 1` </pre> I've checked the SQL. This will fail: <pre>ALTER TABLE xxx DROP CONSTRAINTS `XXX`</pr...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2228/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2228/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2227
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2227/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2227/comments
https://api.github.com/repos/coleifer/peewee/issues/2227/events
https://github.com/coleifer/peewee/issues/2227
663,189,053
MDU6SXNzdWU2NjMxODkwNTM=
2,227
Is there a way to join across databases?
{ "login": "skjbulcher", "id": 16672299, "node_id": "MDQ6VXNlcjE2NjcyMjk5", "avatar_url": "https://avatars.githubusercontent.com/u/16672299?v=4", "gravatar_id": "", "url": "https://api.github.com/users/skjbulcher", "html_url": "https://github.com/skjbulcher", "followers_url": "https://api.github.com/use...
[]
closed
false
null
[]
null
[ "You can use the `Meta.schema` to achieve an extra layer of namespacing." ]
2020-07-21T17:34:40
2020-07-21T19:36:40
2020-07-21T19:36:39
NONE
null
I have a MySQL server with a number of databases, e.g. `customer`, `dba_company_a`, `dba_company_b`. I need to join across databases to execute queries that include customer information from either dba_company database. I haven't been able to figure out how to do that with peewee. I've tried using different `Meta` c...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2227/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2227/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2226
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2226/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2226/comments
https://api.github.com/repos/coleifer/peewee/issues/2226/events
https://github.com/coleifer/peewee/issues/2226
663,177,547
MDU6SXNzdWU2NjMxNzc1NDc=
2,226
.switch() and .join_from() for CTE's
{ "login": "BigPictures", "id": 63026741, "node_id": "MDQ6VXNlcjYzMDI2NzQx", "avatar_url": "https://avatars.githubusercontent.com/u/63026741?v=4", "gravatar_id": "", "url": "https://api.github.com/users/BigPictures", "html_url": "https://github.com/BigPictures", "followers_url": "https://api.github.com/...
[]
closed
false
null
[]
null
[ "The join context only really has meaning for model-select, where peewee utilizes the structure of the model relationships to infer predicates and other things. A CTE can join multiple times, you just need to specify the appropriate predicate in the `on=` clause.", "That makes sense.\r\n\r\nWouldn't join context ...
2020-07-21T17:14:53
2020-07-22T20:55:44
2020-07-21T19:35:56
NONE
null
It looks to me like the `.switch()` and `.join_from()` methods are only defined on the `ModelSelect` class, meaning it's impossible to join from a CTE to multiple other tables. It might be good to move the join context stuff up the class hierarchy to `Select`, unless there's some reason doing so would be tricky. Is ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2226/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2226/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2225
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2225/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2225/comments
https://api.github.com/repos/coleifer/peewee/issues/2225/events
https://github.com/coleifer/peewee/issues/2225
661,603,413
MDU6SXNzdWU2NjE2MDM0MTM=
2,225
Support postgres polygon type?
{ "login": "andrewerf", "id": 26378793, "node_id": "MDQ6VXNlcjI2Mzc4Nzkz", "avatar_url": "https://avatars.githubusercontent.com/u/26378793?v=4", "gravatar_id": "", "url": "https://api.github.com/users/andrewerf", "html_url": "https://github.com/andrewerf", "followers_url": "https://api.github.com/users/...
[]
closed
false
null
[]
null
[ "http://docs.peewee-orm.com/en/latest/peewee/models.html#custom-fields" ]
2020-07-20T09:38:53
2020-07-20T12:58:26
2020-07-20T12:58:26
NONE
null
What about support of postgres point, line, path and polygon types?
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2225/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2225/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2224
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2224/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2224/comments
https://api.github.com/repos/coleifer/peewee/issues/2224/events
https://github.com/coleifer/peewee/issues/2224
658,277,401
MDU6SXNzdWU2NTgyNzc0MDE=
2,224
Contains does not work as expected with % and _
{ "login": "StefanosChaliasos", "id": 15054312, "node_id": "MDQ6VXNlcjE1MDU0MzEy", "avatar_url": "https://avatars.githubusercontent.com/u/15054312?v=4", "gravatar_id": "", "url": "https://api.github.com/users/StefanosChaliasos", "html_url": "https://github.com/StefanosChaliasos", "followers_url": "https...
[]
closed
false
null
[]
null
[ "What database are you using?", "Ι've tested it on sqlite and mysql", "This is working fine for me on both Sqlite and Postgresql:\r\n\r\n```\r\nIn [1]: from peewee import * \r\n\r\nIn [2]: db = SqliteDatabase(':memory:') ...
2020-07-16T14:56:39
2020-07-17T00:22:33
2020-07-17T00:22:33
NONE
null
Consider a table with the following values: ``` id | name -- | ------- 1 | foo 2 | foo% 3 | foo%bar 4 | foobar ``` When I use the contains method with "%" as an argument, I expect to return foo% and foo%bar, but peewee returns all the columns of the table. Example query: ```python Table1.select(Table1...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2224/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2224/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2223
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2223/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2223/comments
https://api.github.com/repos/coleifer/peewee/issues/2223/events
https://github.com/coleifer/peewee/issues/2223
654,479,525
MDU6SXNzdWU2NTQ0Nzk1MjU=
2,223
Removing trailing square-brackets
{ "login": "wilberh", "id": 6799242, "node_id": "MDQ6VXNlcjY3OTkyNDI=", "avatar_url": "https://avatars.githubusercontent.com/u/6799242?v=4", "gravatar_id": "", "url": "https://api.github.com/users/wilberh", "html_url": "https://github.com/wilberh", "followers_url": "https://api.github.com/users/wilberh/...
[]
closed
false
null
[]
null
[ "You may be confusing the representation of the SQL statement with what actually gets sent to the database.\r\n\r\nThose brackets are the representation of an empty list. The list is used to pass parameters to the driver, which handles escaping and all that (note to Always use parameterized queries)." ]
2020-07-10T03:19:03
2020-07-10T15:42:12
2020-07-10T15:42:12
NONE
null
Is there a way of removing the square-brackets from getting added into sql queries? I'm getting this sql statement - SELECT t1.rname, t1.mrole, t1.rmaterial FROM stg.instruments AS t1 []
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2223/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2223/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2222
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2222/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2222/comments
https://api.github.com/repos/coleifer/peewee/issues/2222/events
https://github.com/coleifer/peewee/issues/2222
652,624,172
MDU6SXNzdWU2NTI2MjQxNzI=
2,222
Question: is comma equivalent to & in where clause?
{ "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
[ "Yes, multiple expressions passed to `where()` are `AND`-ed together. It's typically cleaner to use parentheses, though, since python operator precedence seems to trip up a lot of people. Forcing the habit of using parentheses helps ensure they don't make a mistake.", "Great, thanks for clarifying.", "I think i...
2020-07-07T20:38:18
2022-07-17T03:11:22
2020-07-07T21:58:35
NONE
null
In this example in the docs: http://docs.peewee-orm.com/en/latest/peewee/querying.html#filtering-records `.where(Tweet.user == user, Tweet.is_published == True)` Is this the same as `.where((Tweet.user == user) & (Tweet.is_published == True))` ? I can't seem to find this comma syntax documented anywhere else.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2222/reactions", "total_count": 3, "+1": 3, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2222/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2221
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2221/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2221/comments
https://api.github.com/repos/coleifer/peewee/issues/2221/events
https://github.com/coleifer/peewee/issues/2221
651,762,730
MDU6SXNzdWU2NTE3NjI3MzA=
2,221
Calling db.atomic() for a transaction with a new or existing database fails
{ "login": "rmskinsa", "id": 64798846, "node_id": "MDQ6VXNlcjY0Nzk4ODQ2", "avatar_url": "https://avatars.githubusercontent.com/u/64798846?v=4", "gravatar_id": "", "url": "https://api.github.com/users/rmskinsa", "html_url": "https://github.com/rmskinsa", "followers_url": "https://api.github.com/users/rms...
[]
closed
false
null
[]
null
[ "MySQL does not support transactional DDL. If you had checked your database first, you probably would have found:\r\n\r\nhttps://dev.mysql.com/doc/refman/8.0/en/atomic-ddl.html\r\n\r\nNote the big **NOTE** section at the top.\r\n\r\nFor reference, Peewee is tested across all databases, including the use of transact...
2020-07-06T19:16:55
2020-07-06T21:01:57
2020-07-06T19:33:21
NONE
null
In `my_models.py`: ``` class RegionType(db.Model): name = CharField(unique=True, null=False) ``` In `my_flask_app.py`: ``` db = MySQLDatabase( app.config.get('DATABASE_NAME'), user=app.config.get('DATABASE_USER'), password=app.config.get('DATABASE_PASSWORD'), host=app.config.get('DATABA...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2221/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2221/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2220
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2220/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2220/comments
https://api.github.com/repos/coleifer/peewee/issues/2220/events
https://github.com/coleifer/peewee/issues/2220
651,644,596
MDU6SXNzdWU2NTE2NDQ1OTY=
2,220
Peewee crashes when applying distinct to an expression
{ "login": "StefanosChaliasos", "id": 15054312, "node_id": "MDQ6VXNlcjE1MDU0MzEy", "avatar_url": "https://avatars.githubusercontent.com/u/15054312?v=4", "gravatar_id": "", "url": "https://api.github.com/users/StefanosChaliasos", "html_url": "https://github.com/StefanosChaliasos", "followers_url": "https...
[]
closed
false
null
[]
null
[ "Thanks, this is now fixed." ]
2020-07-06T15:50:58
2020-07-07T13:39:49
2020-07-07T13:39:32
NONE
null
**Describe the bug** When applying `distinct` to an expression peewee crashes with `TypeError`. Beyond a table's column, in postgres distinct gets an [arbitrary expression](https://www.postgresql.org/docs/9.5/sql-select.html) **Expected behavior** ```python expr = (Model.column_a + Model.column_b).alias('expr') ...
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2220/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2220/timeline
null
completed
null
null
https://api.github.com/repos/coleifer/peewee/issues/2219
https://api.github.com/repos/coleifer/peewee
https://api.github.com/repos/coleifer/peewee/issues/2219/labels{/name}
https://api.github.com/repos/coleifer/peewee/issues/2219/comments
https://api.github.com/repos/coleifer/peewee/issues/2219/events
https://github.com/coleifer/peewee/issues/2219
651,251,740
MDU6SXNzdWU2NTEyNTE3NDA=
2,219
Override select()
{ "login": "wilberh", "id": 6799242, "node_id": "MDQ6VXNlcjY3OTkyNDI=", "avatar_url": "https://avatars.githubusercontent.com/u/6799242?v=4", "gravatar_id": "", "url": "https://api.github.com/users/wilberh", "html_url": "https://github.com/wilberh", "followers_url": "https://api.github.com/users/wilberh/...
[]
closed
false
null
[]
null
[ "Please quit spamming the same question. This is the third time you've posted some variation of this question. Asked and answered.", "Apologies; just trying to figure out any other way of removing double quotes. \r\nI'm using Impyla which is fully DB API v2.0 compiant. And the HiveServer2 (Hive) gives an error ...
2020-07-06T05:14:29
2020-07-06T18:01:35
2020-07-06T13:28:54
NONE
null
How can I override the select() method from the Model class? I need to remove remove the double quotes from the sql strings created by peewee so my DBAPI v2.0 compliant driver database can take it.
{ "url": "https://api.github.com/repos/coleifer/peewee/issues/2219/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }
https://api.github.com/repos/coleifer/peewee/issues/2219/timeline
null
completed
null
null