   Object
   (-val [v] (DSL/val v)))
 
-(extend-protocol ITableCoerce
-  org.jooq.Name
-  (-as-table [^org.jooq.Name n args]
-    (.as n ^String (first args)))
-
-  org.jooq.DerivedColumnList
-  (-as-table [n args]
-    (.as n (first args)))
-
-  org.jooq.TableLike
-  (-as-table [n args]
-    (let [^String alias (first args)]
-      (->> (into-array String (rest args))
-           (.asTable n alias))))
-
-  suricatta.types.Deferred
-  (-as-table [t args]
-    (-as-table @t args)))
-
 (extend-protocol IDeferred
   Object
   (-unwrap [self]


(extend-protocol ITable
  java.lang.String
  (-table [s] (DSL/table s))

  clojure.lang.IPersistentVector
  (-table [pv]
    (let [[tname talias] pv]
      (-> (-table tname)
          (.as talias))))

  clojure.lang.Keyword
  (-table [kw] (-table (clojure.core/name kw)))

  org.jooq.Table
  (-table [t] t)

           org.jooq.SelectJoinStep
           org.jooq.InsertReturningStep
           org.jooq.Row
           org.jooq.TableLike
           org.jooq.FieldLike
           org.jooq.Field
           org.jooq.Select
           org.jooq.impl.DSL
           org.jooq.impl.DefaultConfiguration
           org.jooq.impl.DefaultDataType
