portal 2024-09-09

I have this function that spits out a table, but the metadata doesn't seem to be helping Portal render it using the table viewer. Why?

(>defn describe-table
  "PostgreSQL specific."
  [env table-name]
  [::env keyword? => any?]
  ^{:portal.viewer/default :portal.viewer/table}
  (execute! env
    (-> (hh/select :column_name :data_type :is_nullable)
        (hh/from :information_schema.columns)
        (hh/where [:= :table-name (csk/->snake_case_string table-name)]))))

I think you want with-meta here

@djblue that does it. Thanks!