mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 04:45:16 +02:00
Improve the performance of API timeline calls
This commit is contained in:
parent
2cd18fd4bf
commit
1c67be8db0
8 changed files with 147 additions and 26 deletions
|
@ -87,6 +87,49 @@
|
|||
INNER JOIN `contact` ON `group_member`.`contact-id` = `contact`.`id`
|
||||
INNER JOIN `group` ON `group_member`.`gid` = `group`.`id`"
|
||||
],
|
||||
"post-timeline-view" => [
|
||||
"fields" => [
|
||||
"uid" => ["post-user", "uid"],
|
||||
"uri-id" => ["post-user", "uri-id"],
|
||||
"gravity" => ["post-user", "gravity"],
|
||||
"created" => ["post-user", "created"],
|
||||
"edited" => ["post-user", "edited"],
|
||||
"commented" => ["post-thread-user", "commented"],
|
||||
"received" => ["post-user", "received"],
|
||||
"changed" => ["post-thread-user", "changed"],
|
||||
"private" => ["post-user", "private"],
|
||||
"visible" => ["post-user", "visible"],
|
||||
"deleted" => ["post-user", "deleted"],
|
||||
"origin" => ["post-user", "origin"],
|
||||
"global" => ["post-user", "global"],
|
||||
"network" => ["post-user", "network"],
|
||||
"protocol" => ["post-user", "protocol"],
|
||||
"vid" => ["post-user", "vid"],
|
||||
"contact-id" => ["post-user", "contact-id"],
|
||||
"contact-blocked" => ["contact", "blocked"],
|
||||
"contact-readonly" => ["contact", "readonly"],
|
||||
"contact-pending" => ["contact", "pending"],
|
||||
"contact-rel" => ["contact", "rel"],
|
||||
"contact-uid" => ["contact", "uid"],
|
||||
"self" => ["contact", "self"],
|
||||
"author-id" => ["post-user", "author-id"],
|
||||
"author-blocked" => ["author", "blocked"],
|
||||
"author-hidden" => ["author", "hidden"],
|
||||
"author-gsid" => ["author", "gsid"],
|
||||
"owner-id" => ["post-user", "owner-id"],
|
||||
"owner-blocked" => ["owner", "blocked"],
|
||||
"owner-gsid" => ["owner", "gsid"],
|
||||
"causer-id" => ["post-user", "causer-id"],
|
||||
"causer-blocked" => ["causer", "blocked"],
|
||||
"causer-gsid" => ["causer", "gsid"],
|
||||
],
|
||||
"query" => "FROM `post-user`
|
||||
LEFT JOIN `post-thread-user` ON `post-thread-user`.`uri-id` = `post-user`.`parent-uri-id` AND `post-thread-user`.`uid` = `post-user`.`uid`
|
||||
STRAIGHT_JOIN `contact` ON `contact`.`id` = `post-user`.`contact-id`
|
||||
STRAIGHT_JOIN `contact` AS `author` ON `author`.`id` = `post-user`.`author-id`
|
||||
STRAIGHT_JOIN `contact` AS `owner` ON `owner`.`id` = `post-user`.`owner-id`
|
||||
LEFT JOIN `contact` AS `causer` ON `causer`.`id` = `post-user`.`causer-id`"
|
||||
],
|
||||
"post-user-view" => [
|
||||
"fields" => [
|
||||
"id" => ["post-user", "id"],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue