Function: sqlind-syntax-in-update

sqlind-syntax-in-update is a natively compiled function defined in sql-indent.el.

Signature

(sqlind-syntax-in-update POS START)

Documentation

Return the syntax at POS which is inside an "update" statement at START.

Source Code

;; Defined in /nix/store/jxjf2h9nnkdqnn1w1mr0ag8bqng2rlrs-emacs-packages-deps/share/emacs/site-lisp/elpa/sql-indent-1.7/sql-indent.el
(defun sqlind-syntax-in-update (pos start)
  "Return the syntax at POS which is inside an \"update\" statement at START."
  (save-excursion
    (catch 'finished
      (goto-char pos)

      ;; all select query components are indented relative to the start of the
      ;; select statement)
      (when (looking-at sqlind-update-clauses-regexp)
	(throw 'finished (cons 'update-clause start)))

      (while (re-search-backward sqlind-update-clauses-regexp start t)
	(let* ((match-pos (match-beginning 0))
	       (clause (sqlind-match-string 0)))
	  (setq clause (replace-regexp-in-string "[ \t\r\n\f]" " " clause))
	  (when (sqlind-same-level-statement (point) start)
	    (throw 'finished
	      (cons (list 'in-update-clause clause) match-pos))))))))