Function: sqlind-indent-select-table
sqlind-indent-select-table is a natively compiled function defined in
sql-indent.el.
Signature
(sqlind-indent-select-table SYNTAX BASE-INDENTATION)
Documentation
Return the indentation for a table in the FROM section.
SYNTAX is the syntax of the current line, BASE-INDENTATION is the current indentation, which we need to update.
We try to align to the first table, but if we are the first
table, we simply add sqlind-basic-offset.
Source Code
;; Defined in /nix/store/jxjf2h9nnkdqnn1w1mr0ag8bqng2rlrs-emacs-packages-deps/share/emacs/site-lisp/elpa/sql-indent-1.7/sql-indent.el
(defun sqlind-indent-select-table (syntax base-indentation)
"Return the indentation for a table in the FROM section.
SYNTAX is the syntax of the current line, BASE-INDENTATION is the
current indentation, which we need to update.
We try to align to the first table, but if we are the first
table, we simply add `sqlind-basic-offset'."
(save-excursion
(goto-char (sqlind-anchor-point syntax))
(when (looking-at "from")
(goto-char (match-end 0)))
(skip-syntax-forward " ")
(if (or (looking-at sqlind-comment-start-skip)
(eolp))
(+ base-indentation sqlind-basic-offset)
(current-column))))