瀏覽代碼

Get unique tables

Andrew Kane 9 年之前
父節點
當前提交
83425f87b4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/blazer/data_source.rb

+ 1 - 1
lib/blazer/data_source.rb

@@ -113,7 +113,7 @@ module Blazer
 
     def tables
       columns, rows, error, cached_at = run_statement(connection_model.send(:sanitize_sql_array, ["SELECT table_name, column_name, ordinal_position, data_type FROM information_schema.columns WHERE table_schema IN (?)", schemas]))
-      rows.map(&:first)
+      rows.map(&:first).uniq
     end
 
     def postgresql?