Event objects exclude type Event COMMIT select_related Event push to p

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
>>> Event.objects.exclude(type=Event.COMMIT).select_related()
[<Event: push to piranha/byteflow>, <Event: push to piranha/byteflow>, <Event: push to piranha/byteflow>]
>>> from django.db import connection
>>> connection.queries
[{'sql': 'SELECT "social_event"."id", "social_event"."event_source_id", "social_event"."type", "social_event"."actor_id", "social_event"."source_repo_id", "social_event"."actee_id", "social_event"."dest_repo_id", "social_event"."commit", "social_event"."is_finished", "social_event"."date", "social_event"."comment", "social_eventsource"."id", "auth_user"."id", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."password", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."is_superuser", "auth_user"."last_login", "auth_user"."date_joined", "auth_user"."site", "auth_user"."email_new", "auth_user"."is_commit_guy", "auth_user"."name", "auth_user"."avatar", "auth_user"."keys", "auth_user"."event_source_id", "auth_user"."highlight_style", T4."id", "repo_repo"."id", "repo_repo"."user_id", "repo_repo"."name", "repo_repo"."parent_id", "repo_repo"."creation_date", "repo_repo"."upd_date", "repo_repo"."description", "repo_repo"."event_source_id", "repo_repo"."access_level", T6."id", T6."username", T6."first_name", T6."last_name", T6."email", T6."password", T6."is_staff", T6."is_active", T6."is_superuser", T6."last_login", T6."date_joined", T6."site", T6."email_new", T6."is_commit_guy", T6."name", T6."avatar", T6."keys", T6."event_source_id", T6."highlight_style", T7."id", T8."id" FROM "social_event" INNER JOIN "social_eventsource" ON ("social_event"."event_source_id" = "social_eventsource"."id") INNER JOIN "auth_user" ON ("social_event"."actor_id" = "auth_user"."id") INNER JOIN "social_eventsource" T4 ON ("auth_user"."event_source_id" = T4."id") INNER JOIN "repo_repo" ON ("social_event"."dest_repo_id" = "repo_repo"."id") INNER JOIN "auth_user" T6 ON ("repo_repo"."user_id" = T6."id") INNER JOIN "social_eventsource" T7 ON (T6."event_source_id" = T7."id") INNER JOIN "social_eventsource" T8 ON ("repo_repo"."event_source_id" = T8."id") WHERE NOT ("social_event"."type" = 1 ) ORDER BY "social_event"."date" DESC LIMIT 21',
'time': '0.008'},
{'sql': 'SELECT "social_eventsource"."id" FROM "social_eventsource" WHERE "social_eventsource"."id" = 1 ',
'time': '0.000'},
{'sql': 'SELECT "auth_user"."id", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."password", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."is_superuser", "auth_user"."last_login", "auth_user"."date_joined", "auth_user"."site", "auth_user"."email_new", "auth_user"."is_commit_guy", "auth_user"."name", "auth_user"."avatar", "auth_user"."keys", "auth_user"."event_source_id", "auth_user"."highlight_style" FROM "auth_user" WHERE "auth_user"."id" = 1 ',
'time': '0.000'},
{'sql': 'SELECT "social_eventsource"."id" FROM "social_eventsource" WHERE "social_eventsource"."id" = 1 ',
'time': '0.000'},
{'sql': 'SELECT "social_eventsource"."id" FROM "social_eventsource" WHERE "social_eventsource"."id" = 1 ',
'time': '0.000'},
{'sql': 'SELECT "social_eventsource"."id" FROM "social_eventsource" WHERE "social_eventsource"."id" = 1 ',
'time': '0.000'},
{'sql': 'SELECT "auth_user"."id", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."password", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."is_superuser", "auth_user"."last_login", "auth_user"."date_joined", "auth_user"."site", "auth_user"."email_new", "auth_user"."is_commit_guy", "auth_user"."name", "auth_user"."avatar", "auth_user"."keys", "auth_user"."event_source_id", "auth_user"."highlight_style" FROM "auth_user" WHERE "auth_user"."id" = 1 ',
'time': '0.000'},
{'sql': 'SELECT "social_eventsource"."id" FROM "social_eventsource" WHERE "social_eventsource"."id" = 1 ',
'time': '0.000'},
{'sql': 'SELECT "social_eventsource"."id" FROM "social_eventsource" WHERE "social_eventsource"."id" = 1 ',
'time': '0.000'},
{'sql': 'SELECT "social_eventsource"."id" FROM "social_eventsource" WHERE "social_eventsource"."id" = 1 ',
'time': '0.000'},
{'sql': 'SELECT "auth_user"."id", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."password", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."is_superuser", "auth_user"."last_login", "auth_user"."date_joined", "auth_user"."site", "auth_user"."email_new", "auth_user"."is_commit_guy", "auth_user"."name", "auth_user"."avatar", "auth_user"."keys", "auth_user"."event_source_id", "auth_user"."highlight_style" FROM "auth_user" WHERE "auth_user"."id" = 1 ',
'time': '0.000'},
{'sql': 'SELECT "social_eventsource"."id" FROM "social_eventsource" WHERE "social_eventsource"."id" = 1 ',
'time': '0.000'},
{'sql': 'SELECT "social_eventsource"."id" FROM "social_eventsource" WHERE "social_eventsource"."id" = 1 ',
'time': '0.000'}]