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/214 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/214/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/214/comments | https://api.github.com/repos/coleifer/peewee/issues/214/events | https://github.com/coleifer/peewee/issues/214 | 16,728,423 | MDU6SXNzdWUxNjcyODQyMw== | 214 | Usage of wildcards corrupted with Field coerce | {
"login": "johnmave126",
"id": 1661662,
"node_id": "MDQ6VXNlcjE2NjE2NjI=",
"avatar_url": "https://avatars.githubusercontent.com/u/1661662?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/johnmave126",
"html_url": "https://github.com/johnmave126",
"followers_url": "https://api.github.com/us... | [] | closed | false | null | [] | null | [
"Please close this issue\nI found it duplicate to #212 \n"
] | 2013-07-14T14:22:10 | 2013-07-14T16:20:29 | 2013-07-14T16:20:29 | NONE | null | Reproduction
``` python
class Sample(Model):
test = CharField(max_length=3)
Sample.create(test='123')
sq = Sample.select().filter(test__ilike='%123%')
assert sq.count() != 0
```
Root Cause:
Digg into the source code I found following lines:
peewee.py:775
``` python
if isinstance(expr.lhs, Field):
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/214/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/214/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/213 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/213/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/213/comments | https://api.github.com/repos/coleifer/peewee/issues/213/events | https://github.com/coleifer/peewee/issues/213 | 16,694,475 | MDU6SXNzdWUxNjY5NDQ3NQ== | 213 | Unable to retrieve columns from joined table (PostgreSQL) | {
"login": "SecurityForUs",
"id": 1146703,
"node_id": "MDQ6VXNlcjExNDY3MDM=",
"avatar_url": "https://avatars.githubusercontent.com/u/1146703?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/SecurityForUs",
"html_url": "https://github.com/SecurityForUs",
"followers_url": "https://api.github.... | [] | closed | false | null | [] | null | [
"Nevermind, I forgot in a join the joined table is in its own attribute. Closing.\n"
] | 2013-07-12T18:09:44 | 2013-07-12T18:12:41 | 2013-07-12T18:12:41 | NONE | null | I have two PgSQL tables (servers and api) where api.servers_id = servers.id. Here are my models:
``` python
class Servers(BaseModel):
id = BigIntegerField(primary_key=True)
user = ForeignKeyField(Users, cascade=True)
ipv4 = CharField(max_length=17)
ipv6 = CharField(max_length=45)
hostname = CharFi... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/213/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/213/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/212 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/212/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/212/comments | https://api.github.com/repos/coleifer/peewee/issues/212/events | https://github.com/coleifer/peewee/issues/212 | 16,534,635 | MDU6SXNzdWUxNjUzNDYzNQ== | 212 | Wildcard * does not act as "none or some characters", but as "some characters" | {
"login": "arnuschky",
"id": 179920,
"node_id": "MDQ6VXNlcjE3OTkyMA==",
"avatar_url": "https://avatars.githubusercontent.com/u/179920?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/arnuschky",
"html_url": "https://github.com/arnuschky",
"followers_url": "https://api.github.com/users/arnu... | [] | closed | false | null | [] | null | [
"With SQLite the `%` operator (case-sensitive like) actually uses the `GLOB` operation which is why it requires you use `*` as the wildcard. The `**` operator (case-insensitive like) uses `LIKE`. Confusing, right?\n\nBased on this script, I believe the \"*\" character is matching zero or more. Does it work for y... | 2013-07-09T16:37:45 | 2013-07-14T15:12:20 | 2013-07-10T13:11:42 | NONE | null | The following select (on SQLite):
User.select().where(User.name % "_joe_")
does not work if user name is exactly "joe". The wildcard does not act as "none or some characters", but as "some characters". (And thus behaves just like the '+' of regular expressions.)
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/212/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/212/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/211 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/211/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/211/comments | https://api.github.com/repos/coleifer/peewee/issues/211/events | https://github.com/coleifer/peewee/issues/211 | 16,427,397 | MDU6SXNzdWUxNjQyNzM5Nw== | 211 | field unique=True doesn't work? | {
"login": "jfmatth",
"id": 289202,
"node_id": "MDQ6VXNlcjI4OTIwMg==",
"avatar_url": "https://avatars.githubusercontent.com/u/289202?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jfmatth",
"html_url": "https://github.com/jfmatth",
"followers_url": "https://api.github.com/users/jfmatth/fo... | [] | closed | false | null | [] | null | [
"Call model.create_table instead. Db method just creates the table while model method creates indexes as well.\n",
"thanks, worked great!\n"
] | 2013-07-06T06:16:57 | 2013-07-06T23:47:27 | 2013-07-06T22:43:34 | NONE | null | Running the latest branch, and the following model doesn't create what I think it does, a unique constraint on the field.
```
import peewee
db = peewee.SqliteDatabase("test.db")
class table1(peewee.Model):
field1 = peewee.CharField(unique=True)
field2 = peewee.CharField(null=True)
class Meta:
da... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/211/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/211/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/210 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/210/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/210/comments | https://api.github.com/repos/coleifer/peewee/issues/210/events | https://github.com/coleifer/peewee/issues/210 | 16,136,447 | MDU6SXNzdWUxNjEzNjQ0Nw== | 210 | Extend deferred initialization to database kind | {
"login": "panta",
"id": 238501,
"node_id": "MDQ6VXNlcjIzODUwMQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/238501?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/panta",
"html_url": "https://github.com/panta",
"followers_url": "https://api.github.com/users/panta/followers"... | [] | closed | false | null | [] | null | [
"From docstring:\n\n``` python\n from peewee import *\n from playhouse.proxy import Proxy\n\n database_proxy = Proxy() # Create a proxy for our db.\n\n class BaseModel(Model):\n class Meta:\n database = database_proxy # Use proxy for our DB.\n\n class User(BaseModel):\n use... | 2013-06-28T10:45:45 | 2019-03-22T14:55:12 | 2013-06-29T00:47:55 | NONE | null | It would be useful in many circumstances to use different database flavors (Sqlite, MySQL, ...) depending on a configuration parameter.
Extending the mechanism of deferred initialization described in:
http://peewee.readthedocs.org/en/latest/peewee/cookbook.html#deferring-initialization
it would be nice to have somet... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/210/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/210/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/209 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/209/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/209/comments | https://api.github.com/repos/coleifer/peewee/issues/209/events | https://github.com/coleifer/peewee/issues/209 | 16,080,666 | MDU6SXNzdWUxNjA4MDY2Ng== | 209 | delete() doesn't handle order_by() | {
"login": "panta",
"id": 238501,
"node_id": "MDQ6VXNlcjIzODUwMQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/238501?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/panta",
"html_url": "https://github.com/panta",
"followers_url": "https://api.github.com/users/panta/followers"... | [] | closed | false | null | [] | null | [
"Postgresql does not support this, and Sqlite does but only if compiled with `SQLITE_ENABLE_UPDATE_DELETE_LIMIT`. Because it is only MySQL that supports this feature, I am going to pass on fixing it for now.\n\nThere have been similar features requests, from which you might be able to get some ideas:\n- #146 , add... | 2013-06-27T11:03:32 | 2013-06-27T13:49:07 | 2013-06-27T13:12:21 | NONE | null | ``` python
n_deleted = Log.delete().order_by(Log.when.asc()).limit(n_to_delete)
```
raises the following exception:
```
AttributeError: 'DeleteQuery' object has no attribute 'order_by'
```
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/209/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/209/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/208 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/208/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/208/comments | https://api.github.com/repos/coleifer/peewee/issues/208/events | https://github.com/coleifer/peewee/issues/208 | 16,053,943 | MDU6SXNzdWUxNjA1Mzk0Mw== | 208 | Aggregate(...) and fn.Max for DateTimeField should return datetime objects | {
"login": "passiomatic",
"id": 56371,
"node_id": "MDQ6VXNlcjU2Mzcx",
"avatar_url": "https://avatars.githubusercontent.com/u/56371?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/passiomatic",
"html_url": "https://github.com/passiomatic",
"followers_url": "https://api.github.com/users/pass... | [] | closed | false | null | [] | null | [
"Unfortunately, I'm not sure there's a great solution for this without resorting to hacks. It would be possible to special-case flat aggregation / annotations by introspecting the field type and then passing the value from the cursor through the field's `python_value` method, but I'm not sure how clean the impleme... | 2013-06-26T20:23:13 | 2013-06-27T22:21:20 | 2013-06-27T21:39:08 | NONE | null | I'm using Peewee 2.1.2, Python 2.6.1 with bundled sqlite3, see versions below:
```
>>> sqlite3.sqlite_version_info
(3, 6, 12)
>>> sqlite3.version_info
(2, 4, 1)
```
Test case to reproduce the problem:
``` python
from datetime import datetime
from peewee import *
the_db = SqliteDatabase(':memory:')
class MyModel... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/208/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/208/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/207 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/207/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/207/comments | https://api.github.com/repos/coleifer/peewee/issues/207/events | https://github.com/coleifer/peewee/issues/207 | 15,708,103 | MDU6SXNzdWUxNTcwODEwMw== | 207 | pwiz not generating foreign key fields? | {
"login": "jfmatth",
"id": 289202,
"node_id": "MDQ6VXNlcjI4OTIwMg==",
"avatar_url": "https://avatars.githubusercontent.com/u/289202?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jfmatth",
"html_url": "https://github.com/jfmatth",
"followers_url": "https://api.github.com/users/jfmatth/fo... | [] | closed | false | null | [] | null | [
"edit: fixed formatting.\n",
"Are you using MySQL?\n",
"If you're using MySQL you might test out using this query, which is how pwiz finds foreign keys:\n\n``` sql\nSELECT column_name, referenced_table_name, referenced_column_name\nFROM information_schema.key_column_usage\nWHERE table_name = \"your table name h... | 2013-06-18T19:47:50 | 2013-06-24T15:09:03 | 2013-06-24T15:09:03 | NONE | null | First off, love this project, keep it up!
I have a DB with lots of tables, but it's not 'connecting' the FK's.
Here's a sample:
```
describe Tickets
--------------
+-----------------+--------------+------+-----+--------------+----------------+
| Field | Type | Null | Key | Default | Extra ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/207/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/207/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/206 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/206/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/206/comments | https://api.github.com/repos/coleifer/peewee/issues/206/events | https://github.com/coleifer/peewee/issues/206 | 15,615,233 | MDU6SXNzdWUxNTYxNTIzMw== | 206 | Selecting multiple models / naive query | {
"login": "coleifer",
"id": 119974,
"node_id": "MDQ6VXNlcjExOTk3NA==",
"avatar_url": "https://avatars.githubusercontent.com/u/119974?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/coleifer",
"html_url": "https://github.com/coleifer",
"followers_url": "https://api.github.com/users/coleife... | [] | closed | false | null | [] | null | [] | 2013-06-17T03:17:46 | 2013-06-17T03:21:55 | 2013-06-17T03:21:55 | OWNER | null | It appears peewee is not correctly assigning attributes from a related model:
``` python
from peewee import SqliteDatabase, Model, PrimaryKeyField, CharField, \
IntegerField, ForeignKeyField
from playhouse.test_utils import test_database
test_db = SqliteDatabase(':memory:')
class Model1(Model):
id = PrimaryKeyFi... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/206/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/206/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/205 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/205/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/205/comments | https://api.github.com/repos/coleifer/peewee/issues/205/events | https://github.com/coleifer/peewee/pull/205 | 15,606,271 | MDExOlB1bGxSZXF1ZXN0NjM0NzMxOQ== | 205 | Choices attribute according to documentation | {
"login": "niedbalski",
"id": 821670,
"node_id": "MDQ6VXNlcjgyMTY3MA==",
"avatar_url": "https://avatars.githubusercontent.com/u/821670?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/niedbalski",
"html_url": "https://github.com/niedbalski",
"followers_url": "https://api.github.com/users/n... | [] | closed | false | null | [] | null | [
"I think I will pass on merging this as it consumes the choices iterable once upon field initialization. Rather, I will rely on the documentation.\n",
"OK, perfect.I always prefer the code that dies descriptively\n"
] | 2013-06-16T15:10:06 | 2014-07-06T01:50:58 | 2013-06-17T02:53:00 | CONTRIBUTOR | null | Hello!,
Added a validation for the choices field attribute. I started looking at this issue because WTForms-peewee raised an 'unpack error' using a field declared as Charfield(choices=('OPTION', 'OPTION')) , according to the peewee documentation this must be specified as (value, label) so i added a ValueError exceptio... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/205/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/205/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/205",
"html_url": "https://github.com/coleifer/peewee/pull/205",
"diff_url": "https://github.com/coleifer/peewee/pull/205.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/205.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/204 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/204/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/204/comments | https://api.github.com/repos/coleifer/peewee/issues/204/events | https://github.com/coleifer/peewee/issues/204 | 15,497,427 | MDU6SXNzdWUxNTQ5NzQyNw== | 204 | Add NOT IN operator. | {
"login": "rammie",
"id": 554792,
"node_id": "MDQ6VXNlcjU1NDc5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/554792?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rammie",
"html_url": "https://github.com/rammie",
"followers_url": "https://api.github.com/users/rammie/follow... | [] | closed | false | null | [] | null | [
"If you would like to negate an expression and are using the \"django-style\" lookups, you will need to wrap it in a `DQ` object and use unary negation:\n\n``` python\n\n# this query\n.where(~DQ(foo__in=[list of stuff]))\n\n# translates into this\n-- where NOT foo IN [list of stuff]\n```\n\nUnfortunately, I don't t... | 2013-06-13T10:05:15 | 2013-07-22T15:43:29 | 2013-07-22T02:23:13 | NONE | null | I'm not sure whether to file this in flask_peewee or peewee. But the lack of a not in operator in the DJANGO map prevents such queries from the rest api. Django allows this by using exclude. Adding NOT IN as an operator probably isn't the most elegant fix. But it would mitigate my problem.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/204/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/204/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/203 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/203/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/203/comments | https://api.github.com/repos/coleifer/peewee/issues/203/events | https://github.com/coleifer/peewee/pull/203 | 15,406,685 | MDExOlB1bGxSZXF1ZXN0NjI0OTU0Ng== | 203 | Add sample encoding setting | {
"login": "rcarmo",
"id": 392683,
"node_id": "MDQ6VXNlcjM5MjY4Mw==",
"avatar_url": "https://avatars.githubusercontent.com/u/392683?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rcarmo",
"html_url": "https://github.com/rcarmo",
"followers_url": "https://api.github.com/users/rcarmo/follow... | [] | closed | false | null | [] | null | [
"Thanks @rcarmo!\n",
"Don't mention it. Tell you what, I'll see if I can add more surgical samples like this - I'm using Peewee for a lot of stuff lately, and have all sorts of little recipes... \n\nOn Jun 11, 2013, at 17:04 , Charles Leifer notifications@github.com wrote:\n\n> Thanks @rcarmo!\n> \n> —\n> Reply t... | 2013-06-11T16:02:25 | 2014-07-06T01:51:00 | 2013-06-11T16:04:29 | CONTRIBUTOR | null | This will save non-English speakers hours of puttering around.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/203/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/203/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/203",
"html_url": "https://github.com/coleifer/peewee/pull/203",
"diff_url": "https://github.com/coleifer/peewee/pull/203.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/203.patch",
"merged_at": "2013-06-11T16:04:29"
} |
https://api.github.com/repos/coleifer/peewee/issues/202 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/202/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/202/comments | https://api.github.com/repos/coleifer/peewee/issues/202/events | https://github.com/coleifer/peewee/issues/202 | 15,281,162 | MDU6SXNzdWUxNTI4MTE2Mg== | 202 | Possible unicode issue | {
"login": "rcarmo",
"id": 392683,
"node_id": "MDQ6VXNlcjM5MjY4Mw==",
"avatar_url": "https://avatars.githubusercontent.com/u/392683?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rcarmo",
"html_url": "https://github.com/rcarmo",
"followers_url": "https://api.github.com/users/rcarmo/follow... | [] | closed | false | null | [] | null | [
"That's interesting... I know that there are some tests that cover unicode functionality. Can you create a testcase to reproduce this bug?\n",
"Erm.. the snippet of code I posted reproduces it on all my machines. That is my testcase, so to speak :)\n\nOn Jun 11, 2013, at 03:48 , Charles Leifer notifications@gith... | 2013-06-07T16:46:10 | 2013-06-11T15:30:43 | 2013-06-11T15:26:04 | CONTRIBUTOR | null | Hello there,
I've been trying to get the following to work right:
<pre>
import os, sys
sys.path.append('../lib')
from peewee import Model, PostgresqlDatabase, CharField
db = PostgresqlDatabase("test")
class Test(Model):
name = CharField(null=False)
class Meta:
database = db
Test.create_table(True... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/202/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/202/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/201 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/201/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/201/comments | https://api.github.com/repos/coleifer/peewee/issues/201/events | https://github.com/coleifer/peewee/issues/201 | 15,269,661 | MDU6SXNzdWUxNTI2OTY2MQ== | 201 | Uppercase table names not parsed correctly | {
"login": "ThomDietrich",
"id": 2870104,
"node_id": "MDQ6VXNlcjI4NzAxMDQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/2870104?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ThomDietrich",
"html_url": "https://github.com/ThomDietrich",
"followers_url": "https://api.github.com... | [] | closed | false | null | [] | null | [
"You can explicitly set the database table name to use:\n\nclass trafficRemaining(MySQLModel):\n customerID = IntegerField(primary_key=True)\n abc = IntegerField()\n\n```\nclass Meta:\n db_table = 'trafficRemaining'\n```\n\nOn Fri, Jun 7, 2013 at 7:24 AM, ThomDietrich notifications@github.comwrote:\n\n> He... | 2013-06-07T12:24:57 | 2013-06-11T02:43:16 | 2013-06-11T02:43:16 | NONE | null | Hey there,
I'm fresh to peewee and am trying to access existing mysql tables of mine.
It seems to me as peewee has problems with uppercase letters in table names...
My system: Ubuntu 12.04.2, mysql 14.14, python 2.7, peewee 2.1.2
```
class ratelist(MySQLModel):
prefix = CharField(primary_key=True)
name = Ch... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/201/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/201/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/200 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/200/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/200/comments | https://api.github.com/repos/coleifer/peewee/issues/200/events | https://github.com/coleifer/peewee/issues/200 | 15,135,887 | MDU6SXNzdWUxNTEzNTg4Nw== | 200 | Log sql command before it is executed instead of after | {
"login": "kwellman",
"id": 279549,
"node_id": "MDQ6VXNlcjI3OTU0OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/279549?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kwellman",
"html_url": "https://github.com/kwellman",
"followers_url": "https://api.github.com/users/kwellma... | [] | closed | false | null | [] | null | [] | 2013-06-04T19:15:08 | 2013-06-05T03:19:21 | 2013-06-05T03:19:21 | NONE | null | In the execute_sql function, logger.debug((sql, params)) is called after the sql command is executed.
Why not call it before so that if the sql command raises an exception the exact command that was executed has already been logged? This makes things easier to debug.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/200/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/200/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/199 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/199/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/199/comments | https://api.github.com/repos/coleifer/peewee/issues/199/events | https://github.com/coleifer/peewee/issues/199 | 15,051,806 | MDU6SXNzdWUxNTA1MTgwNg== | 199 | MySQL support for Python 3 | {
"login": "davidak",
"id": 91113,
"node_id": "MDQ6VXNlcjkxMTEz",
"avatar_url": "https://avatars.githubusercontent.com/u/91113?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/davidak",
"html_url": "https://github.com/davidak",
"followers_url": "https://api.github.com/users/davidak/follower... | [] | closed | false | null | [] | null | [
"Sorry to hear you had trouble with mysqldb. I'm not familiar with the Oracle driver, but there is a python-3 compatible pure python driver which will work automatically with peewee:\n\nhttps://github.com/petehunt/PyMySQL\n\nThe MySQLdb project does not yet support python 3, and in fact peewee just got py3k suppor... | 2013-06-03T05:19:34 | 2013-09-22T00:02:48 | 2013-06-03T12:25:24 | NONE | null | the last release of MySQLdb is from 02.11.2012 (MySQLdb-1.2.4 release candidate 1) and it doesn't support python 3.
maybe you or someone else have the time to let peewee support another MySQL Driver?
This one supports Python 3 already and is developed by Oracle:
https://pypi.python.org/pypi/mysql-connector-python
it... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/199/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/199/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/198 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/198/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/198/comments | https://api.github.com/repos/coleifer/peewee/issues/198/events | https://github.com/coleifer/peewee/issues/198 | 15,030,007 | MDU6SXNzdWUxNTAzMDAwNw== | 198 | Datetime fields with timezone | {
"login": "rcarmo",
"id": 392683,
"node_id": "MDQ6VXNlcjM5MjY4Mw==",
"avatar_url": "https://avatars.githubusercontent.com/u/392683?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rcarmo",
"html_url": "https://github.com/rcarmo",
"followers_url": "https://api.github.com/users/rcarmo/follow... | [] | closed | false | null | [] | null | [
"It is fairly straightforward to add support for custom fields: http://peewee.readthedocs.org/en/latest/peewee/models.html#creating-a-custom-field\n\nI also added a `DateTimeTZField` to the `playhouse.postgres_ext` module.\n",
"Awesome, thanks!\n"
] | 2013-06-01T17:31:44 | 2013-06-05T15:40:20 | 2013-06-03T00:43:47 | CONTRIBUTOR | null | This might be just me, but I cannot seem to be able to create DateTime fields with a timezone under Postgres. The [docs](http://www.postgresql.org/docs/9.1/static/datatype-datetime.html) state tacking on "with time zone" to the field spec should do it, but I haven't been able to figure out how to specify that in a Peew... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/198/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/198/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/197 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/197/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/197/comments | https://api.github.com/repos/coleifer/peewee/issues/197/events | https://github.com/coleifer/peewee/issues/197 | 14,983,802 | MDU6SXNzdWUxNDk4MzgwMg== | 197 | Field type CharField limited to 255 characters. | {
"login": "dstruck",
"id": 2195318,
"node_id": "MDQ6VXNlcjIxOTUzMTg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2195318?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dstruck",
"html_url": "https://github.com/dstruck",
"followers_url": "https://api.github.com/users/dstruck/... | [] | closed | false | null | [] | null | [
"Unfortunately, Pwiz does not introspect the size the a VARCHAR field.\n\nAdditionally, in order to not break compatibility with older versions of peewee, the `max_length` attribute defaults to `255`. So the following are equivalent:\n\n``` python\n\nfoo = CharField()\nbar = CharField(max_length=255)\n```\n\nIf yo... | 2013-05-31T08:42:56 | 2013-06-03T12:29:56 | 2013-06-02T20:57:28 | NONE | null | The field type "CharField" gets truncated to 255 characters. You can define VARCHAR fields in PostgreSQL of size bigger then 255.
Maybe one could raise an exception if a value gets cut off?
Test case:
``` python
'''
-- create test table in postgresql
CREATE TABLE sample(
id SERIAL PRIMARY KEY
,data ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/197/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/197/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/196 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/196/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/196/comments | https://api.github.com/repos/coleifer/peewee/issues/196/events | https://github.com/coleifer/peewee/issues/196 | 14,968,158 | MDU6SXNzdWUxNDk2ODE1OA== | 196 | Restore SQLite Full Text Search Support | {
"login": "wearpants",
"id": 505344,
"node_id": "MDQ6VXNlcjUwNTM0NA==",
"avatar_url": "https://avatars.githubusercontent.com/u/505344?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/wearpants",
"html_url": "https://github.com/wearpants",
"followers_url": "https://api.github.com/users/wear... | [] | closed | false | null | [] | null | [
"It's back! 0519ac68246a3a73aca9e653c1841183642061fd\n\nI mostly upgraded this from the old code, and still have some cleanups planned so be warned, the API may change a bit!\n"
] | 2013-05-30T23:58:51 | 2013-06-04T13:51:03 | 2013-06-04T13:51:03 | NONE | null | There [used to be](http://charlesleifer.com/blog/using-advanced-database-features-with-peewee-a-python-orm/) support for FTS3/4 in SQlite, but it went away some time.
Bring it back, for great justice!
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/196/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/196/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/195 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/195/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/195/comments | https://api.github.com/repos/coleifer/peewee/issues/195/events | https://github.com/coleifer/peewee/pull/195 | 14,755,717 | MDExOlB1bGxSZXF1ZXN0NTkzMDI4Nw== | 195 | add connections pool support | {
"login": "beanyoung",
"id": 973789,
"node_id": "MDQ6VXNlcjk3Mzc4OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/973789?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/beanyoung",
"html_url": "https://github.com/beanyoung",
"followers_url": "https://api.github.com/users/bean... | [] | closed | false | null | [] | null | [
"Interesting, I had not heard of dbutils. Thanks for sharing this!\n\nRegarding merging this, a third-party library dependency is not something I want to add to peewee. It might work better as a module in `playhouse`, though -- this is where I've been buliding little extensions to peewee. Another note, if you're... | 2013-05-25T09:31:02 | 2014-07-05T13:10:26 | 2013-05-31T04:49:36 | NONE | null | The connections pool is based on DBUtils and it works fine for me except that count() method of SelectQuery always return 0. But I can get the count with
``` python
Foo.select(fn.Count(Foo.id).alias('count')).get().count
```
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/195/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/195/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/195",
"html_url": "https://github.com/coleifer/peewee/pull/195",
"diff_url": "https://github.com/coleifer/peewee/pull/195.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/195.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/194 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/194/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/194/comments | https://api.github.com/repos/coleifer/peewee/issues/194/events | https://github.com/coleifer/peewee/issues/194 | 14,639,281 | MDU6SXNzdWUxNDYzOTI4MQ== | 194 | Model.create() doesn't set id field for BigIntegerField primary key | {
"login": "rudyryk",
"id": 4500,
"node_id": "MDQ6VXNlcjQ1MDA=",
"avatar_url": "https://avatars.githubusercontent.com/u/4500?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rudyryk",
"html_url": "https://github.com/rudyryk",
"followers_url": "https://api.github.com/users/rudyryk/followers"... | [] | closed | false | null | [] | null | [
"Thanks glad you like the library!\n\nUnfortunately, peewee's `PrimaryKeyField` is the only field that will handle auto-incrementing primary keys. If you want to use the BigIntegerField as an auto-incrementing primary key you will need to create a custom field type (probably by subclassing `PrimaryKeyField`):\n\nh... | 2013-05-22T18:56:54 | 2013-05-23T14:59:55 | 2013-05-23T14:59:55 | NONE | null | Hi! Peewee is awesome lib! :)
It sees there's an issue with BigIntegerField as primary key.
I define my model like that:
```
import peewee
db = peewee.SqliteDatabase('test.db')
class User(peewee.Model):
id = peewee.BigIntegerField(primary_key=True)
token = peewee.CharField(max_length=100, default='')
cla... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/194/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/194/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/193 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/193/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/193/comments | https://api.github.com/repos/coleifer/peewee/issues/193/events | https://github.com/coleifer/peewee/issues/193 | 14,250,763 | MDU6SXNzdWUxNDI1MDc2Mw== | 193 | db.connect() resets everything for in-memory sqlite | {
"login": "hasenj",
"id": 31078,
"node_id": "MDQ6VXNlcjMxMDc4",
"avatar_url": "https://avatars.githubusercontent.com/u/31078?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/hasenj",
"html_url": "https://github.com/hasenj",
"followers_url": "https://api.github.com/users/hasenj/followers",
... | [] | closed | false | null | [] | null | [
"The logic to open and close connections to the database does exactly that -- opens or closes a connection. That is a library operation and one that will not change or be special-cased. If in your application's request setup/teardown you are opening and closing connections, but would like to no-op while testing w... | 2013-05-13T08:47:39 | 2014-10-06T00:17:04 | 2013-05-13T13:25:21 | NONE | null | This is problematic for unit tests.
I usually have something like:
``` python
@app.before_request
def before_request():
db.connect()
```
because mysql connection dies out after a while and needs to be renewed all the time.
I also have `db.connect()` for the code the initializes the db and creates tables
But if... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/193/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/193/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/192 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/192/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/192/comments | https://api.github.com/repos/coleifer/peewee/issues/192/events | https://github.com/coleifer/peewee/issues/192 | 14,231,281 | MDU6SXNzdWUxNDIzMTI4MQ== | 192 | Incorrect SQL params in order_by expression | {
"login": "jamorton",
"id": 18852,
"node_id": "MDQ6VXNlcjE4ODUy",
"avatar_url": "https://avatars.githubusercontent.com/u/18852?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jamorton",
"html_url": "https://github.com/jamorton",
"followers_url": "https://api.github.com/users/jamorton/foll... | [] | closed | false | null | [] | null | [
"Thanks!\n"
] | 2013-05-12T06:20:12 | 2013-05-12T16:20:28 | 2013-05-12T15:57:18 | NONE | null | ```
Player.select().order_by(Player.elo * 5)
```
printing the SQL:
```
('SELECT t1."id", t1."created_at", t1."last_modified", t1."wins_t", t1."wins_z", t1."wins_p", t1."losses_t", t1."losses_z", t1."losses_p", t1."username", t1."race", t1."elo" FROM "player" AS t1 ORDER BY (t1."elo" * ?)', [])
```
error:
```
Traceb... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/192/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/192/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/191 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/191/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/191/comments | https://api.github.com/repos/coleifer/peewee/issues/191/events | https://github.com/coleifer/peewee/issues/191 | 13,991,362 | MDU6SXNzdWUxMzk5MTM2Mg== | 191 | No transactions support for MySQL | {
"login": "haykinson",
"id": 31075,
"node_id": "MDQ6VXNlcjMxMDc1",
"avatar_url": "https://avatars.githubusercontent.com/u/31075?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/haykinson",
"html_url": "https://github.com/haykinson",
"followers_url": "https://api.github.com/users/haykinson/... | [] | closed | false | null | [] | null | [
"If you are using MySQL first be sure you are using InnoDB, as MyISAM does not support transactions:\n\nhttp://dev.mysql.com/doc/refman/5.0/en/ansi-diff-transactions.html\n\nSecondly, peewee will not explicitly execute 'begin', 'commit' SQL -- rather it will call the appropriate methods on the db driver. For examp... | 2013-05-06T07:42:34 | 2014-10-27T15:56:11 | 2013-05-06T14:34:26 | NONE | null | As far as I can tell, peewee just toggles autocommit on and off for transaction support. This is not really enough -- you need the START TRANSACTION / COMMIT / ROLLBACK commands issued too.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/191/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/191/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/190 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/190/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/190/comments | https://api.github.com/repos/coleifer/peewee/issues/190/events | https://github.com/coleifer/peewee/pull/190 | 13,963,963 | MDExOlB1bGxSZXF1ZXN0NTUzMTE1MA== | 190 | Added an example for postgresql array type custom field in model docs | {
"login": "diffused",
"id": 32428,
"node_id": "MDQ6VXNlcjMyNDI4",
"avatar_url": "https://avatars.githubusercontent.com/u/32428?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/diffused",
"html_url": "https://github.com/diffused",
"followers_url": "https://api.github.com/users/diffused/foll... | [] | closed | false | null | [] | null | [
"Dang, does that \"just work\" ?\n",
"So you are missing code to register the field with the database class -- db_field should be \"textarray\" and then you register the type \"textarray\" with \"Text[]\".\n\nI tested this myself and got it working, but because peewee doesn't support (yet) any interesting array o... | 2013-05-04T12:56:04 | 2014-07-06T01:51:03 | 2013-05-04T13:39:24 | NONE | null | Thought this might help in the docs.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/190/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/190/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/190",
"html_url": "https://github.com/coleifer/peewee/pull/190",
"diff_url": "https://github.com/coleifer/peewee/pull/190.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/190.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/189 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/189/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/189/comments | https://api.github.com/repos/coleifer/peewee/issues/189/events | https://github.com/coleifer/peewee/issues/189 | 13,956,863 | MDU6SXNzdWUxMzk1Njg2Mw== | 189 | TypeError when inspecting a MySQL DB | {
"login": "erkurita",
"id": 240697,
"node_id": "MDQ6VXNlcjI0MDY5Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/240697?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/erkurita",
"html_url": "https://github.com/erkurita",
"followers_url": "https://api.github.com/users/erkurit... | [] | closed | false | null | [] | null | [
"Thanks for reporting!\n",
"@coleifer, I guess that's more elegant (and solves the problem too):\n\n```\ndiff --git a/pwiz.py b/pwiz.py\nindex d20ebf5..5c61d21 100755\n--- a/pwiz.py\n+++ b/pwiz.py\n@@ -308,8 +308,8 @@ def introspect(db, schema=None):\n for table in tables:\n col_meta[table] = {}\n ... | 2013-05-03T23:31:43 | 2013-05-04T13:32:34 | 2013-05-04T00:16:03 | NONE | null | I'm getting the following error when executing this command:
```
python pwiz.py -u root --password="<password>" -e mysql elecciones_2013 > ~/schema_elecciones.py
```
The error is:
```
Traceback (most recent call last):
File "pwiz.py", line 417, in <module>
print_models(options.engine, database, tables, **conne... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/189/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/189/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/188 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/188/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/188/comments | https://api.github.com/repos/coleifer/peewee/issues/188/events | https://github.com/coleifer/peewee/issues/188 | 13,885,085 | MDU6SXNzdWUxMzg4NTA4NQ== | 188 | TypeError when running a 'COPY' command on Postgres | {
"login": "bwghughes",
"id": 7694,
"node_id": "MDQ6VXNlcjc2OTQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/7694?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bwghughes",
"html_url": "https://github.com/bwghughes",
"followers_url": "https://api.github.com/users/bwghughes/fo... | [] | closed | false | null | [] | null | [
"Thanks for the excellent bug report. I think I need to clarify the docs a bit -- `RawQuery` was meant to be used for expressing `SELECT` statements. RawQuery is there to give you a way to specify any select statement and _return model instances_.\n\nIf you just want to execute some plain old SQL, try:\n\n``` pyt... | 2013-05-02T10:24:19 | 2013-05-02T13:49:26 | 2013-05-02T13:48:52 | NONE | null | I'm loading a CSV file on Postgres using the COPY command, and get a TypeError (I think its because the COPY command returns None).
Here's the code:
``` python
def seed_towns():
print "Seeding Towns tables..."
towns_file = os.path.join(os.path.abspath(os.curdir), 'data/uk-towns-list/uk-towns.csv')
Town.dr... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/188/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/188/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/187 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/187/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/187/comments | https://api.github.com/repos/coleifer/peewee/issues/187/events | https://github.com/coleifer/peewee/issues/187 | 13,858,977 | MDU6SXNzdWUxMzg1ODk3Nw== | 187 | Unexpected LIKE operations | {
"login": "dmwyatt",
"id": 163359,
"node_id": "MDQ6VXNlcjE2MzM1OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/163359?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dmwyatt",
"html_url": "https://github.com/dmwyatt",
"followers_url": "https://api.github.com/users/dmwyatt/fo... | [] | closed | false | null | [] | null | [
"I don't blame you for being a bit confused... SQLite's `LIKE` operator is case-insensitive by default. To get case-sensitive matching, peewee uses the SQLite `GLOB` operator instead, which uses \"*\" as wildcards.\n\nSo -- if you want case-insensitive matching, use ILIKE (peewee expresses this as `**`) with \"%\... | 2013-05-01T18:10:20 | 2016-01-01T22:15:38 | 2013-05-02T02:56:59 | NONE | null | The following LIKE query gets me nothing:
```
In [22]: movies =models.Movie.select().where(models.Movie.name % '%I%')
In [23]: for m in movies:
....: print m
....:
```
Using ILIKE works:
```
In [26]: movies =models.Movie.select().where(models.Movie.name ** '%i%')
In [27]: for m in m... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/187/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/187/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/186 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/186/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/186/comments | https://api.github.com/repos/coleifer/peewee/issues/186/events | https://github.com/coleifer/peewee/pull/186 | 13,767,731 | MDExOlB1bGxSZXF1ZXN0NTQyNzk0Nw== | 186 | OR operator in multiple where conditions | {
"login": "niedbalski",
"id": 821670,
"node_id": "MDQ6VXNlcjgyMTY3MA==",
"avatar_url": "https://avatars.githubusercontent.com/u/821670?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/niedbalski",
"html_url": "https://github.com/niedbalski",
"followers_url": "https://api.github.com/users/n... | [] | closed | false | null | [] | null | [
"You can actually use python's `reduce` function to generate dynamic lists of OR-ed together clauses.\n\n``` python\n\nimport operator\nor_conditions = reduce(operator.or_, conditions)\nq = q.where(or_conditions)\n```\n",
"OK, But now you are forcing the AND operator on WHERE conditions. Why you cannot expose thi... | 2013-04-29T16:08:32 | 2014-06-30T15:13:52 | 2013-04-29T16:11:06 | CONTRIBUTOR | null | Currently is not possible to specify the operator kind between multiple WHERE conditions, AND condition is assumed:
``` sql
WHERE ((((t2."kind" = ?) AND (t2."value" <= ?)) *OR* ((t2."kind" = ?) AND (t2."value" <= ?))) AND (t1."state" = ?))
```
Now is possible to specify the operator for each WHERE condition, using th... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/186/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/186/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/186",
"html_url": "https://github.com/coleifer/peewee/pull/186",
"diff_url": "https://github.com/coleifer/peewee/pull/186.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/186.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/185 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/185/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/185/comments | https://api.github.com/repos/coleifer/peewee/issues/185/events | https://github.com/coleifer/peewee/issues/185 | 13,671,557 | MDU6SXNzdWUxMzY3MTU1Nw== | 185 | Integer primary keys are expected to become AUTO_INCREMENT? | {
"login": "moraes",
"id": 3164,
"node_id": "MDQ6VXNlcjMxNjQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/3164?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/moraes",
"html_url": "https://github.com/moraes",
"followers_url": "https://api.github.com/users/moraes/followers",
... | [] | closed | false | null | [] | null | [
"I must use PrimaryKeyField. Dooh. Sorry for being so stupid.\n"
] | 2013-04-26T02:47:35 | 2013-04-26T10:00:41 | 2013-04-26T10:00:17 | NONE | null | For the snippet:
```
class foo(peewee.Model):
id = peewee.IntegerField(primary_key=True)
db.compiler().create_table(foo, False)
```
The SQL generated for a MySQL database was:
```
CREATE TABLE `foo` (`id` INTEGER NOT NULL PRIMARY KEY)
```
Should I expect `AUTO_INCREMENT` to be added to `id`? I may have misunde... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/185/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/185/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/184 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/184/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/184/comments | https://api.github.com/repos/coleifer/peewee/issues/184/events | https://github.com/coleifer/peewee/issues/184 | 13,670,284 | MDU6SXNzdWUxMzY3MDI4NA== | 184 | Pwiz invalid names | {
"login": "coleifer",
"id": 119974,
"node_id": "MDQ6VXNlcjExOTk3NA==",
"avatar_url": "https://avatars.githubusercontent.com/u/119974?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/coleifer",
"html_url": "https://github.com/coleifer",
"followers_url": "https://api.github.com/users/coleife... | [] | closed | false | null | [] | null | [
"I believe this is fixed in 525f1ee884155d\n"
] | 2013-04-26T01:47:44 | 2013-04-26T01:58:43 | 2013-04-26T01:58:43 | OWNER | null | Pwiz can generate bad names for tables, e.g. table named "Foo/Bar"
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/184/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/184/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/183 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/183/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/183/comments | https://api.github.com/repos/coleifer/peewee/issues/183/events | https://github.com/coleifer/peewee/issues/183 | 13,670,208 | MDU6SXNzdWUxMzY3MDIwOA== | 183 | Peewee with Google Cloud SQL | {
"login": "moraes",
"id": 3164,
"node_id": "MDQ6VXNlcjMxNjQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/3164?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/moraes",
"html_url": "https://github.com/moraes",
"followers_url": "https://api.github.com/users/moraes/followers",
... | [] | closed | false | null | [] | null | [
"Hmm...I wonder where a good place would be to put this information? Having not tested cloud sql myself I'm reluctant to add something like this to \"playhouse\", but it does seem like useful information to put somewhere...Maybe I'll add a new section to the docs.\n",
"http://peewee.readthedocs.org/en/latest/pee... | 2013-04-26T01:44:30 | 2014-06-07T21:51:15 | 2013-04-26T02:14:30 | NONE | null | For the record, here's a recipe to use Peewee with Google Cloud SQL on App Engine Python SDK. Cloud SQL uses MySql, so the only difference is the connection:
```
from google.appengine.api import rdbms
import peewee
class AppEngineDatabase(peewee.MySQLDatabase):
def _connect(self, database, **kwargs):
if '... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/183/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/183/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/182 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/182/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/182/comments | https://api.github.com/repos/coleifer/peewee/issues/182/events | https://github.com/coleifer/peewee/pull/182 | 13,603,016 | MDExOlB1bGxSZXF1ZXN0NTM0OTk1Mw== | 182 | save field_dict len validation. | {
"login": "niedbalski",
"id": 821670,
"node_id": "MDQ6VXNlcjgyMTY3MA==",
"avatar_url": "https://avatars.githubusercontent.com/u/821670?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/niedbalski",
"html_url": "https://github.com/niedbalski",
"followers_url": "https://api.github.com/users/n... | [] | closed | false | null | [] | null | [
"I think the correct fix is to make the INSERT generation smarter, I've been aware of this issue for a while but it only crops up with models consisting of a single auto-incrementing primary key. I'm not sure why anyone would have a model like that, so I haven't bothered to fix it yet.\n",
"Hello Coleifer,\n\nMy... | 2013-04-24T18:43:14 | 2014-07-06T01:51:05 | 2013-04-25T14:32:58 | CONTRIBUTOR | null | Running this code:
> > > x = ModelInstance()
> > > x.save()
Trigger this:
```
1719 def execute_sql(self, sql, params=None, require_commit=True):
1720 cursor = self.get_cursor()
-> 1721 res = cursor.execute(sql, params or ())
1722 if require_commit and self.get_autocommit():
17... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/182/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/182/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/182",
"html_url": "https://github.com/coleifer/peewee/pull/182",
"diff_url": "https://github.com/coleifer/peewee/pull/182.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/182.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/181 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/181/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/181/comments | https://api.github.com/repos/coleifer/peewee/issues/181/events | https://github.com/coleifer/peewee/pull/181 | 13,593,581 | MDExOlB1bGxSZXF1ZXN0NTM0NTE1MQ== | 181 | Readme modified for table creation/drop on multiple models. | {
"login": "niedbalski",
"id": 821670,
"node_id": "MDQ6VXNlcjgyMTY3MA==",
"avatar_url": "https://avatars.githubusercontent.com/u/821670?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/niedbalski",
"html_url": "https://github.com/niedbalski",
"followers_url": "https://api.github.com/users/n... | [] | closed | false | null | [] | null | [] | 2013-04-24T15:27:29 | 2014-07-06T01:51:07 | 2013-04-24T16:10:39 | CONTRIBUTOR | null | Modified readme to exemplify the use of create_model_tables and drop_model_tables
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/181/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/181/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/181",
"html_url": "https://github.com/coleifer/peewee/pull/181",
"diff_url": "https://github.com/coleifer/peewee/pull/181.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/181.patch",
"merged_at": "2013-04-24T16:10:39"
} |
https://api.github.com/repos/coleifer/peewee/issues/180 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/180/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/180/comments | https://api.github.com/repos/coleifer/peewee/issues/180/events | https://github.com/coleifer/peewee/pull/180 | 12,840,607 | MDExOlB1bGxSZXF1ZXN0NDk5ODI0NQ== | 180 | Only use valid kwargs for update and insert | {
"login": "tax",
"id": 97768,
"node_id": "MDQ6VXNlcjk3NzY4",
"avatar_url": "https://avatars.githubusercontent.com/u/97768?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tax",
"html_url": "https://github.com/tax",
"followers_url": "https://api.github.com/users/tax/followers",
"following... | [] | closed | false | null | [] | null | [
"@tax, thank you for your message and the PR, I'm glad you're liking using \"peewee\".\n\nThe KeyError is intentional -- I think its better to raise an exception than not insert/update something because the user made a typo.\n"
] | 2013-04-05T10:49:16 | 2014-07-06T01:51:08 | 2013-04-05T13:54:39 | NONE | null | Hi Charles, thanks for creating this excellent lightweight project, it is super simple and fun to work with.
I ran in to a problem in a project when passing on a dict to the update query of a model this raised a KeyError because one of the keys in the dict was not a field in the model.
This could be by design, if not ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/180/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/180/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/180",
"html_url": "https://github.com/coleifer/peewee/pull/180",
"diff_url": "https://github.com/coleifer/peewee/pull/180.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/180.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/179 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/179/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/179/comments | https://api.github.com/repos/coleifer/peewee/issues/179/events | https://github.com/coleifer/peewee/issues/179 | 12,633,859 | MDU6SXNzdWUxMjYzMzg1OQ== | 179 | Updating peewee class fields via dictionary | {
"login": "henrikstroem",
"id": 907338,
"node_id": "MDQ6VXNlcjkwNzMzOA==",
"avatar_url": "https://avatars.githubusercontent.com/u/907338?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/henrikstroem",
"html_url": "https://github.com/henrikstroem",
"followers_url": "https://api.github.com/u... | [] | closed | false | null | [] | null | [
"Rather than implementing this as a part of peewee, feel free to subclass `Model` and implement it yourself.\n"
] | 2013-03-30T19:00:40 | 2013-03-31T04:56:22 | 2013-03-31T04:56:22 | NONE | null | Feature request.
In Python, you can update object fields via `self.__dict__.update(dictionary)` - this saves a lot of code when reading in data from text files.
Peewee object fields can't be updated in this way, so it would be nice with a convenience method that let you hand a dictionary to a Model object, and have t... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/179/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/179/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/178 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/178/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/178/comments | https://api.github.com/repos/coleifer/peewee/issues/178/events | https://github.com/coleifer/peewee/issues/178 | 12,616,910 | MDU6SXNzdWUxMjYxNjkxMA== | 178 | Change default charset in MySql's create table statements | {
"login": "ibraaaa",
"id": 4008455,
"node_id": "MDQ6VXNlcjQwMDg0NTU=",
"avatar_url": "https://avatars.githubusercontent.com/u/4008455?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ibraaaa",
"html_url": "https://github.com/ibraaaa",
"followers_url": "https://api.github.com/users/ibraaaa/... | [] | closed | false | null | [] | null | [
"I can appreciate the confusion this problem may cause, but this is not within the scope of peewee which is just an ORM.\n\nCheck out http://dev.mysql.com/doc/refman/5.0/en/charset-database.html if you want to set the charset for your database.\n",
"When the peewee create table it sets the charset as latin1_swedi... | 2013-03-29T19:58:13 | 2016-07-15T13:47:53 | 2013-03-30T03:03:11 | NONE | null | For MySql, when I try to insert text encoded in utf8 into a table, the text is scrambled. The issue is that the default charset for tables is latin1, to fix this I need to ALTER a table after its creation to change the charset. Providing such option from inside peewee will be helpful.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/178/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/178/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/177 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/177/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/177/comments | https://api.github.com/repos/coleifer/peewee/issues/177/events | https://github.com/coleifer/peewee/issues/177 | 12,454,609 | MDU6SXNzdWUxMjQ1NDYwOQ== | 177 | Mod function or escape | {
"login": "andmart",
"id": 303252,
"node_id": "MDQ6VXNlcjMwMzI1Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/303252?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/andmart",
"html_url": "https://github.com/andmart",
"followers_url": "https://api.github.com/users/andmart/fo... | [] | closed | false | null | [] | null | [
"Unfortunately, peewee does not support modulo out of the box (because I ran out of operators to overload).\n\nYou can create your own operators, though...perhaps I should add this to the docs. There are some cool examples in `playhouse.postgresql_ext` where I add operators for various hstore functions. Here's ho... | 2013-03-26T15:38:29 | 2013-03-29T01:20:11 | 2013-03-29T01:08:28 | NONE | null | I can't do a query where have to recover only even numbers.
Something like that:
Number.select().where(Number.number % 2 == 0)
This way, peewee 'translates' % for GLOB.
So, is there a way to escape % operator or a peewee.fn.Mod function?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/177/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/177/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/176 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/176/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/176/comments | https://api.github.com/repos/coleifer/peewee/issues/176/events | https://github.com/coleifer/peewee/issues/176 | 12,445,169 | MDU6SXNzdWUxMjQ0NTE2OQ== | 176 | can't create a model that inherits from "dict" | {
"login": "farialima",
"id": 1914172,
"node_id": "MDQ6VXNlcjE5MTQxNzI=",
"avatar_url": "https://avatars.githubusercontent.com/u/1914172?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/farialima",
"html_url": "https://github.com/farialima",
"followers_url": "https://api.github.com/users/fa... | [] | closed | false | null | [] | null | [
"Ah, thanks -- I will clarify that if statement!\n",
"aren't there a few other places where a similar fix would be needed ?\n",
"Curious, how would you use peewee to inherit from dict, and then use it as a dict?\n\nI tried farialima's model but standard dict features didn't work.\n\nI have a need to use the DB ... | 2013-03-26T11:52:44 | 2013-07-06T22:40:07 | 2013-03-26T15:39:04 | NONE | null | the following code:
```
class MyModel(Model, dict):
class Meta:
database = SqliteDatabase(':memory:')
id = CharField(primary_key=True)
o = MyModel()
print repr(o.id)
```
will show:
`<peewee.CharField object at 0x1079ca5d0>`
instead of the expected:
`None`
The problem is that o is an empty dictionary ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/176/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/176/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/175 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/175/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/175/comments | https://api.github.com/repos/coleifer/peewee/issues/175/events | https://github.com/coleifer/peewee/issues/175 | 12,370,762 | MDU6SXNzdWUxMjM3MDc2Mg== | 175 | Primary key reset on save | {
"login": "henrikstroem",
"id": 907338,
"node_id": "MDQ6VXNlcjkwNzMzOA==",
"avatar_url": "https://avatars.githubusercontent.com/u/907338?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/henrikstroem",
"html_url": "https://github.com/henrikstroem",
"followers_url": "https://api.github.com/u... | [] | closed | false | null | [] | null | [
"Primary keys are not being inherited correctly -- I will look into it and thank you for the excellent bug report!\n"
] | 2013-03-24T08:02:43 | 2013-03-24T17:21:03 | 2013-03-24T17:21:03 | NONE | null | In some situations, the Peewee will reset the (non-integer) primary key when saving an object. I have constructed this example to clarify:
```
#!/usr/bin/python
from peewee import *
import uuid
db = SqliteDatabase('./db/' + str(uuid.uuid4()) + '.db')
class A(Model):
id = CharField(primary_key=True)
def __in... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/175/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/175/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/174 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/174/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/174/comments | https://api.github.com/repos/coleifer/peewee/issues/174/events | https://github.com/coleifer/peewee/issues/174 | 12,300,308 | MDU6SXNzdWUxMjMwMDMwOA== | 174 | Order of expressions matters when doing IN subqueries | {
"login": "coryalder",
"id": 135608,
"node_id": "MDQ6VXNlcjEzNTYwOA==",
"avatar_url": "https://avatars.githubusercontent.com/u/135608?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/coryalder",
"html_url": "https://github.com/coryalder",
"followers_url": "https://api.github.com/users/cory... | [] | closed | false | null | [] | null | [
"Wow, thanks for reporting. I'll try and get a look at this tonight.\n",
"Should be fixed in 92aec9da99f4fe8bf23ffed4cf9dc8b5971e4b4a\n",
"Confirmed!\n\nThanks so much\n"
] | 2013-03-21T23:23:19 | 2013-03-28T18:00:30 | 2013-03-23T18:56:13 | NONE | null | Hey, I've found an odd little edge case
```
device = get_object_or_404(Device, Device.id == identifier)
my_messages = Message.select().join(Notification).join(Device).where(Device.id == device.id)
messages = Message.select().where((Message.id << my_messages) | (Message.query == "*"))
```
This query fails with the err... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/174/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/174/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/173 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/173/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/173/comments | https://api.github.com/repos/coleifer/peewee/issues/173/events | https://github.com/coleifer/peewee/issues/173 | 12,287,735 | MDU6SXNzdWUxMjI4NzczNQ== | 173 | Support for multiprocessing connection or sessions handlers similar to SQL Alchemy Engine | {
"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 | [
"Can you get into more detail? What kind of issues are you seeing.\n",
"We were creating the DB connection object in the model.py class and then\nimporting it the same in the parent and child process. So it wasn't a\nconnection issue but rather a shared object/namespace issue in Python with\nmultiprocessing. We... | 2013-03-21T18:14:38 | 2013-03-31T04:56:58 | 2013-03-31T04:56:58 | NONE | null | Looking for an easy way to implement multiprocessing with peewee. I'm running into locking issues because the Pwiz generated model or basemodel class does not support closing the database connection after each call. Any ideas?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/173/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/173/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/172 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/172/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/172/comments | https://api.github.com/repos/coleifer/peewee/issues/172/events | https://github.com/coleifer/peewee/pull/172 | 12,270,994 | MDExOlB1bGxSZXF1ZXN0NDczNzg0Ng== | 172 | Changed the test_suite thingy in setup.py | {
"login": "sYnfo",
"id": 1011548,
"node_id": "MDQ6VXNlcjEwMTE1NDg=",
"avatar_url": "https://avatars.githubusercontent.com/u/1011548?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/sYnfo",
"html_url": "https://github.com/sYnfo",
"followers_url": "https://api.github.com/users/sYnfo/follower... | [] | closed | false | null | [] | null | [
"Thank you! I was wondering, could you please update the pypi package with these? I would like to make a rpm package out of this and that would greatly simplify things for me.\n",
"v2.0.9 pushed!\n",
"Thank you :)\n"
] | 2013-03-21T12:05:33 | 2014-06-25T22:58:55 | 2013-03-22T04:56:10 | CONTRIBUTOR | null | ...which makes 'python setup.py test' work.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/172/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/172/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/172",
"html_url": "https://github.com/coleifer/peewee/pull/172",
"diff_url": "https://github.com/coleifer/peewee/pull/172.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/172.patch",
"merged_at": "2013-03-22T04:56:10"
} |
https://api.github.com/repos/coleifer/peewee/issues/171 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/171/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/171/comments | https://api.github.com/repos/coleifer/peewee/issues/171/events | https://github.com/coleifer/peewee/pull/171 | 12,270,695 | MDExOlB1bGxSZXF1ZXN0NDczNzY3MA== | 171 | No tests in source distribution -- MANIFEST.in fix | {
"login": "sYnfo",
"id": 1011548,
"node_id": "MDQ6VXNlcjEwMTE1NDg=",
"avatar_url": "https://avatars.githubusercontent.com/u/1011548?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/sYnfo",
"html_url": "https://github.com/sYnfo",
"followers_url": "https://api.github.com/users/sYnfo/follower... | [] | closed | false | null | [] | null | [] | 2013-03-21T11:55:36 | 2014-07-06T01:51:14 | 2013-03-22T04:55:59 | CONTRIBUTOR | null | Hi there,
currently the tests are not included in the source distribution and I figured it may be good to put them in.
Also, I'm fairly new to this Pull Request business, so please let me know if I'm doing something wrong. ^^
Regards,
Matt
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/171/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/171/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/171",
"html_url": "https://github.com/coleifer/peewee/pull/171",
"diff_url": "https://github.com/coleifer/peewee/pull/171.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/171.patch",
"merged_at": "2013-03-22T04:55:59"
} |
https://api.github.com/repos/coleifer/peewee/issues/170 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/170/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/170/comments | https://api.github.com/repos/coleifer/peewee/issues/170/events | https://github.com/coleifer/peewee/issues/170 | 12,075,176 | MDU6SXNzdWUxMjA3NTE3Ng== | 170 | Better null detection in pwiz | {
"login": "coleifer",
"id": 119974,
"node_id": "MDQ6VXNlcjExOTk3NA==",
"avatar_url": "https://avatars.githubusercontent.com/u/119974?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/coleifer",
"html_url": "https://github.com/coleifer",
"followers_url": "https://api.github.com/users/coleife... | [] | closed | false | null | [] | null | [
"Fixed\n"
] | 2013-03-15T18:23:37 | 2013-03-19T04:41:32 | 2013-03-19T04:41:32 | OWNER | null | See https://github.com/django/django/commit/ccc0e122d4 for inspiration
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/170/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/170/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/169 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/169/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/169/comments | https://api.github.com/repos/coleifer/peewee/issues/169/events | https://github.com/coleifer/peewee/issues/169 | 11,850,404 | MDU6SXNzdWUxMTg1MDQwNA== | 169 | connections pool support | {
"login": "beanyoung",
"id": 973789,
"node_id": "MDQ6VXNlcjk3Mzc4OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/973789?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/beanyoung",
"html_url": "https://github.com/beanyoung",
"followers_url": "https://api.github.com/users/bean... | [] | closed | false | null | [] | null | [
"Thanks for your question -- at this time I have no plans to include this as part of peewee. Typically I've seen connection pooling done upstream, e.g. pgpool/pgbouncer. To be completely honest, I have not done the research necessary to build a robust connection pool -- if at some point i did add this i'd probabl... | 2013-03-10T09:55:07 | 2013-03-10T16:30:32 | 2013-03-10T16:30:32 | NONE | null | Is peewee going to support connections pool in the future?
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/169/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/169/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/168 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/168/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/168/comments | https://api.github.com/repos/coleifer/peewee/issues/168/events | https://github.com/coleifer/peewee/issues/168 | 11,732,316 | MDU6SXNzdWUxMTczMjMxNg== | 168 | Model.prepared not called for side loaded .join records | {
"login": "jhorman",
"id": 323697,
"node_id": "MDQ6VXNlcjMyMzY5Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/323697?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jhorman",
"html_url": "https://github.com/jhorman",
"followers_url": "https://api.github.com/users/jhorman/fo... | [] | closed | false | null | [] | null | [
"I believe this is correct, if somewhat odd, behavior. I'm going to mark this as wontfix for now.\n",
"To my understanding, the contract is that if you are going to populate a model, you will call \"prepared\" on it. The idea that sometimes a model I use will have prepared called, and sometimes not, sort of make... | 2013-03-06T20:57:19 | 2013-03-18T04:10:49 | 2013-03-18T04:10:49 | CONTRIBUTOR | null | I am using query.join(User) to enhance the performance of a set of queries. My model also defines a Model.prepared so I can preinitialize some virtual fields. It seems that when a record is loaded via the .join, .prepared isn't called. I ended up doing
```
def prepared(self):
super(MyObject, self).prepared()
s... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/168/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/168/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/167 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/167/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/167/comments | https://api.github.com/repos/coleifer/peewee/issues/167/events | https://github.com/coleifer/peewee/issues/167 | 11,563,424 | MDU6SXNzdWUxMTU2MzQyNA== | 167 | ORDER BY with multiple DESC fields broken for Postgres | {
"login": "jhorman",
"id": 323697,
"node_id": "MDQ6VXNlcjMyMzY5Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/323697?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jhorman",
"html_url": "https://github.com/jhorman",
"followers_url": "https://api.github.com/users/jhorman/fo... | [] | closed | false | null | [] | null | [
"Thank you for pointing this out, I will address this\n",
"You know, I tried to replicate this issue and was not seeing the same problem... can you give any more specifics?\n\n``` python\n\nusers = User.select().order_by(User.username.desc(), User.id.desc())\nipdb> users\n<class 'tests.User'> SELECT t1.\"id\", t1... | 2013-03-01T21:43:46 | 2013-03-02T23:38:22 | 2013-03-02T23:38:22 | CONTRIBUTOR | null | If I try to do a
```
query.order_by(Model.field.desc(), Model.field2.desc())
```
with a Postgres DB the generated SQL will look like
```
ORDER BY (t1.field DESC, t1.field2 DESC)
```
which is invalid SQL for Postgres (not sure on other DBs). Postgres (I think) treats that as the creation of a tuple to sort on, and ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/167/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/167/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/166 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/166/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/166/comments | https://api.github.com/repos/coleifer/peewee/issues/166/events | https://github.com/coleifer/peewee/issues/166 | 11,304,705 | MDU6SXNzdWUxMTMwNDcwNQ== | 166 | transaction context manager does not raise the exception. | {
"login": "rammie",
"id": 554792,
"node_id": "MDQ6VXNlcjU1NDc5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/554792?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rammie",
"html_url": "https://github.com/rammie",
"followers_url": "https://api.github.com/users/rammie/follow... | [] | closed | false | null | [] | null | [
"Thank you :)\n"
] | 2013-02-22T20:44:52 | 2013-02-23T01:52:50 | 2013-02-22T21:45:59 | NONE | null | The **exit** function in the context manager should reraise the exception so that it may be caught outside of the with statement rather than being eaten up.
```
def __exit__(self, exc_type, exc_val, exc_tb):
if exc_type:
self.db.rollback()
self.db.set_autocommit(self._orig)
return False # T... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/166/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/166/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/165 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/165/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/165/comments | https://api.github.com/repos/coleifer/peewee/issues/165/events | https://github.com/coleifer/peewee/pull/165 | 11,230,073 | MDExOlB1bGxSZXF1ZXN0NDI0Nzc5Mw== | 165 | Launch example app with env | {
"login": "mgalgs",
"id": 152014,
"node_id": "MDQ6VXNlcjE1MjAxNA==",
"avatar_url": "https://avatars.githubusercontent.com/u/152014?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mgalgs",
"html_url": "https://github.com/mgalgs",
"followers_url": "https://api.github.com/users/mgalgs/follow... | [] | closed | false | null | [] | null | [
"Thank you for catching this!\n"
] | 2013-02-21T06:53:51 | 2014-07-06T01:51:15 | 2013-02-21T15:05:56 | CONTRIBUTOR | null | Using env rather than launching python directly facilitates
the use of virtualenv.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/165/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/165/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/165",
"html_url": "https://github.com/coleifer/peewee/pull/165",
"diff_url": "https://github.com/coleifer/peewee/pull/165.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/165.patch",
"merged_at": "2013-02-21T15:05:56"
} |
https://api.github.com/repos/coleifer/peewee/issues/164 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/164/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/164/comments | https://api.github.com/repos/coleifer/peewee/issues/164/events | https://github.com/coleifer/peewee/issues/164 | 11,196,744 | MDU6SXNzdWUxMTE5Njc0NA== | 164 | Add support for ordering by list of IDs | {
"login": "Pacek",
"id": 234758,
"node_id": "MDQ6VXNlcjIzNDc1OA==",
"avatar_url": "https://avatars.githubusercontent.com/u/234758?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Pacek",
"html_url": "https://github.com/Pacek",
"followers_url": "https://api.github.com/users/Pacek/followers"... | [] | closed | false | null | [] | null | [
"If the list of ids is ordered, then you can simply do:\n\n``` python\n\nMyModel.select().where(MyModel.id << list_of_ids).order_by(MyModel.id)\n```\n\nIf the ordering is arbitrary, then you could write a helper like this:\n\n``` python\n\ndef sort_by_id(query, id_list):\n # create a mapping\n mapping = dict(... | 2013-02-20T13:26:31 | 2013-02-21T15:26:07 | 2013-02-20T23:18:27 | NONE | null | Would by nice if this worked:
```
list_of_ids = [1,2,3,4,5,6]
result = MyModel.select().where(MyModel.id << list_of_ids)
# result is now is same order as list_of_ids
```
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/164/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/164/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/163 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/163/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/163/comments | https://api.github.com/repos/coleifer/peewee/issues/163/events | https://github.com/coleifer/peewee/issues/163 | 10,884,848 | MDU6SXNzdWUxMDg4NDg0OA== | 163 | Easy Python 3 compatibility | {
"login": "zielmicha",
"id": 364357,
"node_id": "MDQ6VXNlcjM2NDM1Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/364357?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zielmicha",
"html_url": "https://github.com/zielmicha",
"followers_url": "https://api.github.com/users/ziel... | [] | closed | false | null | [] | null | [
"No, there is _much_ more needed to make Peewee Python 3 compatible. `Model` uses a metaclass, and Python 3 changed how those were defined. Some judicious application of the `six` library would help there.\n",
"I think I'm finally serious about py3 compatibility... I'll start a fix.\n",
"With the release of 2.1... | 2013-02-11T21:46:53 | 2013-04-02T02:50:17 | 2013-04-02T02:50:17 | NONE | null | This library is nearly compatible with Python 3. Just add:
```
def __hash__(self):
return id(self)
```
to Leaf and run 2to3. Only FieldTypeTestCase test fails. It may be worth mentioning in README.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/163/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/163/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/162 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/162/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/162/comments | https://api.github.com/repos/coleifer/peewee/issues/162/events | https://github.com/coleifer/peewee/issues/162 | 10,790,157 | MDU6SXNzdWUxMDc5MDE1Nw== | 162 | Add support for database modifications | {
"login": "hobeone",
"id": 3444588,
"node_id": "MDQ6VXNlcjM0NDQ1ODg=",
"avatar_url": "https://avatars.githubusercontent.com/u/3444588?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/hobeone",
"html_url": "https://github.com/hobeone",
"followers_url": "https://api.github.com/users/hobeone/... | [
{
"id": 191751,
"node_id": "MDU6TGFiZWwxOTE3NTE=",
"url": "https://api.github.com/repos/coleifer/peewee/labels/Feature",
"name": "Feature",
"color": "02e10c",
"default": false,
"description": null
}
] | closed | false | null | [] | null | [
"Yep, I agree that would be nice. I'm working on refactoring the way DDL is generated currently -- would like to get that in place and probably build any schema changing stuff on top of it.\n",
"Sweet.\n\nThanks for making peewee awesome!\n\nOn Fri, Feb 8, 2013 at 3:15 PM, Charles Leifer notifications@github.com... | 2013-02-08T18:31:23 | 2013-03-23T04:43:57 | 2013-03-23T04:43:57 | NONE | null | I'd like to implement some sort of schema migration support for the app I'm working on. It would be awesome if Peewee could support some of the basic modifications people would want to do.
Things like:
- add, rename and remove columns
- add and remove indexes (it already supports add I think)
- alter column defaults,... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/162/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/162/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/161 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/161/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/161/comments | https://api.github.com/repos/coleifer/peewee/issues/161/events | https://github.com/coleifer/peewee/issues/161 | 10,753,537 | MDU6SXNzdWUxMDc1MzUzNw== | 161 | save() doesn't remember the INSERT/UPDATE state correctly | {
"login": "koblas",
"id": 219934,
"node_id": "MDQ6VXNlcjIxOTkzNA==",
"avatar_url": "https://avatars.githubusercontent.com/u/219934?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/koblas",
"html_url": "https://github.com/koblas",
"followers_url": "https://api.github.com/users/koblas/follow... | [] | closed | false | null | [] | null | [
"This is documented: http://peewee.readthedocs.org/en/latest/peewee/models.html#non-integer-primary-keys\n\nThe reason a model behaves this way is that it is much more simple and straightforward to simply look for a primary key than to try and track the state of a model.\n",
"This bug would also apply if you shar... | 2013-02-07T20:11:50 | 2013-02-07T21:56:33 | 2013-02-07T20:32:23 | NONE | null | If you have an assigned ID to a primary key Peewee doesn't remember the get_or_create state of the Model.
```
class GoogleThing(BaseModel):
google_id = peewee.CharFi... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/161/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/161/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/160 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/160/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/160/comments | https://api.github.com/repos/coleifer/peewee/issues/160/events | https://github.com/coleifer/peewee/issues/160 | 10,665,077 | MDU6SXNzdWUxMDY2NTA3Nw== | 160 | Problems using order_by | {
"login": "andmart",
"id": 303252,
"node_id": "MDQ6VXNlcjMwMzI1Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/303252?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/andmart",
"html_url": "https://github.com/andmart",
"followers_url": "https://api.github.com/users/andmart/fo... | [] | closed | false | null | [] | null | [
"I replaced the line 786 by \n\n```\nparts.append('ORDER BY %s' % tuple(_)) \n```\n",
"I can understnad your confusion. Peewee uses \"-<field name>\" to specify ordering in a models \"Meta\" attributes.\n\nHowever, when querying you will use a different syntax:\n\n``` python\n\nM.select().order_by(M.number.desc(... | 2013-02-05T20:03:17 | 2013-02-06T15:28:25 | 2013-02-06T14:33:15 | NONE | null | When running the script below, I got
sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 0 supplied.
It seems that orm is not filling the resultant sql with fields to order.
When debugging, printing Ms of line 27 outputs :
<class '__main__.M'> SELECT t1."id... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/160/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/160/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/159 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/159/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/159/comments | https://api.github.com/repos/coleifer/peewee/issues/159/events | https://github.com/coleifer/peewee/pull/159 | 10,575,792 | MDExOlB1bGxSZXF1ZXN0Mzk2MTMyNQ== | 159 | Makes script useable with legacy sqlite dbs which have no foreign keys | {
"login": "jharmn",
"id": 1305160,
"node_id": "MDQ6VXNlcjEzMDUxNjA=",
"avatar_url": "https://avatars.githubusercontent.com/u/1305160?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jharmn",
"html_url": "https://github.com/jharmn",
"followers_url": "https://api.github.com/users/jharmn/foll... | [] | closed | false | null | [] | null | [] | 2013-02-02T19:31:03 | 2014-06-15T11:27:22 | 2013-02-03T01:55:57 | NONE | null | I had this issue specifically on this db: https://github.com/jasonh-n-austin/WheelsREST/blob/master/wheels.db
This is an export from an older MS Sql Server db, which did not have any foreign keys on tables etc. This error handling for foreign keys made it instantly quit with 'Unable to read table definition for "rides"... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/159/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/159/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/159",
"html_url": "https://github.com/coleifer/peewee/pull/159",
"diff_url": "https://github.com/coleifer/peewee/pull/159.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/159.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/158 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/158/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/158/comments | https://api.github.com/repos/coleifer/peewee/issues/158/events | https://github.com/coleifer/peewee/pull/158 | 10,563,085 | MDExOlB1bGxSZXF1ZXN0Mzk1NjY4MA== | 158 | Alled for old style mysql no FK relation | {
"login": "rosscdh",
"id": 397106,
"node_id": "MDQ6VXNlcjM5NzEwNg==",
"avatar_url": "https://avatars.githubusercontent.com/u/397106?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rosscdh",
"html_url": "https://github.com/rosscdh",
"followers_url": "https://api.github.com/users/rosscdh/fo... | [] | closed | false | null | [] | null | [
"Even though your db may not use foreign key constraints, you can (and should) still use the `ForeignKeyField` to access them, unless I misunderstand the issue.\n\nPerhaps you could send me some models that you are using, or how you use this patch.\n",
"HI Charles, Thanks for the Feedback.. let me try the FKField... | 2013-02-01T23:11:45 | 2014-07-06T01:51:21 | 2013-02-03T03:06:57 | NONE | null | Hi there, we have a very old db that has no FKs defined.
Currently its not possible (or seems not) to perform joins on elements that have no FK
This is a minor patch for it..
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/158/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/158/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/158",
"html_url": "https://github.com/coleifer/peewee/pull/158",
"diff_url": "https://github.com/coleifer/peewee/pull/158.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/158.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/157 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/157/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/157/comments | https://api.github.com/repos/coleifer/peewee/issues/157/events | https://github.com/coleifer/peewee/issues/157 | 10,535,274 | MDU6SXNzdWUxMDUzNTI3NA== | 157 | 2 issues at once | {
"login": "ivan-kleshnin",
"id": 2128182,
"node_id": "MDQ6VXNlcjIxMjgxODI=",
"avatar_url": "https://avatars.githubusercontent.com/u/2128182?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ivan-kleshnin",
"html_url": "https://github.com/ivan-kleshnin",
"followers_url": "https://api.github.... | [] | closed | false | null | [] | null | [
"Do you mind putting an example of #1 -- particularly what you expect vs what you get.\n",
"I also see that Postgresql does not support limit/order by on delete and update queries, and SQLite only supports them if it was compiled with `SQLITE_ENABLE_UPDATE_DELETE_LIMIT` -- what db do you use out of curiosity?\n\n... | 2013-02-01T10:33:05 | 2013-02-03T04:09:09 | 2013-02-03T04:09:09 | NONE | null | Issue #1
`get()` adds `limit(1)` to `SelectQuery`.
When we `join()` something 1-to-n, `get()` breaks selection by limiting those joined items
Issue #2
`DeleteQuery` doesn't have `limit()` method
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/157/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/157/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/156 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/156/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/156/comments | https://api.github.com/repos/coleifer/peewee/issues/156/events | https://github.com/coleifer/peewee/issues/156 | 10,468,825 | MDU6SXNzdWUxMDQ2ODgyNQ== | 156 | sub query in select | {
"login": "nesizer",
"id": 62032,
"node_id": "MDQ6VXNlcjYyMDMy",
"avatar_url": "https://avatars.githubusercontent.com/u/62032?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nesizer",
"html_url": "https://github.com/nesizer",
"followers_url": "https://api.github.com/users/nesizer/follower... | [] | closed | false | null | [] | null | [
"a workaround for now is\n\n```\nGame.select(Game, fn.Sum(Stat.viewers).alias('viewers')).join(Stat, JOIN_LEFT_OUTER).group_by(Game).order_by(R('viewers DESC')).limit(5) \n```\n\nbut that runs up to 10 times slower then the sub queries on\n"
] | 2013-01-30T18:03:25 | 2013-12-05T17:34:32 | 2013-01-31T04:53:44 | NONE | null | is there a way for peewee to support sub queries like this one
SELECT g.*,
(SELECT SUM(s.viewers) FROM stats s WHERE s.game_id = g.id) AS viewers
FROM games AS g
WHERE g.id != 96
ORDER BY viewers DESC
LIMIT 5
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/156/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/156/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/155 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/155/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/155/comments | https://api.github.com/repos/coleifer/peewee/issues/155/events | https://github.com/coleifer/peewee/pull/155 | 10,298,056 | MDExOlB1bGxSZXF1ZXN0MzgzMzI5MA== | 155 | SelectQuery.first() | {
"login": "maebert",
"id": 1047165,
"node_id": "MDQ6VXNlcjEwNDcxNjU=",
"avatar_url": "https://avatars.githubusercontent.com/u/1047165?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/maebert",
"html_url": "https://github.com/maebert",
"followers_url": "https://api.github.com/users/maebert/... | [] | closed | false | null | [] | null | [
"This is similar to what the `.get()` method does [link](http://peewee.readthedocs.org/en/latest/peewee/api.html#Model.get) / [src](https://github.com/coleifer/peewee/blob/master/peewee.py#L1328) except instead of raising an exception it returns `None`. I don't see how this is any better -- i assume you still have... | 2013-01-25T02:17:25 | 2014-07-06T01:51:22 | 2013-01-25T04:15:38 | NONE | null | Return the first result of a Query or `None` if the result doesn't contain any row. This is analogous to SQLAlchemy and python-mongodb and eases portability for third-party modules wanting to support peewee.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/155/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/155/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/155",
"html_url": "https://github.com/coleifer/peewee/pull/155",
"diff_url": "https://github.com/coleifer/peewee/pull/155.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/155.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/154 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/154/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/154/comments | https://api.github.com/repos/coleifer/peewee/issues/154/events | https://github.com/coleifer/peewee/issues/154 | 10,296,324 | MDU6SXNzdWUxMDI5NjMyNA== | 154 | Database is locked, can't be opened again | {
"login": "Miserlou",
"id": 139987,
"node_id": "MDQ6VXNlcjEzOTk4Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/139987?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Miserlou",
"html_url": "https://github.com/Miserlou",
"followers_url": "https://api.github.com/users/Miserlo... | [] | closed | false | null | [] | null | [
"Not sure exactly what happened -- take a look here:\n\nhttp://stackoverflow.com/questions/151026/how-do-i-unlock-a-sqlite-database\n",
"I love you. Sorry for bringing this up on GitHub, I couldn't get a response on IRC. This data is pretty important to me and I was having a mini panic attack. \n"
] | 2013-01-25T00:57:00 | 2013-01-25T01:01:05 | 2013-01-25T00:58:17 | NONE | null | Help!
I've been using peewee as the DB for a scraper job that's been running for about 3 months now.
I tried copying the database file to make a backup. This may have happened while the process was still running, and now it's stuck in a locked state.
new_pk = insert.execute()
File "/usr/local/lib/python2.6/di... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/154/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/154/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/153 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/153/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/153/comments | https://api.github.com/repos/coleifer/peewee/issues/153/events | https://github.com/coleifer/peewee/pull/153 | 10,261,335 | MDExOlB1bGxSZXF1ZXN0MzgxNDUzMQ== | 153 | Add support for LIMIT clause to UPDATE | {
"login": "djt",
"id": 145617,
"node_id": "MDQ6VXNlcjE0NTYxNw==",
"avatar_url": "https://avatars.githubusercontent.com/u/145617?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/djt",
"html_url": "https://github.com/djt",
"followers_url": "https://api.github.com/users/djt/followers",
"fol... | [] | closed | false | null | [] | null | [] | 2013-01-24T04:26:32 | 2014-07-06T01:51:24 | 2013-01-24T04:29:37 | NONE | null | First of all, this is a great library. I have only just started using it but already am loving the implementation and direction.
I had a requirement of restricting the amount of items modified by an update so went ahead and added LIMIT support. This has only been tested on MySQL in my case so I'm not sure if it will... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/153/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/153/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/153",
"html_url": "https://github.com/coleifer/peewee/pull/153",
"diff_url": "https://github.com/coleifer/peewee/pull/153.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/153.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/152 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/152/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/152/comments | https://api.github.com/repos/coleifer/peewee/issues/152/events | https://github.com/coleifer/peewee/issues/152 | 10,115,327 | MDU6SXNzdWUxMDExNTMyNw== | 152 | Defer loading and saving certain columns | {
"login": "coleifer",
"id": 119974,
"node_id": "MDQ6VXNlcjExOTk3NA==",
"avatar_url": "https://avatars.githubusercontent.com/u/119974?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/coleifer",
"html_url": "https://github.com/coleifer",
"followers_url": "https://api.github.com/users/coleife... | [] | closed | false | null | [] | null | [
"Fixed 821146b24b3e2c9376\n"
] | 2013-01-18T22:07:36 | 2013-01-31T05:17:32 | 2013-01-31T05:17:32 | OWNER | null | Would like a nicer API for deferring loading and saving particular columns
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/152/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/152/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/151 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/151/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/151/comments | https://api.github.com/repos/coleifer/peewee/issues/151/events | https://github.com/coleifer/peewee/issues/151 | 10,093,966 | MDU6SXNzdWUxMDA5Mzk2Ng== | 151 | peewee + dbslayer | {
"login": "rosscdh",
"id": 397106,
"node_id": "MDQ6VXNlcjM5NzEwNg==",
"avatar_url": "https://avatars.githubusercontent.com/u/397106?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rosscdh",
"html_url": "https://github.com/rosscdh",
"followers_url": "https://api.github.com/users/rosscdh/fo... | [] | closed | false | null | [] | null | [
"Thank you, I'm glad you're enjoying peewee!\n\nI hadn't heard of dbslayer so I took a look at it... I am pretty sure i would never recommend anyone use dbslayer... but of course if you wanted to build an adapter I think it would be possible.\n\nThis is a good place to start: http://peewee.readthedocs.org/en/latest... | 2013-01-18T10:30:03 | 2013-01-18T15:56:55 | 2013-01-18T14:45:32 | NONE | null | Hey there,
Firstly well done on this neat little orm.
I'm considering writing a peewee Database type to interface with dbslayer (JSON response interface) (would implement using "requests")
I was wondering if you are aware of anything like this? or if you had any pointers?
Best
Ross
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/151/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/151/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/150 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/150/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/150/comments | https://api.github.com/repos/coleifer/peewee/issues/150/events | https://github.com/coleifer/peewee/issues/150 | 9,980,438 | MDU6SXNzdWU5OTgwNDM4 | 150 | Certain operations not respecting the db_value() | {
"login": "coleifer",
"id": 119974,
"node_id": "MDQ6VXNlcjExOTk3NA==",
"avatar_url": "https://avatars.githubusercontent.com/u/119974?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/coleifer",
"html_url": "https://github.com/coleifer",
"followers_url": "https://api.github.com/users/coleife... | [] | closed | false | null | [] | null | [
"This error was reported via google groups. The issue is on line 776 in `_parse_field_dictionary` which parses things like updates and inserts. It iterates the dictinary and hands off the value to `parse_expr` before sending it to db_value() and this is where the lists are getting mangled.\n",
"Fixed in 1d4290... | 2013-01-15T14:45:22 | 2017-06-30T11:55:41 | 2013-01-16T03:33:39 | OWNER | null | I want to create a custom field that will be a list in python and is converted to text for database storage, but my custom field is generating invalid SQL. Here's an example to illustrate the problem I'm having.
```
from peewee import *
db = SqliteDatabase('test.db')
class CSVField(TextField):
def db_value(self,... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/150/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/150/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/149 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/149/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/149/comments | https://api.github.com/repos/coleifer/peewee/issues/149/events | https://github.com/coleifer/peewee/pull/149 | 9,945,211 | MDExOlB1bGxSZXF1ZXN0MzY2NDcxNg== | 149 | Update docs/peewee/quickstart.rst | {
"login": "rotated8",
"id": 638392,
"node_id": "MDQ6VXNlcjYzODM5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/638392?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rotated8",
"html_url": "https://github.com/rotated8",
"followers_url": "https://api.github.com/users/rotated... | [] | closed | false | null | [] | null | [] | 2013-01-14T15:24:25 | 2014-07-06T01:51:25 | 2013-01-14T15:26:00 | CONTRIBUTOR | null | Claimed the expected return value was 'herb' when it is 'bob' (code is correct).
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/149/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/149/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/149",
"html_url": "https://github.com/coleifer/peewee/pull/149",
"diff_url": "https://github.com/coleifer/peewee/pull/149.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/149.patch",
"merged_at": "2013-01-14T15:26:00"
} |
https://api.github.com/repos/coleifer/peewee/issues/148 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/148/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/148/comments | https://api.github.com/repos/coleifer/peewee/issues/148/events | https://github.com/coleifer/peewee/issues/148 | 9,941,242 | MDU6SXNzdWU5OTQxMjQy | 148 | pwiz: reserved python keywords | {
"login": "Pacek",
"id": 234758,
"node_id": "MDQ6VXNlcjIzNDc1OA==",
"avatar_url": "https://avatars.githubusercontent.com/u/234758?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Pacek",
"html_url": "https://github.com/Pacek",
"followers_url": "https://api.github.com/users/Pacek/followers"... | [] | closed | false | null | [] | null | [
"hmm...yeah it probably should...though its not really supposed to be \"perfect\" ya know? you will still probably want to edit it...but maybe it can drop a warning in there or something\n"
] | 2013-01-14T13:19:31 | 2013-01-15T20:20:31 | 2013-01-15T20:20:31 | NONE | null | Pwiz script should keep in mind python reserved keywords like "import", "str", ... and generate alternative field name.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/148/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/148/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/147 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/147/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/147/comments | https://api.github.com/repos/coleifer/peewee/issues/147/events | https://github.com/coleifer/peewee/issues/147 | 9,810,837 | MDU6SXNzdWU5ODEwODM3 | 147 | auto-incrementing primary keys in Sqlite | {
"login": "markschl",
"id": 783293,
"node_id": "MDQ6VXNlcjc4MzI5Mw==",
"avatar_url": "https://avatars.githubusercontent.com/u/783293?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/markschl",
"html_url": "https://github.com/markschl",
"followers_url": "https://api.github.com/users/marksch... | [
{
"id": 191750,
"node_id": "MDU6TGFiZWwxOTE3NTA=",
"url": "https://api.github.com/repos/coleifer/peewee/labels/Bug",
"name": "Bug",
"color": "e10c02",
"default": false,
"description": null
}
] | closed | false | null | [] | null | [
"http://www.sqlite.org/autoinc.html - i will see about a fix\n",
"Because SQLite incurs additional overhead to guarantee monotonically incrementing PKs, I will keep the default behavior which simply guarantees they are unique.\n\nIf you would like to use an autoincrementing primary key, try this in your code:\n\... | 2013-01-09T16:33:31 | 2016-05-07T14:39:48 | 2013-09-04T18:46:18 | NONE | null | I have a question regarding auto-incrementing primary keys. As far as I can see from tests, in MySQL, primary key columns are created with AUTO_INCREMENT by default, whereas in Sqlite databases the primary key of an insert may not be unique forever if some rows are deleted. As far as I understand, the equivalent of AUT... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/147/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/147/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/146 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/146/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/146/comments | https://api.github.com/repos/coleifer/peewee/issues/146/events | https://github.com/coleifer/peewee/pull/146 | 9,793,146 | MDExOlB1bGxSZXF1ZXN0MzU5NzQ1Nw== | 146 | add limit and orderby support to update | {
"login": "beanyoung",
"id": 973789,
"node_id": "MDQ6VXNlcjk3Mzc4OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/973789?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/beanyoung",
"html_url": "https://github.com/beanyoung",
"followers_url": "https://api.github.com/users/bean... | [] | closed | false | null | [] | null | [
"I do not plan on merging this, however I am glad you were able to extend the mysql apis.\n"
] | 2013-01-09T04:17:28 | 2014-07-06T01:51:27 | 2013-01-09T15:17:12 | NONE | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/146/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/146/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/146",
"html_url": "https://github.com/coleifer/peewee/pull/146",
"diff_url": "https://github.com/coleifer/peewee/pull/146.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/146.patch",
"merged_at": null
} | |
https://api.github.com/repos/coleifer/peewee/issues/145 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/145/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/145/comments | https://api.github.com/repos/coleifer/peewee/issues/145/events | https://github.com/coleifer/peewee/pull/145 | 9,520,827 | MDExOlB1bGxSZXF1ZXN0MzQ4MjkyNQ== | 145 | Remove unused imports | {
"login": "methane",
"id": 199592,
"node_id": "MDQ6VXNlcjE5OTU5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/199592?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/methane",
"html_url": "https://github.com/methane",
"followers_url": "https://api.github.com/users/methane/fo... | [] | closed | false | null | [] | null | [] | 2012-12-26T13:20:06 | 2014-07-06T01:51:29 | 2013-01-04T23:06:35 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/145/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/145/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/145",
"html_url": "https://github.com/coleifer/peewee/pull/145",
"diff_url": "https://github.com/coleifer/peewee/pull/145.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/145.patch",
"merged_at": null
} | |
https://api.github.com/repos/coleifer/peewee/issues/144 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/144/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/144/comments | https://api.github.com/repos/coleifer/peewee/issues/144/events | https://github.com/coleifer/peewee/pull/144 | 9,520,722 | MDExOlB1bGxSZXF1ZXN0MzQ4Mjg2OQ== | 144 | Fix for_update support for MySQL | {
"login": "methane",
"id": 199592,
"node_id": "MDQ6VXNlcjE5OTU5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/199592?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/methane",
"html_url": "https://github.com/methane",
"followers_url": "https://api.github.com/users/methane/fo... | [] | closed | false | null | [] | null | [] | 2012-12-26T13:11:02 | 2014-06-28T22:43:51 | 2012-12-26T15:13:26 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/144/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/144/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/144",
"html_url": "https://github.com/coleifer/peewee/pull/144",
"diff_url": "https://github.com/coleifer/peewee/pull/144.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/144.patch",
"merged_at": "2012-12-26T15:13:26"
} | |
https://api.github.com/repos/coleifer/peewee/issues/143 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/143/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/143/comments | https://api.github.com/repos/coleifer/peewee/issues/143/events | https://github.com/coleifer/peewee/pull/143 | 9,520,706 | MDExOlB1bGxSZXF1ZXN0MzQ4Mjg2Mw== | 143 | Support pymysql. | {
"login": "methane",
"id": 199592,
"node_id": "MDQ6VXNlcjE5OTU5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/199592?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/methane",
"html_url": "https://github.com/methane",
"followers_url": "https://api.github.com/users/methane/fo... | [] | closed | false | null | [] | null | [] | 2012-12-26T13:09:51 | 2014-07-06T01:51:31 | 2012-12-26T15:14:36 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/143/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/143/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/143",
"html_url": "https://github.com/coleifer/peewee/pull/143",
"diff_url": "https://github.com/coleifer/peewee/pull/143.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/143.patch",
"merged_at": "2012-12-26T15:14:36"
} | |
https://api.github.com/repos/coleifer/peewee/issues/142 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/142/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/142/comments | https://api.github.com/repos/coleifer/peewee/issues/142/events | https://github.com/coleifer/peewee/pull/142 | 9,450,214 | MDExOlB1bGxSZXF1ZXN0MzQ1MjYwNw== | 142 | Primary key value 0 | {
"login": "arielrossanigo",
"id": 2752109,
"node_id": "MDQ6VXNlcjI3NTIxMDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/2752109?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/arielrossanigo",
"html_url": "https://github.com/arielrossanigo",
"followers_url": "https://api.gith... | [] | closed | false | null | [] | null | [
"I decided to fix this everywhere that a \"false-y\" value was used: 51328066c4c7b1d7c043c5e37fc06c519e9f168a\n",
"Great! thanks\n"
] | 2012-12-20T22:37:35 | 2014-07-06T01:51:33 | 2012-12-20T23:00:10 | CONTRIBUTOR | null | In an escenario where two tables are related and the value of the foreign key is 0, it raises an DoesNotExist exception. That's because 0 evaluates to False even when it's a real value.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/142/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/142/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/142",
"html_url": "https://github.com/coleifer/peewee/pull/142",
"diff_url": "https://github.com/coleifer/peewee/pull/142.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/142.patch",
"merged_at": null
} |
https://api.github.com/repos/coleifer/peewee/issues/141 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/141/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/141/comments | https://api.github.com/repos/coleifer/peewee/issues/141/events | https://github.com/coleifer/peewee/pull/141 | 9,415,188 | MDExOlB1bGxSZXF1ZXN0MzQzNTAwMQ== | 141 | IN operator and subqueries | {
"login": "arielrossanigo",
"id": 2752109,
"node_id": "MDQ6VXNlcjI3NTIxMDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/2752109?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/arielrossanigo",
"html_url": "https://github.com/arielrossanigo",
"followers_url": "https://api.gith... | [] | closed | false | null | [] | null | [
"Cool, i think we definitely need this. I think the extra state might be avoidable if we bind the selection a little later. I will look into that approach.\n"
] | 2012-12-19T21:18:39 | 2014-07-06T01:51:34 | 2012-12-19T22:19:32 | CONTRIBUTOR | null | This patch allows you to make a query with an IN operator where the subquery return another field than the "id".
For example, I have this two models:
``` python
class Customer(Model):
cust_number = IntegerField()
name = CharField()
....
class AccountLog(Model):
name = CharField()... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/141/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/141/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/141",
"html_url": "https://github.com/coleifer/peewee/pull/141",
"diff_url": "https://github.com/coleifer/peewee/pull/141.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/141.patch",
"merged_at": "2012-12-19T22:19:32"
} |
https://api.github.com/repos/coleifer/peewee/issues/140 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/140/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/140/comments | https://api.github.com/repos/coleifer/peewee/issues/140/events | https://github.com/coleifer/peewee/issues/140 | 9,410,037 | MDU6SXNzdWU5NDEwMDM3 | 140 | ImportError: cannot import name BinaryExpr | {
"login": "chrispaolini",
"id": 1413619,
"node_id": "MDQ6VXNlcjE0MTM2MTk=",
"avatar_url": "https://avatars.githubusercontent.com/u/1413619?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/chrispaolini",
"html_url": "https://github.com/chrispaolini",
"followers_url": "https://api.github.com... | [] | closed | false | null | [] | null | [
"Yeah, binaryexpr is replaced with \"Expr\" - I did a refactor recently of those pieces in the commit you referenced.\n"
] | 2012-12-19T18:31:07 | 2012-12-19T20:53:36 | 2012-12-19T20:53:36 | NONE | null | It seems that there is a call to "BinaryExpr", but that doesn't exist.
Looks like it was removed in: 8f8e195480932a274cb3f9921538dfacb47d0bc7
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/140/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/140/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/139 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/139/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/139/comments | https://api.github.com/repos/coleifer/peewee/issues/139/events | https://github.com/coleifer/peewee/issues/139 | 9,402,240 | MDU6SXNzdWU5NDAyMjQw | 139 | R() objects and cloning | {
"login": "coleifer",
"id": 119974,
"node_id": "MDQ6VXNlcjExOTk3NA==",
"avatar_url": "https://avatars.githubusercontent.com/u/119974?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/coleifer",
"html_url": "https://github.com/coleifer",
"followers_url": "https://api.github.com/users/coleife... | [] | closed | false | null | [] | null | [
"Based on the testcases I committed, I can't replicate this error: 624a0e19ab085f3cd0d7\n"
] | 2012-12-19T14:44:30 | 2012-12-19T20:54:59 | 2012-12-19T20:54:59 | OWNER | null | <MikeSeth> [07:57:26] how do I do INTERVAL?
<MikeSeth> [07:57:56] e.g. I have an expression like NOW() - INTERVAL 1 HOUR
<MikeSeth> [08:15:55] nevermind, R()
<MikeSeth> [08:17:47] AttributeError: 'R' object has no attribute 'clone'
<MikeSeth> [08:17:49] hm.
<MikeSeth> [08:20:17] R isn't Expr?
<MikeSeth> [08:30:02] neve... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/139/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/139/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/138 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/138/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/138/comments | https://api.github.com/repos/coleifer/peewee/issues/138/events | https://github.com/coleifer/peewee/issues/138 | 9,372,257 | MDU6SXNzdWU5MzcyMjU3 | 138 | Raise an exception when a reverse relation clobbers a field | {
"login": "coleifer",
"id": 119974,
"node_id": "MDQ6VXNlcjExOTk3NA==",
"avatar_url": "https://avatars.githubusercontent.com/u/119974?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/coleifer",
"html_url": "https://github.com/coleifer",
"followers_url": "https://api.github.com/users/coleife... | [] | closed | false | null | [] | null | [] | 2012-12-18T16:09:07 | 2012-12-19T21:06:21 | 2012-12-19T21:06:21 | OWNER | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/138/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/138/timeline | null | completed | null | null | |
https://api.github.com/repos/coleifer/peewee/issues/137 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/137/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/137/comments | https://api.github.com/repos/coleifer/peewee/issues/137/events | https://github.com/coleifer/peewee/pull/137 | 9,360,526 | MDExOlB1bGxSZXF1ZXN0MzQwNjc2MA== | 137 | use backticks around table name, for inspect some specified table name | {
"login": "wayhome",
"id": 83735,
"node_id": "MDQ6VXNlcjgzNzM1",
"avatar_url": "https://avatars.githubusercontent.com/u/83735?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/wayhome",
"html_url": "https://github.com/wayhome",
"followers_url": "https://api.github.com/users/wayhome/follower... | [] | closed | false | null | [] | null | [] | 2012-12-18T08:36:36 | 2014-07-06T01:51:36 | 2012-12-18T15:27:29 | CONTRIBUTOR | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/137/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/137/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/137",
"html_url": "https://github.com/coleifer/peewee/pull/137",
"diff_url": "https://github.com/coleifer/peewee/pull/137.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/137.patch",
"merged_at": "2012-12-18T15:27:29"
} | |
https://api.github.com/repos/coleifer/peewee/issues/136 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/136/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/136/comments | https://api.github.com/repos/coleifer/peewee/issues/136/events | https://github.com/coleifer/peewee/pull/136 | 9,334,869 | MDExOlB1bGxSZXF1ZXN0MzM5NDA0Ng== | 136 | Support for same-name tables in multi-schema dbs | {
"login": "irumiha",
"id": 100465,
"node_id": "MDQ6VXNlcjEwMDQ2NQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/100465?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/irumiha",
"html_url": "https://github.com/irumiha",
"followers_url": "https://api.github.com/users/irumiha/fo... | [] | closed | false | null | [] | null | [
"Hey, thanks a ton for this! I will look into merging it this week.\n"
] | 2012-12-17T14:46:03 | 2014-07-06T01:51:37 | 2012-12-17T14:53:30 | CONTRIBUTOR | null | I have a scenario with a Postgres multi-schema database with tables with identical names in different schemas. This patch fixes the foreign-key resolution for such tables.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/136/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/136/timeline | null | null | false | {
"url": "https://api.github.com/repos/coleifer/peewee/pulls/136",
"html_url": "https://github.com/coleifer/peewee/pull/136",
"diff_url": "https://github.com/coleifer/peewee/pull/136.diff",
"patch_url": "https://github.com/coleifer/peewee/pull/136.patch",
"merged_at": "2012-12-17T14:53:30"
} |
https://api.github.com/repos/coleifer/peewee/issues/135 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/135/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/135/comments | https://api.github.com/repos/coleifer/peewee/issues/135/events | https://github.com/coleifer/peewee/issues/135 | 9,006,330 | MDU6SXNzdWU5MDA2MzMw | 135 | Select a random record from db peewee 2.04 | {
"login": "hernantz",
"id": 613512,
"node_id": "MDQ6VXNlcjYxMzUxMg==",
"avatar_url": "https://avatars.githubusercontent.com/u/613512?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/hernantz",
"html_url": "https://github.com/hernantz",
"followers_url": "https://api.github.com/users/hernant... | [] | closed | false | null | [] | null | [
"You probably want something like this:\n\n``` python\n\nfrom peewee import *\n\nrandom_query = SomeModel.select().order_by(fn.Random())\none_obj = random_query.get()\n```\n",
"Thanks! worked.\nIs this in the docs?\n",
"Nah, i'll add it maybe but its standard 'sql' practice.\n"
] | 2012-12-05T02:06:58 | 2012-12-10T15:03:56 | 2012-12-05T02:49:07 | NONE | null | Any example of how to get a random object from a model?
Thanks in advance.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/135/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/135/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/134 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/134/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/134/comments | https://api.github.com/repos/coleifer/peewee/issues/134/events | https://github.com/coleifer/peewee/issues/134 | 9,003,371 | MDU6SXNzdWU5MDAzMzcx | 134 | Results as dict/array of dict? | {
"login": "rcarmo",
"id": 392683,
"node_id": "MDQ6VXNlcjM5MjY4Mw==",
"avatar_url": "https://avatars.githubusercontent.com/u/392683?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rcarmo",
"html_url": "https://github.com/rcarmo",
"followers_url": "https://api.github.com/users/rcarmo/follow... | [] | closed | false | null | [] | null | [
"### Edit\r\n\r\nThis issue was 8 years old when it was brought to my attention again. Here are the methods you would want to use:\r\n\r\n* [dicts()](http://docs.peewee-orm.com/en/latest/peewee/api.html#BaseQuery.dicts)\r\n* [tuples()](http://docs.peewee-orm.com/en/latest/peewee/api.html#BaseQuery.tuples)\r\n* [nam... | 2012-12-04T23:45:05 | 2022-11-08T16:44:31 | 2012-12-05T03:00:18 | CONTRIBUTOR | null | It would be grand if one could do something like this:
```
>>> m = Model()
>>> print m.select()
[{'id':1, 'name':'foo'},{'id':2, 'name':'bar'}]
```
i.e., returning each row as a dict. This would be especially handy for returning JSON result sets, and could probably be done using **iter** to return self._d... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/134/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/134/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/133 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/133/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/133/comments | https://api.github.com/repos/coleifer/peewee/issues/133/events | https://github.com/coleifer/peewee/issues/133 | 8,970,186 | MDU6SXNzdWU4OTcwMTg2 | 133 | Ordering in 2.0.4 | {
"login": "dkadish",
"id": 181041,
"node_id": "MDQ6VXNlcjE4MTA0MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/181041?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dkadish",
"html_url": "https://github.com/dkadish",
"followers_url": "https://api.github.com/users/dkadish/fo... | [] | closed | false | null | [] | null | [] | 2012-12-04T01:03:06 | 2012-12-04T01:17:46 | 2012-12-04T01:17:46 | NONE | null | In the Meta class in v1, ordering is done by
``` python
class Meta:
ordering = (('col1', 'desc'), ('col2', 'asc')
```
In version 2, this has changed to:
``` python
class Meta:
order_by = ('-col1', 'col2') # I think I have my signs right here...
```
That's not reflected in the docs in https://peewee.readthed... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/133/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/133/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/132 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/132/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/132/comments | https://api.github.com/repos/coleifer/peewee/issues/132/events | https://github.com/coleifer/peewee/issues/132 | 8,628,835 | MDU6SXNzdWU4NjI4ODM1 | 132 | Integer Primary Key won't save the data | {
"login": "coderbuzz",
"id": 1284811,
"node_id": "MDQ6VXNlcjEyODQ4MTE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1284811?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/coderbuzz",
"html_url": "https://github.com/coderbuzz",
"followers_url": "https://api.github.com/users/co... | [] | closed | false | null | [] | null | [
"So...you want periode to be the primary key _and_ you want it to be the values from 1 -> 60. Explicitly setting the primary key can be accomplished in a couple of ways... I'd suggest reading the code for the save() method.\n\nYou can `save(force_insert=True)`. You can manually create and execute an InsertQuery ... | 2012-11-24T13:00:49 | 2012-11-24T23:13:41 | 2012-11-24T15:50:33 | NONE | null | ``` python
class TableMargin(BaseModel):
class Meta:
db_table = 'tabel_margin'
periode = IntegerField(primary_key=True)
margin = FloatField()
def set_margin(periode, margin):
query = TabelMargin.select().where(TabelMargin.periode==periode)
with db_transaction():
item ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/132/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/132/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/131 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/131/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/131/comments | https://api.github.com/repos/coleifer/peewee/issues/131/events | https://github.com/coleifer/peewee/issues/131 | 8,563,021 | MDU6SXNzdWU4NTYzMDIx | 131 | unique index creation breaks on mysql innodb + utf8mb4 + charfield | {
"login": "jamesonjlee",
"id": 698668,
"node_id": "MDQ6VXNlcjY5ODY2OA==",
"avatar_url": "https://avatars.githubusercontent.com/u/698668?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jamesonjlee",
"html_url": "https://github.com/jamesonjlee",
"followers_url": "https://api.github.com/user... | [] | closed | false | null | [] | null | [
"Dude...\n\nJust subclass charfield and provide a default maxlength and use that.\n"
] | 2012-11-22T00:06:12 | 2012-11-22T00:16:14 | 2012-11-22T00:16:13 | NONE | null | hi,
I found that the default CharField() is a varchar of length 255, this makes mysql throw error 1071 because in innodb the maximum length of a index is 767 bytes (~190 utf8mb4). default utf8 will fit 255 chars.
Would it be possible to have peewee detect that the database is using utf8mb4 and adjust it accordingly?... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/131/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/131/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/130 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/130/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/130/comments | https://api.github.com/repos/coleifer/peewee/issues/130/events | https://github.com/coleifer/peewee/issues/130 | 8,491,122 | MDU6SXNzdWU4NDkxMTIy | 130 | TypeError: 'NoneType' object does not support item assignment when trying to select from tables after 0.9.2 to 2.0.4 upgrade | {
"login": "skruger",
"id": 201151,
"node_id": "MDQ6VXNlcjIwMTE1MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/201151?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/skruger",
"html_url": "https://github.com/skruger",
"followers_url": "https://api.github.com/users/skruger/fo... | [] | closed | false | null | [] | null | [
"Are you overriding **init** on the model class? Also, Xmpp! Cool!\n",
"I wasn't implementing init in my models directly so I didn't think the solution from issue #118 was applicable until I checked my BaseSql class. I added the fix from #118 to BaseSql and that resolved my problem.\n\n``` python\nclass BaseSq... | 2012-11-20T02:46:27 | 2016-10-22T15:25:47 | 2012-11-20T06:29:53 | NONE | null | I'm upgrading my application to the current version of peewee and many of my models are failing the same way when I try to query them. Most of my accesses happen within @classmethod calls so I did one manually from the command line and I get the same error. I'm not sure what I'm doing wrong or what other details migh... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/130/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/130/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/129 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/129/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/129/comments | https://api.github.com/repos/coleifer/peewee/issues/129/events | https://github.com/coleifer/peewee/issues/129 | 8,450,947 | MDU6SXNzdWU4NDUwOTQ3 | 129 | "Offline" support for ForeignKeyField (related_name) | {
"login": "kr2",
"id": 1094983,
"node_id": "MDQ6VXNlcjEwOTQ5ODM=",
"avatar_url": "https://avatars.githubusercontent.com/u/1094983?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kr2",
"html_url": "https://github.com/kr2",
"followers_url": "https://api.github.com/users/kr2/followers",
"f... | [] | closed | false | null | [] | null | [
"The implementation of reverse relations is a SelectQuery, which requires a database call.\n"
] | 2012-11-18T15:30:25 | 2012-11-18T15:34:30 | 2012-11-18T15:34:30 | NONE | null | I think it would be nice if one could do something like below. So stepping though the "children" before saving them.
``` python
import peewee as pw
class Parent(pw.Model):
name = pw.TextField()
class Child(pw.Model):
parent = pw.ForeignKeyField(Parent, related_name='children')
name = pw.TextField()
p1 =... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/129/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/129/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/128 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/128/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/128/comments | https://api.github.com/repos/coleifer/peewee/issues/128/events | https://github.com/coleifer/peewee/issues/128 | 8,447,594 | MDU6SXNzdWU4NDQ3NTk0 | 128 | Create Table Failed | {
"login": "coderbuzz",
"id": 1284811,
"node_id": "MDQ6VXNlcjEyODQ4MTE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1284811?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/coderbuzz",
"html_url": "https://github.com/coderbuzz",
"followers_url": "https://api.github.com/users/co... | [] | closed | false | null | [] | null | [
"I wasn't able to replicate this locally. What commit/version of peewee do you use and what database backend are you using? Was there any more information in that traceback?\n\nPart of why I'm confused: https://github.com/coleifer/peewee/blob/master/peewee.py#L1968 --- blank?\n",
"Wow I'm using Unstable\\2.0 v... | 2012-11-18T04:39:58 | 2012-11-18T06:05:42 | 2012-11-18T06:05:42 | NONE | null | ``` python
class SomeModel(BaseModel):
nama = CharField(max_length=30, index=True)
kategori = CharField(max_length=30, index=True)
value = CharField(max_length=255, null=True)
keterangan = CharField(max_length=255, null=True)
SomeModel.create_table()
```
_Traceback (most recent call last):
File "D... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/128/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/128/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/127 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/127/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/127/comments | https://api.github.com/repos/coleifer/peewee/issues/127/events | https://github.com/coleifer/peewee/issues/127 | 8,227,913 | MDU6SXNzdWU4MjI3OTEz | 127 | update query overwrites id with single value | {
"login": "davidthewatson",
"id": 150892,
"node_id": "MDQ6VXNlcjE1MDg5Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/150892?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/davidthewatson",
"html_url": "https://github.com/davidthewatson",
"followers_url": "https://api.github... | [] | closed | false | null | [] | null | [
"Updates follow the sql update query syntax, so in your example the queries executed are:\n\n``` sql\nupdate ornaments set id=%s, likes=%s\n```\n\nWhat you want is:\n\n``` sql\nupdate ornametns set likes=%s where id = %s\n```\n\nSo:\n\n``` python\nfor id, like in zip(ids, likes):\n o = Ornaments.update(likes=lik... | 2012-11-09T05:15:55 | 2012-11-15T13:17:15 | 2012-11-14T14:18:37 | NONE | null | I have the following models, mostly generated from pwiz. I'm using peewee 2.0.3 on linux with mysql.
```
class Users(BaseModel):
"""The users database model."""
fbid = BigIntegerField()
fbname = CharField()
lastsession = CharField()
playedts = IntegerField()
class Meta:
db_table = 'use... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/127/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/127/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/126 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/126/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/126/comments | https://api.github.com/repos/coleifer/peewee/issues/126/events | https://github.com/coleifer/peewee/issues/126 | 7,992,687 | MDU6SXNzdWU3OTkyNjg3 | 126 | Select with outer changes | {
"login": "efreeze",
"id": 473909,
"node_id": "MDQ6VXNlcjQ3MzkwOQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/473909?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/efreeze",
"html_url": "https://github.com/efreeze",
"followers_url": "https://api.github.com/users/efreeze/fo... | [] | closed | false | null | [] | null | [
"Thanks for reporting. I believe the problem is your connection isolation level is \"read committed\", meaning once your transaction begins (implicitly with the first select), it will only read rows committed before that transaction was initiated. When you `commit()` on the connection and a new transaction begins... | 2012-10-31T08:58:15 | 2012-10-31T14:00:55 | 2012-10-31T14:00:55 | NONE | null | Model:
``` python
database = MySQLDatabase('blah', **{...})
class BaseModel(Model):
class Meta:
database = database
class Zone(BaseModel):
field = IntegerField()
Query on empty table:
Zone.select().where(Zone.field == 1).count()
```
It returns 0 items.
The application is running.
I'm insert into ta... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/126/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/126/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/125 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/125/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/125/comments | https://api.github.com/repos/coleifer/peewee/issues/125/events | https://github.com/coleifer/peewee/issues/125 | 7,945,306 | MDU6SXNzdWU3OTQ1MzA2 | 125 | AttributeError: 'MySQLDatabase' object has no attribute 'quote' | {
"login": "kr2",
"id": 1094983,
"node_id": "MDQ6VXNlcjEwOTQ5ODM=",
"avatar_url": "https://avatars.githubusercontent.com/u/1094983?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kr2",
"html_url": "https://github.com/kr2",
"followers_url": "https://api.github.com/users/kr2/followers",
"f... | [] | closed | false | null | [] | null | [
"This has actually been fixed for a while, I just need to push a new release. Will do so now.\n"
] | 2012-10-29T17:41:16 | 2012-10-30T03:14:56 | 2012-10-30T03:14:56 | NONE | null | C:\Python27\lib\site-packages\peewee-2.0.2-py2.7.egg\peewee.py in create_table(cls, fail_silently)
2003 for field_name, field_obj in cls._meta.fields.items():
2004 if isinstance(field_obj, ForeignKeyField):
-> 2005 db.create_foreign_key(cls, field_obj)
2006 elif ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/125/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/125/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/124 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/124/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/124/comments | https://api.github.com/repos/coleifer/peewee/issues/124/events | https://github.com/coleifer/peewee/issues/124 | 7,934,039 | MDU6SXNzdWU3OTM0MDM5 | 124 | logger name should be 'peewee' or __name__ | {
"login": "vsajip",
"id": 130553,
"node_id": "MDQ6VXNlcjEzMDU1Mw==",
"avatar_url": "https://avatars.githubusercontent.com/u/130553?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vsajip",
"html_url": "https://github.com/vsajip",
"followers_url": "https://api.github.com/users/vsajip/follow... | [] | closed | false | null | [] | null | [] | 2012-10-29T12:22:43 | 2012-10-30T03:12:57 | 2012-10-30T03:12:57 | NONE | null | NBD, but it would be better if the logger name you used were either 'peewee' or **name**. This would be more important if peewee ever became a package as opposed to a single module.
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/124/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/124/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/123 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/123/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/123/comments | https://api.github.com/repos/coleifer/peewee/issues/123/events | https://github.com/coleifer/peewee/issues/123 | 7,929,740 | MDU6SXNzdWU3OTI5NzQw | 123 | Create Unique index fails | {
"login": "skid",
"id": 240319,
"node_id": "MDQ6VXNlcjI0MDMxOQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/240319?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/skid",
"html_url": "https://github.com/skid",
"followers_url": "https://api.github.com/users/skid/followers",
... | [] | closed | false | null | [] | null | [
"Oh, I see this is fixed in the Github version... Sorry.\n",
"I'll push an update today or tomorrow\n"
] | 2012-10-29T09:08:06 | 2012-10-29T14:55:41 | 2012-10-29T09:20:01 | NONE | null | I'm using Peewee 2.0.2 (installed with pip), my model looks like this:
```
class Settings(Model):
key = CharField(max_length=25, index=True, unique=True)
value = CharField()
vtype = CharField(max_length=6)
class Meta:
db_table = 'settings'
```
When I run `Settings.create_table()` the followin... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/123/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/123/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/122 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/122/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/122/comments | https://api.github.com/repos/coleifer/peewee/issues/122/events | https://github.com/coleifer/peewee/issues/122 | 7,705,421 | MDU6SXNzdWU3NzA1NDIx | 122 | Support Microsoft SQL Servrr? | {
"login": "YCF",
"id": 65446,
"node_id": "MDQ6VXNlcjY1NDQ2",
"avatar_url": "https://avatars.githubusercontent.com/u/65446?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/YCF",
"html_url": "https://github.com/YCF",
"followers_url": "https://api.github.com/users/YCF/followers",
"following... | [] | closed | false | null | [] | null | [
"Not as a part of peewee, but if you're interested in writing support it should not be too hard.\n\nMight check out:\nhttp://code.google.com/p/pyodbc/\n",
"http://peewee.readthedocs.org/en/latest/peewee/database.html\n"
] | 2012-10-19T02:53:50 | 2012-10-19T15:22:02 | 2012-10-19T15:20:27 | NONE | null | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/122/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/122/timeline | null | completed | null | null | |
https://api.github.com/repos/coleifer/peewee/issues/121 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/121/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/121/comments | https://api.github.com/repos/coleifer/peewee/issues/121/events | https://github.com/coleifer/peewee/issues/121 | 7,657,355 | MDU6SXNzdWU3NjU3MzU1 | 121 | Any plans for supporting generic foreign keys? | {
"login": "sigurdga",
"id": 114134,
"node_id": "MDQ6VXNlcjExNDEzNA==",
"avatar_url": "https://avatars.githubusercontent.com/u/114134?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/sigurdga",
"html_url": "https://github.com/sigurdga",
"followers_url": "https://api.github.com/users/sigurdg... | [] | closed | false | null | [] | null | [
"If you want generic foreign keys, I would consider adding them as a part of the \"playhouse\" package. You're right, they hinge on having some sort of additional framework that maps database entries to model classes (or other tables, if you prefer). I'll take a look at this, as I have (ab)used django's GFKs a bi... | 2012-10-17T14:26:51 | 2019-11-11T23:12:12 | 2012-10-17T22:32:59 | NONE | null | After spending a day to see if peewee is suitable for my project(s), I cannot see any way to use generic foreign keys, or any way to do a query that will join on explicit column names and values.
Tags would be a natural case for this, when you want to refer to "content type" and "object id" to be able to use tags all ... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/121/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/121/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/120 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/120/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/120/comments | https://api.github.com/repos/coleifer/peewee/issues/120/events | https://github.com/coleifer/peewee/issues/120 | 7,643,401 | MDU6SXNzdWU3NjQzNDAx | 120 | AttributeError: 'ForeignKeyField' object has no attribute 'to' | {
"login": "kolanos",
"id": 17498,
"node_id": "MDQ6VXNlcjE3NDk4",
"avatar_url": "https://avatars.githubusercontent.com/u/17498?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kolanos",
"html_url": "https://github.com/kolanos",
"followers_url": "https://api.github.com/users/kolanos/follower... | [] | closed | false | null | [] | null | [
"Thanks for fixing this one so quickly! When is the next release planned? Right now I'm using the master branch to get around this bug.\n"
] | 2012-10-17T00:20:48 | 2012-10-29T16:44:34 | 2012-10-17T01:58:42 | NONE | null | The create_foreign_key() function appears to be referencing an attribute that doesn't exist:
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "env/local/lib/python2.7/site-packages/peewee.py", line 2003, in create_table
db.create_foreign_key(cls, field_obj)
File "env/local/lib/... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/120/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/120/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/119 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/119/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/119/comments | https://api.github.com/repos/coleifer/peewee/issues/119/events | https://github.com/coleifer/peewee/issues/119 | 7,623,912 | MDU6SXNzdWU3NjIzOTEy | 119 | Indexing and ordering troubles | {
"login": "rcarmo",
"id": 392683,
"node_id": "MDQ6VXNlcjM5MjY4Mw==",
"avatar_url": "https://avatars.githubusercontent.com/u/392683?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rcarmo",
"html_url": "https://github.com/rcarmo",
"followers_url": "https://api.github.com/users/rcarmo/follow... | [] | closed | false | null | [] | null | [
"It's just a little thing:\n\n``` python\n(('mac_address'), False),\n```\n\nshould be:\n\n``` python\n(('mac_address',), False), # <-- missing comma inside parentheses makes act like a string, not tuple\n```\n",
"Thanks.\n\nMaybe you should raise a custom exception when that happens, to avoid confusion?\n\nOn 16/... | 2012-10-16T13:21:47 | 2012-10-22T10:25:37 | 2012-10-16T15:06:39 | CONTRIBUTOR | null | While trying to create an index on a table, I've come across an error that I can't fathom, but which appears to be due to some mismatch between what I can see on ReadTheDocs and currently working code.
Here's my sample model:
``` python
#!/usr/bin/env python
"""
Test Case
"""
import os, sys, logging, datetime, plat... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/119/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/119/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/118 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/118/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/118/comments | https://api.github.com/repos/coleifer/peewee/issues/118/events | https://github.com/coleifer/peewee/issues/118 | 7,574,494 | MDU6SXNzdWU3NTc0NDk0 | 118 | Can't assign empty list on init | {
"login": "JCB-K",
"id": 636039,
"node_id": "MDQ6VXNlcjYzNjAzOQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/636039?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/JCB-K",
"html_url": "https://github.com/JCB-K",
"followers_url": "https://api.github.com/users/JCB-K/followers"... | [] | closed | false | null | [] | null | [
"Peewee models perform initialization on startup. Call the `super` method first:\n\n``` python\n\ndef __init__(self):\n super(Foo, self).__init__()\n self.list = []\n```\n"
] | 2012-10-14T15:46:22 | 2012-10-14T15:52:50 | 2012-10-14T15:52:50 | NONE | null | I'm trying to make an attribute of a class an empty list on init, but I get the following error:
```
File "~/.virtualenv/foobar/lib/python2.7/site-packages/peewee.py", line 281, in __set__
instance._data[self.att_name] = value
TypeError: 'NoneType' object does not support item assignment
```
Steps to reproduce:... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/118/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/118/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/117 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/117/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/117/comments | https://api.github.com/repos/coleifer/peewee/issues/117/events | https://github.com/coleifer/peewee/issues/117 | 7,546,699 | MDU6SXNzdWU3NTQ2Njk5 | 117 | UTF-8/Unicode Issues | {
"login": "rcarmo",
"id": 392683,
"node_id": "MDQ6VXNlcjM5MjY4Mw==",
"avatar_url": "https://avatars.githubusercontent.com/u/392683?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rcarmo",
"html_url": "https://github.com/rcarmo",
"followers_url": "https://api.github.com/users/rcarmo/follow... | [] | closed | false | null | [] | null | [
"Ouch -- could you paste the actual exception?\n",
"I've since worked around it by doing:\n\nd.name = unicode(name, 'utf-8') \n\nIn my code. I'm guessing there's a little more to this, but will try to check again later on.\n\nOn 12/10/2012, at 16:59, Charles Leifer notifications@github.com wrote:\n\n> Ouch -- co... | 2012-10-12T15:58:44 | 2012-12-14T22:39:44 | 2012-12-14T22:39:44 | CONTRIBUTOR | null | There seem to be some UTF-8 issues lingering with Python 2.7.
While trying to set a text field to "Operações", I got the following stack dump:
Traceback (most recent call last):
...
File "/home/rcarmo/test/devices.py", line 81, in activate_device
d.save()
File "/home/rcarmo/test/peewee.py", line 1992, in save... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/117/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/117/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/116 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/116/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/116/comments | https://api.github.com/repos/coleifer/peewee/issues/116/events | https://github.com/coleifer/peewee/issues/116 | 7,527,715 | MDU6SXNzdWU3NTI3NzE1 | 116 | Disabled autocommit on select | {
"login": "obensonne",
"id": 121881,
"node_id": "MDQ6VXNlcjEyMTg4MQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/121881?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/obensonne",
"html_url": "https://github.com/obensonne",
"followers_url": "https://api.github.com/users/oben... | [] | closed | false | null | [] | null | [
"My thinking was that we should only explicitly commit when, first of all, it is warranted (by being a query that writes something) and second of all, that the commit isn't being managed elsewhere.\n\nI am not aware of the need to open a transaction when doing SELECTs. That seems odd -- can you provide a little mo... | 2012-10-11T21:37:35 | 2012-10-12T09:32:39 | 2012-10-12T08:41:18 | NONE | null | The `Database.execute_sql()` considers 2 parameters when deciding if to do a _commit_ after executing a statement:
``` python
def execute_sql(self, sql, params=None, require_commit=True):
cursor = self.get_cursor()
res = cursor.execute(sql, params or ())
if require_commit and self.get_autocommit():
... | {
"url": "https://api.github.com/repos/coleifer/peewee/issues/116/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/116/timeline | null | completed | null | null |
https://api.github.com/repos/coleifer/peewee/issues/115 | https://api.github.com/repos/coleifer/peewee | https://api.github.com/repos/coleifer/peewee/issues/115/labels{/name} | https://api.github.com/repos/coleifer/peewee/issues/115/comments | https://api.github.com/repos/coleifer/peewee/issues/115/events | https://github.com/coleifer/peewee/issues/115 | 7,504,947 | MDU6SXNzdWU3NTA0OTQ3 | 115 | I was wander if i can use connect pool for peewee? | {
"login": "xiocode",
"id": 1326473,
"node_id": "MDQ6VXNlcjEzMjY0NzM=",
"avatar_url": "https://avatars.githubusercontent.com/u/1326473?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/xiocode",
"html_url": "https://github.com/xiocode",
"followers_url": "https://api.github.com/users/xiocode/... | [] | closed | false | null | [] | null | [
"There's no reason you can't if it sits between your database driver and the python driver you use. However if you plan on implementing one below your database driver you will need to modify peewee.\n"
] | 2012-10-11T07:05:42 | 2012-10-11T18:37:54 | 2012-10-11T18:37:54 | NONE | null | thks
| {
"url": "https://api.github.com/repos/coleifer/peewee/issues/115/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/coleifer/peewee/issues/115/timeline | null | completed | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.