    specified. Also, since a row only exists when it contains one value for a column not part of
    the primary key, one such value must be specified too."
   [^Session session & query-params]
-  (execute- session query-params q/insert-query))
+  (cc/execute session
+              (compile-query- q/insert-query query-params)))
 
 (defn insert-async
   "Same as insert but returns a future"
   [^Session session & query-params]
-  (execute-async- session query-params q/insert-query))
-
-(defn ^{:private true} batch-query-from
+  (comment
+    (cc/executeasync- session query-params q/insert-query)))
+
+(defn ^:private batch-query-from-
   [table records]
   (->> records
        (map (comp (partial apply (partial q/insert-query table)) flatten vector))
        (apply q/queries)
-       q/batch-query))
+       ))
 
 (defn insert-batch
   "Performs a batch insert (inserts multiple records into a table at the same time).
   To specify additional clauses for a record (such as where or using), wrap that record
   and the clauses in a vector"
   [^Session session table records]
-  (let [query (batch-query-from table records)]
-    (execute- session query)))
+  (let [query-params (batch-query-from- table records)]
+    (cc/execute session (q/batch-query query-params))))
 
 (defn insert-batch-async
   "Same as insert-batch but returns a future"
   [^Session session table records]
-  (let [query (batch-query-from table records)]
-    (execute-async- session query)))
+  (let [query (batch-query-from- table records)]
+    (comment
+      (cc/executeasync- session query))))
 
 (defn atomic-batch
   "Executes a group of operations as an atomic batch (BEGIN BATCH ... APPLY BATCH)"
   [^Session session & clauses]
-  (let [q (compile-query- clauses q/batch-query)]
-    (execute- session q)))
+  (cc/execute session
+              (compile-query- q/batch-query clauses)))
 
 (defn update
   "Updates one or more columns for a given row in a table. The `where` clause
    is used to select the row to update and must include all columns composing the PRIMARY KEY.
    Other columns values are specified through assignment within the `set` clause."
   [^Session session & query-params]
-  (execute- session query-params q/update-query))
+  (cc/execute session
+              (compile-query- q/update-query query-params)))
 
 (defn update-async
   "Same as update but returns a future"
   [^Session session & query-params]
-  (execute-async- session query-params q/update-query))
+  (comment
+    (cc/executeasync- session query-params q/update-query)))
 
 (defn delete
   "Deletes columns and rows. If the `columns` clause is provided,

   are removed. The `where` allows to specify the key for the row(s) to delete. First argument
   for this function should always be table name."
  [^Session session table & query-params]
  (execute- session (cons table query-params) q/delete-query))

(defn delete-async
  "Same as delete but returns a future"
  [^Session session table & query-params]
  (execute-async- session (cons table query-params) q/delete-query))

(defn select
  "Retrieves one or more columns for one or more rows in a table.
   It returns a result set, where every row is a collection of columns returned by the query."
  [^Session session & query-params]
  (execute- session query-params q/select-query))

(defn select-async
  "Same as select but returns a future"
  [^Session session & query-params]
  (execute-async- session query-params q/select-query))

(defn truncate
  "Truncates a table: permanently and irreversably removes all rows from the table,
   not removing the table itself."
  [^Session session table]
  (execute- session [table] q/truncate-query))

(defn create-user
  [^Session session & query-params]
  (execute- session query-params q/create-user-query))

(defn alter-user
  [^Session session & query-params]
  (execute- session query-params q/alter-user-query))

(defn drop-user
  [^Session session & query-params]
  (execute- session query-params q/drop-user-query))

(defn grant
  [^Session session & query-params]
  (execute- session query-params q/grant-query))

(defn revoke
  [^Session session & query-params]
  (execute- session query-params q/revoke-query))

(defn list-users
  [^Session session & query-params]
  (execute- session query-params q/list-users-query))

(defn list-permissions
  [^Session session & query-params]
  (execute- session query-params q/list-perm-query))

;;
;; Higher level DB functions


(defn ^:private compile-query-
  "Compiles query from given `builder` and `query-params`"
  [builder query-params]
  ;; TODO: mapcat identity here?
  (apply builder (flatten query-params)))

;;
;; Schema operations
