mirror of
https://github.com/friendica/friendica
synced 2025-04-29 03:04:22 +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
|
@ -497,6 +497,23 @@ class Post
|
|||
return self::selectViewForUser('post-view', $uid, $selected, $condition, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Select rows from the post-timeline-view view for a given user
|
||||
* This function is used for API calls.
|
||||
*
|
||||
* @param integer $uid User ID
|
||||
* @param array $selected Array of selected fields, empty for all
|
||||
* @param array $condition Array of fields for condition
|
||||
* @param array $params Array of several parameters
|
||||
*
|
||||
* @return boolean|object
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function selectTimelineForUser(int $uid, array $selected = [], array $condition = [], array $params = [])
|
||||
{
|
||||
return self::selectViewForUser('post-timeline-view', $uid, $selected, $condition, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Select rows from the post-thread-user-view view for a given user
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue