Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add :owned param to ProjectFinder | Toon Claes | 2017-05-30 | 1 | -2/+7 |
| | | | | And use it in the API. | ||||
* | Make it possible to combine :trending with other params | Toon Claes | 2017-05-30 | 1 | -6/+7 |
| | | | | | Now it is possible to combine the :non_public parameter. This might be useful when a user wants to know the trending projects they are member of. | ||||
* | UNION of SELECT/WHERE is faster than WHERE on UNION | Toon Claes | 2017-05-30 | 1 | -8/+10 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of applying WHERE on a UNION, apply the WHERE on each of the seperate SELECT statements, and do UNION on that. Local tests with about 2_000_000 projects: - 1_500_000 private projects - 40_000 internal projects - 400_000 public projects For the API endpoint `/api/v4/projects?visibility=private` the slowest query was: ```sql SELECT "projects".* FROM "projects" WHERE ... ``` The original query took 1073.8ms. The query refactored to UNION of SELECT/WHERE took 2.3ms. The original query was: ```sql SELECT "projects".* FROM "projects" WHERE "projects"."pending_delete" = $1 AND (projects.id IN (SELECT "projects"."id" FROM "projects" INNER JOIN "project_authorizations" ON "projects"."id" = "project_authorizations"."project_id" WHERE "projects"."pending_delete" = 'f' AND "project_authorizations"."user_id" = 23 UNION SELECT "projects"."id" FROM "projects" WHERE "projects"."visibility_level" IN (20, 10))) AND "projects"."visibility_level" = $2 AND "projects"."archived" = $3 ORDER BY "projects"."created_at" DESC LIMIT 20 OFFSET 0 [["pending_delete", "f"], ["visibility_level", 0], ["archived", "f"]] ``` The refactored query: ```sql SELECT "projects".* FROM "projects" WHERE "projects"."pending_delete" = $1 AND (projects.id IN (SELECT "projects"."id" FROM "projects" INNER JOIN "project_authorizations" ON "projects"."id" = "project_authorizations"."project_id" WHERE "projects"."pending_delete" = 'f' AND "project_authorizations"."user_id" = 23 AND "projects"."visibility_level" = 0 AND "projects"."archived" = 'f' UNION SELECT "projects"."id" FROM "projects" WHERE "projects"."visibility_level" IN (20, 10) AND "projects"."visibility_level" = 0 AND "projects"."archived" = 'f')) ORDER BY "projects"."created_at" DESC LIMIT 20 OFFSET 0 [["pending_delete", "f"]] ``` | ||||
* | Change ProjectFinder so starred can be combined with other filters | Toon Claes | 2017-05-30 | 1 | -2/+5 |
| | | | | | The `starred` parameter couldn't be used in combination with `trending` or `non_public`. But this is changed now. | ||||
* | Create a Users Finder | George Andrinopoulos | 2017-05-15 | 1 | -0/+74 |
| | |||||
* | Merge branch 'tc-fix-private-subgroups-shown' into 'security' | Douwe Maan | 2017-05-10 | 1 | -4/+16 |
| | | | | | Use GroupsFinder to find subgroups the user has access to See merge request !2096 | ||||
* | Merge branch 'snippets-finder-visibility' into 'security' | Douwe Maan | 2017-05-10 | 2 | -48/+56 |
| | | | | | | Refactor snippets finder & dont return internal snippets for external users See merge request !2094 | ||||
* | Add Pipeline Schedules that supersedes experimental Trigger Schedule | Zeger-Jan van de Weg | 2017-05-07 | 1 | -0/+22 |
| | |||||
* | Backport of multiple_assignees_feature [ci skip] | Valery Sizov | 2017-05-04 | 2 | -5/+16 |
| | |||||
* | Add constant as ALLOWED_INDEXED_COLUMNS | Shinya Maeda | 2017-05-03 | 1 | -1/+3 |
| | |||||
* | Use HasStatus::AVAILABLE_STATUSES instead of hard coding | Shinya Maeda | 2017-05-03 | 1 | -16/+3 |
| | |||||
* | Add a blank line between blocks | Shinya Maeda | 2017-05-03 | 1 | -0/+2 |
| | |||||
* | Revert "Use JSON type for sorting parameter (halfway)" | Shinya Maeda | 2017-05-03 | 1 | -15/+11 |
| | | | | This reverts commit 34127cb13ad72f65a24bdc8fc051363d3edd77cb. | ||||
* | Use JSON type for sorting parameter (halfway) | Shinya Maeda | 2017-05-03 | 1 | -11/+15 |
| | |||||
* | Use order instead of reorder. Improve tests. | Shinya Maeda | 2017-05-03 | 1 | -1/+1 |
| | |||||
* | Fix improper method name and spec description | Shinya Maeda | 2017-05-03 | 1 | -2/+2 |
| | |||||
* | Allow only indexed columns in #order_and_sort. Remove present (Because ↵ | Shinya Maeda | 2017-05-03 | 1 | -2/+2 |
| | | | | unnecessary) from condition. Added spec just in case. | ||||
* | Avoid hardcode table name | Shinya Maeda | 2017-05-03 | 1 | -2/+2 |
| | |||||
* | Add name. Improve order_and_sort. | Shinya Maeda | 2017-05-03 | 1 | -7/+12 |
| | |||||
* | Add name(User) | Shinya Maeda | 2017-05-03 | 1 | -0/+8 |
| | |||||
* | Change name to username | Shinya Maeda | 2017-05-03 | 1 | -1/+1 |
| | |||||
* | Fix inappropriate regex | Shinya Maeda | 2017-05-03 | 1 | -1/+1 |
| | |||||
* | Use 'case/when/end' | Shinya Maeda | 2017-05-03 | 1 | -7/+5 |
| | |||||
* | Improved CI. Fix yaml_errors boolean evaluation. | Shinya Maeda | 2017-05-03 | 1 | -1/+1 |
| | |||||
* | Fixed the following. | Shinya Maeda | 2017-05-03 | 1 | -3/+4 |
| | | | | | | - Fix inappropriate evaluation(casecmp) to regex - Fix missed boolean conversion - Improve spec | ||||
* | Fixed SQL injection | Shinya Maeda | 2017-05-03 | 1 | -2/+2 |
| | |||||
* | Fix rubocop offences and rspec failures | Shinya Maeda | 2017-05-03 | 1 | -2/+2 |
| | |||||
* | Add specs. Plus, minor fixes. | Shinya Maeda | 2017-05-03 | 1 | -2/+6 |
| | |||||
* | Fixed those points. | Shinya Maeda | 2017-05-03 | 1 | -17/+10 |
| | | | | | | | | - username to user_id - Drop duration - Resolve comments - Add Changelog - Edit docs | ||||
* | Remove unnecessary comment | Shinya Maeda | 2017-05-03 | 1 | -1/+1 |
| | |||||
* | - Add new parameters for Pipeline API | Shinya Maeda | 2017-05-03 | 1 | -20/+88 |
| | | | | - Expand PipelinesFinder functions | ||||
* | Display comments for personal snippets12910-personal-snippets-notes-show | Jarka Kadlecova | 2017-05-02 | 1 | -0/+2 |
| | |||||
* | Ability to filter merge requests by labels and milestones | Robert Schilling | 2017-04-25 | 1 | -1/+1 |
| | |||||
* | Merge branch 'update-droplab-to-webpack-version' into new-resolvable-discussion | Luke "Jared" Bennett | 2017-04-06 | 5 | -34/+125 |
|\ | |||||
| * | ProjectsFinder should handle more options | Jacopo | 2017-04-06 | 5 | -34/+125 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extended ProjectFinder in order to handle the following options: - current_user - which user use - project_ids_relation: int[] - project ids to use - params: - trending: boolean - non_public: boolean - starred: boolean - sort: string - visibility_level: int - tags: string[] - personal: boolean - search: string - non_archived: boolean GroupProjectsFinder now inherits from ProjectsFinder. Changed the code in order to use the new available options. | ||||
* | | Fix specs | Douwe Maan | 2017-04-05 | 1 | -2/+2 |
| | | |||||
* | | Address review comments | Douwe Maan | 2017-04-05 | 1 | -8/+13 |
| | | |||||
* | | Add option to start a new discussion on an MR | Douwe Maan | 2017-04-05 | 1 | -22/+32 |
|/ | |||||
* | Fixes milestone/merge_request API endpoint to really scope the results | Joren De Groof | 2017-04-03 | 2 | -2/+2 |
| | | | | | The MergeRequestsFinder uses the milestone_title instead of the milestone_id | ||||
* | Merge branch 'jej-group-name-disclosure' into 'security' | Sean McGivern | 2017-03-29 | 1 | -0/+17 |
| | | | | | | Prevent private group disclosure via parent_id See merge request !2077 | ||||
* | Optimize labels finder query | mhasbini | 2017-03-27 | 1 | -2/+11 |
| | | | | Optimize labels finder query when searching for a project with a group | ||||
* | Revert "Merge branch '29534-todos-performance' into 'master'" | Sean McGivern | 2017-03-21 | 1 | -12/+0 |
| | | | This reverts merge request !10076 | ||||
* | Todos performance: Include associations in Finder | Jarka Kadlecova | 2017-03-20 | 1 | -0/+12 |
| | |||||
* | Allow filtering by all started milestonesbetter-priority-sorting | Sean McGivern | 2017-03-15 | 1 | -0/+6 |
| | |||||
* | Show members of parent groups on project members pagedz-nested-groups-members | Dmitriy Zaporozhets | 2017-03-09 | 2 | -10/+32 |
| | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | ||||
* | Merge remote-tracking branch ↵ | Douwe Maan | 2017-03-07 | 1 | -0/+45 |
|\ | | | | | | | 'origin/personal_access_token_api_and_impersonation_token' | ||||
| * | apply codestyle and implementation changes to the respective feature codepersonal_access_token_api_and_impersonation_token | Tiago Botelho | 2017-03-06 | 1 | -16/+14 |
| | | |||||
| * | refactors finder and correlated code | Tiago Botelho | 2017-03-01 | 1 | -25/+31 |
| | | |||||
| * | applies relevant changes to the code and code structure | Tiago Botelho | 2017-02-28 | 1 | -0/+41 |
| | | |||||
* | | Improve issues filtering performance | Jarka Kadlecova | 2017-03-06 | 3 | -14/+31 |
|/ |