Remove column quoting from sqlite-mode
* lisp/sqlite-mode.el (sqlite-mode--column-names): Unquote column name. (Bug#65998) Copyright-paperwork-exempt: yes
This commit is contained in:
parent
cf7efabe3f
commit
f549d4330f
1 changed files with 1 additions and 16 deletions
|
@ -136,22 +136,7 @@
|
||||||
|
|
||||||
(defun sqlite-mode--column-names (table)
|
(defun sqlite-mode--column-names (table)
|
||||||
"Return a list of the column names for TABLE."
|
"Return a list of the column names for TABLE."
|
||||||
(let ((sql
|
(mapcar (lambda (row) (nth 1 row)) (sqlite-select sqlite--db (format "pragma table_info(%s)" table))))
|
||||||
(caar
|
|
||||||
(sqlite-select
|
|
||||||
sqlite--db
|
|
||||||
"select sql from sqlite_master where tbl_name = ? AND type = 'table'"
|
|
||||||
(list table)))))
|
|
||||||
(with-temp-buffer
|
|
||||||
(insert sql)
|
|
||||||
(mapcar #'string-trim
|
|
||||||
(split-string
|
|
||||||
;; Extract the args to CREATE TABLE. Point is
|
|
||||||
;; currently at its end.
|
|
||||||
(buffer-substring
|
|
||||||
(1- (point)) ; right before )
|
|
||||||
(1+ (progn (backward-sexp) (point)))) ; right after (
|
|
||||||
",")))))
|
|
||||||
|
|
||||||
(defun sqlite-mode-list-data ()
|
(defun sqlite-mode-list-data ()
|
||||||
"List the data from the table under point."
|
"List the data from the table under point."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue