     (if (string-match-p ":" string)
         (replace-regexp-in-string ":" "." string)
       string)))
-
-(defun emacsql-wait (conn &optional timeout)
-  "Block Emacs until CONN has finished sending output."
-  (let ((end (when timeout (+ (float-time) timeout))))
-    (while (and (or (null timeout) (< (float-time) end))
-                (not (emacsql--complete-p conn)))
-      (accept-process-output (emacsql-process conn) timeout))))
 
 (defun emacsql-escape-value (value)
   "Escape VALUE for sending to SQLite."

                                          (line-end-position)))
               (condition (emacsql-get-condition message)))
          (signal condition (list message)))))))

;;; Escaping:


(defun emacsql--check-error (conn)
  "Return non-nil or throw an appropriate error."
  (with-current-buffer (emacsql-buffer conn)
    (emacsql--wait conn)
    (setf (point) (point-min))
    (prog1 t
      (when (looking-at "Error:")
