API / Minn\Query / AuthorPostsSql

AuthorPostsSql final class

Minn\Query\AuthorPostsSql · public/minn/src/Minn/Query/AuthorPostsSql.php · 30 lines

get_posts_by_author_sql as the reference writes it: for each type, its published posts, and its private ones the reader may see (all of them with the cap to read others', their own otherwise), OR'd; an author narrows it; WHERE in front when asked.

Public

staticsql(array $types, int $reader, string $full, ?int $author, string $publicOnly): string#

The clause for the posts an author's lists count, as the reader may see them.

$typeslist<array{type: string, readPrivate: bool}>each type that exists, and whether the reader may read its private posts
$readerintthe signed-in reader's id, 0 when signed out