Skip to content

Commit

Permalink
closql--table-columns: Allow specifying column prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed Nov 16, 2023
1 parent 909752e commit 7f7363f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion closql.el
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,8 @@

(defun closql--table-columns (db table &optional prefixed)
(mapcar (if prefixed
(lambda (col) (intern (format "%s:%s" table (cadr col))))
(let ((prefix (if (stringp prefixed) prefixed table)))
(lambda (col) (intern (format "%s:%s" prefix (cadr col)))))
#'cadr)
(emacsql db [:pragma (funcall table-info $i1)] table)))

Expand Down

0 comments on commit 7f7363f

Please sign in to comment.