Fixed SQL column ambiguity in filter parsing
This commit is contained in:
parent
7e2e90ad3f
commit
e623513e3d
5 changed files with 41 additions and 41 deletions
|
@ -5,7 +5,7 @@ class CommentFilter extends BasicFilter implements IFilter
|
|||
{
|
||||
const ORDER_ID = 'id';
|
||||
|
||||
const REQUIREMENT_POST_ID = 'postId';
|
||||
const REQUIREMENT_POST_ID = 'comments.postId';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
|
|
@ -3,36 +3,36 @@ namespace Szurubooru\Search\Filters;
|
|||
|
||||
class PostFilter extends BasicFilter implements IFilter
|
||||
{
|
||||
const ORDER_ID = 'id';
|
||||
const ORDER_FAV_COUNT = 'favCount';
|
||||
const ORDER_TAG_COUNT = 'tagCount';
|
||||
const ORDER_COMMENT_COUNT = 'commentCount';
|
||||
const ORDER_NOTE_COUNT = 'noteCount';
|
||||
const ORDER_SCORE = 'score';
|
||||
const ORDER_CREATION_TIME = 'creationTime';
|
||||
const ORDER_LAST_EDIT_TIME = 'lastEditTime';
|
||||
const ORDER_FILE_SIZE = 'originalFileSize';
|
||||
const ORDER_LAST_COMMENT_TIME = 'lastCommentCreationTime';
|
||||
const ORDER_LAST_FAV_TIME = 'lastFavTime';
|
||||
const ORDER_LAST_FEATURE_TIME = 'lastFeatureTime';
|
||||
const ORDER_FEATURE_COUNT = 'featureCount';
|
||||
const ORDER_ID = 'posts.id';
|
||||
const ORDER_FAV_COUNT = 'posts.favCount';
|
||||
const ORDER_TAG_COUNT = 'posts.tagCount';
|
||||
const ORDER_COMMENT_COUNT = 'posts.commentCount';
|
||||
const ORDER_NOTE_COUNT = 'posts.noteCount';
|
||||
const ORDER_SCORE = 'posts.score';
|
||||
const ORDER_CREATION_TIME = 'posts.creationTime';
|
||||
const ORDER_LAST_EDIT_TIME = 'posts.lastEditTime';
|
||||
const ORDER_FILE_SIZE = 'posts.originalFileSize';
|
||||
const ORDER_LAST_COMMENT_TIME = 'posts.lastCommentCreationTime';
|
||||
const ORDER_LAST_FAV_TIME = 'posts.lastFavTime';
|
||||
const ORDER_LAST_FEATURE_TIME = 'posts.lastFeatureTime';
|
||||
const ORDER_FEATURE_COUNT = 'posts.featureCount';
|
||||
|
||||
const REQUIREMENT_TAG = 'tag';
|
||||
const REQUIREMENT_ID = 'id';
|
||||
const REQUIREMENT_CREATION_TIME = 'creationTime';
|
||||
const REQUIREMENT_LAST_EDIT_TIME = 'lastEditTime';
|
||||
const REQUIREMENT_HASH = 'name';
|
||||
const REQUIREMENT_TAG_COUNT = 'tagCount';
|
||||
const REQUIREMENT_FAV_COUNT = 'favCount';
|
||||
const REQUIREMENT_COMMENT_COUNT = 'commentCount';
|
||||
const REQUIREMENT_NOTE_COUNT = 'noteCount';
|
||||
const REQUIREMENT_SCORE = 'score';
|
||||
const REQUIREMENT_TAG = 'posts.tag';
|
||||
const REQUIREMENT_ID = 'posts.id';
|
||||
const REQUIREMENT_CREATION_TIME = 'posts.creationTime';
|
||||
const REQUIREMENT_LAST_EDIT_TIME = 'posts.lastEditTime';
|
||||
const REQUIREMENT_HASH = 'posts.name';
|
||||
const REQUIREMENT_TAG_COUNT = 'posts.tagCount';
|
||||
const REQUIREMENT_FAV_COUNT = 'posts.favCount';
|
||||
const REQUIREMENT_COMMENT_COUNT = 'posts.commentCount';
|
||||
const REQUIREMENT_NOTE_COUNT = 'posts.noteCount';
|
||||
const REQUIREMENT_SCORE = 'posts.score';
|
||||
const REQUIREMENT_UPLOADER = 'uploader.name';
|
||||
const REQUIREMENT_SAFETY = 'safety';
|
||||
const REQUIREMENT_SAFETY = 'posts.safety';
|
||||
const REQUIREMENT_FAVORITE = 'favoritedBy.name';
|
||||
const REQUIREMENT_COMMENT_AUTHOR = 'commentedBy.name';
|
||||
const REQUIREMENT_TYPE = 'contentType';
|
||||
const REQUIREMENT_USER_SCORE = 'userScore';
|
||||
const REQUIREMENT_TYPE = 'posts.contentType';
|
||||
const REQUIREMENT_USER_SCORE = 'posts.userScore';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
|
|
@ -5,8 +5,8 @@ class SnapshotFilter extends BasicFilter implements IFilter
|
|||
{
|
||||
const ORDER_ID = 'id';
|
||||
|
||||
const REQUIREMENT_PRIMARY_KEY = 'primaryKey';
|
||||
const REQUIREMENT_TYPE = 'type';
|
||||
const REQUIREMENT_PRIMARY_KEY = 'snapshots.primaryKey';
|
||||
const REQUIREMENT_TYPE = 'snapshots.type';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
|
|
@ -3,17 +3,17 @@ namespace Szurubooru\Search\Filters;
|
|||
|
||||
class TagFilter extends BasicFilter implements IFilter
|
||||
{
|
||||
const ORDER_ID = 'id';
|
||||
const ORDER_NAME = 'name';
|
||||
const ORDER_CREATION_TIME = 'creationTime';
|
||||
const ORDER_LAST_EDIT_TIME = 'lastEditTime';
|
||||
const ORDER_USAGE_COUNT = 'usages';
|
||||
const ORDER_ID = 'tags.id';
|
||||
const ORDER_NAME = 'tags.name';
|
||||
const ORDER_CREATION_TIME = 'tags.creationTime';
|
||||
const ORDER_LAST_EDIT_TIME = 'tags.lastEditTime';
|
||||
const ORDER_USAGE_COUNT = 'tags.usages';
|
||||
|
||||
const REQUIREMENT_PARTIAL_TAG_NAME = 'partialTagName';
|
||||
const REQUIREMENT_CREATION_TIME = 'creationTime';
|
||||
const REQUIREMENT_LAST_EDIT_TIME = 'lastEditTime';
|
||||
const REQUIREMENT_CATEGORY = 'category';
|
||||
const REQUIREMENT_USAGE_COUNT = 'usages';
|
||||
const REQUIREMENT_PARTIAL_TAG_NAME = 'tags.partialTagName';
|
||||
const REQUIREMENT_CREATION_TIME = 'tags.creationTime';
|
||||
const REQUIREMENT_LAST_EDIT_TIME = 'tags.lastEditTime';
|
||||
const REQUIREMENT_CATEGORY = 'tags.category';
|
||||
const REQUIREMENT_USAGE_COUNT = 'tags.usages';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
|
|
@ -3,8 +3,8 @@ namespace Szurubooru\Search\Filters;
|
|||
|
||||
class UserFilter extends BasicFilter implements IFilter
|
||||
{
|
||||
const ORDER_NAME = 'name';
|
||||
const ORDER_CREATION_TIME = 'creationTime';
|
||||
const ORDER_NAME = 'users.name';
|
||||
const ORDER_CREATION_TIME = 'users.creationTime';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue