                     (cl-ecase kind
                       (:identifier (emacsql-escape (nth i args)))
                       (:value (emacsql-escape-value (nth i args))))))))
+
+(defun emacsql (conn sql &optional args)
+  "Send structured SQL expression to CONN with ARGS."
+  (emacsql--clear conn)
+  (emacsql--send conn (apply #'emacsql-format (emacsql-expand sql) args))
+  (emacsql--check-error conn)
+  (emacsql--parse conn))
 
 (defun emacsql-var (var)
   "Return the index number of VAR, or nil if VAR is not a variable.

  (emacsql--check-error conn)
  (emacsql--parse conn))

;; SQL Expansion Functions

(defvar emacsql-expanders ()
  "Alist of all expansion functions.")

              (:value (emacsql-escape-value thing))
              (:identifier (emacsql-escape thing))
              (otherwise thing))))

;; SQL Expansion Functions:

(emacsql-defexpander :select (arg)
  "Expands to the SELECT keyword."
