Skip to content
Snippets Groups Projects
Commit 464295c1 authored by Cam Saül's avatar Cam Saül Committed by GitHub
Browse files

Merge pull request #5466 from metabase/more-cleanup

Clean up some indentation and other code
parents e6e70415 5e35a3a5
No related branches found
No related tags found
No related merge requests found
......@@ -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})
......
......@@ -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
......
......@@ -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.))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment