diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2017-08-07 17:21:45 +0200 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2017-08-07 17:23:05 +0200 |
commit | 3925bbdf4e6429e9909fbe3b02aebea5dd0ac868 (patch) | |
tree | 3c7af54ec1f79c67998f9828f88d48fa2264e098 /tmp | |
parent | 81933cfdd3e23d24ae18c0d2f5452ecd9690ab63 (diff) | |
download | gitlab-ce-project-url-constrainer-select.tar.gz |
Don't SELECT * just to check if a project existsproject-url-constrainer-select
In ProjectUrlConstrainer we use Project.find_by_full_path to check if a
project exists. This query however by default would perform a "SELECT *"
when we only care about whether or not any rows would be returned. Since
find_by_full_path does not return an ActiveRecord::Relation the easiest
way to optimise this is to simply perform a "SELECT 1" instead.
Diffstat (limited to 'tmp')
0 files changed, 0 insertions, 0 deletions