Skip to content
Snippets Groups Projects
Commit 8aa17726 authored by Cam Saul's avatar Cam Saul
Browse files

a few minor tweaks for drivers

parent 8cff552f
No related branches found
No related tags found
No related merge requests found
......@@ -142,7 +142,7 @@
[table-id]
{:pre [(integer? table-id)]
:post [(map? %)]}
(let [{:keys [korma-entity]} (sel :one Table :id table-id)]
(when-let [{:keys [korma-entity]} (sel :one Table :id table-id)]
@korma-entity))
(defn- field-id->kw
......
......@@ -6,8 +6,10 @@
(def column->base-type
"Map of H2 Column types -> Field base types. (Add more mappings here as needed)"
{:BIGINT :BigIntegerField
:DATE :DateField
:DOUBLE :FloatField
:INTEGER :IntegerField
:TIMESTAMP :DateTimeField
:VARCHAR :TextField})
(defmethod driver/sync-tables :h2 [database]
......
......@@ -12,5 +12,6 @@
Would load `metabase.driver.postgres.metadata` for a `Database` whose `:engine` was `:postgres`."
[impl-namespace]
(fn [{:keys [engine]}]
{:pre [engine]}
(require (symbol (str "metabase.driver." engine "." impl-namespace)))
(keyword engine)))
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