Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9ed52eb9
Commit
9ed52eb9
authored
Jul 23, 2020
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the Geo::Fdw::Upload model
parent
06e3a1b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
58 deletions
+0
-58
ee/app/models/geo/fdw/upload.rb
ee/app/models/geo/fdw/upload.rb
+0
-58
No files found.
ee/app/models/geo/fdw/upload.rb
deleted
100644 → 0
View file @
06e3a1b5
# frozen_string_literal: true
module
Geo
module
Fdw
class
Upload
<
::
Geo
::
BaseFdw
include
Gitlab
::
SQL
::
Pattern
include
ObjectStorable
STORE_COLUMN
=
:store
self
.
primary_key
=
:id
self
.
table_name
=
Gitlab
::
Geo
::
Fdw
.
foreign_table_name
(
'uploads'
)
has_one
:registry
,
class_name:
'Geo::UploadRegistry'
,
foreign_key: :file_id
class
<<
self
def
for_model
(
model
)
inner_join_registry
.
where
(
model_id:
model
.
id
,
model_type:
model
.
class
.
name
)
end
def
inner_join_registry
joins
(
:registry
)
end
def
missing_registry
left_outer_join_registry
.
where
(
registry_table
[
:id
].
eq
(
nil
))
end
# Searches for a list of uploads based on the query given in `query`.
#
# On PostgreSQL this method uses "ILIKE" to perform a case-insensitive
# search.
#
# query - The search query as a String.
def
search
(
query
)
fuzzy_search
(
query
,
[
:path
])
end
private
def
registry_table
Geo
::
UploadRegistry
.
arel_table
end
def
left_outer_join_registry
join_statement
=
arel_table
.
join
(
registry_table
,
Arel
::
Nodes
::
OuterJoin
)
.
on
(
arel_table
[
:id
].
eq
(
registry_table
[
:file_id
]))
joins
(
join_statement
.
join_sources
)
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment