Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
464295c1
Commit
464295c1
authored
7 years ago
by
Cam Saül
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #5466 from metabase/more-cleanup
Clean up some indentation and other code
parents
e6e70415
5e35a3a5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/metabase/models/table.clj
+2
-1
2 additions, 1 deletion
src/metabase/models/table.clj
test/metabase/api/database_test.clj
+0
-5
0 additions, 5 deletions
test/metabase/api/database_test.clj
test/metabase/test/mock/moviedb.clj
+17
-17
17 additions, 17 deletions
test/metabase/test/mock/moviedb.clj
with
19 additions
and
23 deletions
src/metabase/models/table.clj
+
2
−
1
View file @
464295c1
...
...
@@ -23,7 +23,8 @@
#
{
:person
:event
:photo
:place
})
(
def
^
:const
visibility-types
"Valid values for `Table.visibility_type` (field may also be `nil`)."
"Valid values for `Table.visibility_type` (field may also be `nil`).
(Basically any non-nil value is a reason for hiding the table.)"
#
{
:hidden
:technical
:cruft
})
...
...
This diff is collapsed.
Click to expand it.
test/metabase/api/database_test.clj
+
0
−
5
View file @
464295c1
...
...
@@ -126,11 +126,6 @@
(
dissoc
(
into
{}
(
db/select-one
[
Database
:name
:engine
:details
:is_full_sync
]
,
:id
db-id
))
:features
)))
:description
nil
:entity_type
nil
:caveats
nil
:points_of_interest
nil
:visibility_type
nil
(
def
^
:private
default-table-details
{
:description
nil
:entity_name
nil
...
...
This diff is collapsed.
Click to expand it.
test/metabase/test/mock/moviedb.clj
+
17
−
17
View file @
464295c1
...
...
@@ -58,23 +58,23 @@
(
extend
MovieDbDriver
driver/IDriver
(
merge
driver/IDriverDefaultsMixin
{
:analyze-table
(
constantly
nil
)
:describe-database
(
fn
[
_
{
:keys
[
exclude-tables
]}]
(
let
[
tables
(
for
[
table
(
vals
moviedb-tables
)
:when
(
not
(
contains?
exclude-tables
(
:name
table
)))]
(
select-keys
table
[
:schema
:name
]))]
{
:tables
(
set
tables
)}))
:describe-table
(
fn
[
_
_
table
]
(
->
(
get
moviedb-tables
(
:name
table
))
(
dissoc
:fks
)))
:describe-table-fks
(
fn
[
_
_
table
]
(
->
(
get
moviedb-tables
(
:name
table
))
:fks
set
))
:features
(
constantly
#
{
:foreign-keys
})
:details-fields
(
constantly
[])
:table-rows-seq
(
constantly
[{
:keypath
"movies.filming.description"
,
:value
"If the movie is currently being filmed."
}
{
:keypath
"movies.description"
,
:value
"A cinematic adventure."
}])}))
{
:analyze-table
(
constantly
nil
)
:describe-database
(
fn
[
_
{
:keys
[
exclude-tables
]}]
(
let
[
tables
(
for
[
table
(
vals
moviedb-tables
)
:when
(
not
(
contains?
exclude-tables
(
:name
table
)))]
(
select-keys
table
[
:schema
:name
]))]
{
:tables
(
set
tables
)}))
:describe-table
(
fn
[
_
_
table
]
(
->
(
get
moviedb-tables
(
:name
table
))
(
dissoc
:fks
)))
:describe-table-fks
(
fn
[
_
_
table
]
(
->
(
get
moviedb-tables
(
:name
table
))
:fks
set
))
:features
(
constantly
#
{
:foreign-keys
})
:details-fields
(
constantly
[])
:table-rows-seq
(
constantly
[{
:keypath
"movies.filming.description"
,
:value
"If the movie is currently being filmed."
}
{
:keypath
"movies.description"
,
:value
"A cinematic adventure."
}])}))
(
driver/register-driver!
:moviedb
(
MovieDbDriver.
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment