Function: emacsql-param

emacsql-param is a byte-compiled function defined in emacsql-compiler.el.

Signature

(emacsql-param THING)

Documentation

Return the index and type of THING, or nil if THING is not a parameter.

A parameter is a symbol that looks like $i1, $s2, $v3, etc. The letter refers to the type: identifier (i), scalar (s), vector (v), raw string (r), schema (S).

Source Code

;; Defined in ~/.emacs.d/elpa/emacsql-20261001.1544/emacsql-compiler.el
(defun emacsql-param (thing)
  "Return the index and type of THING, or nil if THING is not a parameter.
A parameter is a symbol that looks like $i1, $s2, $v3, etc. The
letter refers to the type: identifier (i), scalar (s),
vector (v), raw string (r), schema (S)."
  (and (symbolp thing)
       (let ((name (symbol-name thing)))
         (and (string-match-p "^\\$[isvrS][0-9]+$" name)
              (cons (1- (read (substring name 2)))
                    (cl-ecase (aref name 1)
                      (?i :identifier)
                      (?s :scalar)
                      (?v :vector)
                      (?r :raw)
                      (?S :schema)))))))