 
 (defn ^:private column-metadata-query
   [keyspace table]
-  (if (< cassandra-version 3)
-    (h/select :system.schema_columns
-              (h/where {:keyspace_name keyspace
-                        :columnfamily_name table}))
-    (h/select :system_schema.columns
-              (h/where {:keyspace_name keyspace
-                        :table_name table}))))
+  (h/select :system_schema.columns
+            (h/where {:keyspace_name keyspace
+                      :table_name table})))
 
 (defn column-metadata
   "returns a Deferred with metadata for the requested table (or nil)"

  (:import
   [er_cassandra.session Session]))

;; HACK ALERT
(def cassandra-version (or (some-> (env :cassandra-version) Integer/parseInt)
                           3))

(defn ^:private table-metadata-query
  [keyspace table]
  (if (< cassandra-version 3)
    (h/select :system.schema_columnfamilies
              (h/where {:keyspace_name keyspace
                        :columnfamily_name table}))
    (h/select :system_schema.tables
              (h/where {:keyspace_name keyspace
                        :table_name table}))))

(defn table-metadata
  "returns a Deferred with metadata for the requested table (or nil)"

                             {})
            first)))

(defn ^:private table-columns-query
  [keyspace table]
  (h/select :system_schema.columns
            (h/where {:keyspace_name keyspace
                      :table_name table})))

(defn table-columns
  ([^Session session table]
   (table-columns session (session/keyspace session) table))
  ([^Session session keyspace table]
   (session/execute session
                    (table-columns-query
                     (name keyspace)
                     (name table))
                    {})))

(defn ^:private usertype-metadata-query
  [keyspace type]
  (h/select :system_schema.types
            (h/where {:keyspace_name keyspace
                      :type_name type})))

(defn usertype-metadata
  ([^Session session type]
