diff options
| author | Rolf Ade | 2017-02-05 19:46:24 +0100 |
|---|---|---|
| committer | Noam Postavsky | 2017-03-02 19:01:18 -0500 |
| commit | 71871670c816f2ecc4383ef0fe516cbd9c9f781f (patch) | |
| tree | c0f575fa85896bc783ee7eb18e5f2b60dffef2bf | |
| parent | c733d9169ce44f5600d41cf0e67e021371954c8e (diff) | |
| download | emacs-71871670c816f2ecc4383ef0fe516cbd9c9f781f.tar.gz emacs-71871670c816f2ecc4383ef0fe516cbd9c9f781f.zip | |
sql-mode w/ sqlite: In-memory database
Enable the usage of an in-memory database. Prior to this, sql-mode w/
sqlite could only be used with file databases.
* list/progmodes/sql.el (sql-get-login-ext): Don't expand an empty
file name provided by the user, but call sub-process sqlite with that,
in which case it uses an in-memory database.
Copyright-paperwork-exempt: yes
| -rw-r--r-- | lisp/progmodes/sql.el | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 88683431290..634c6b57bdc 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el | |||
| @@ -2952,17 +2952,20 @@ value. (The property value is used as the PREDICATE argument to | |||
| 2952 | (use-dialog-box nil)) | 2952 | (use-dialog-box nil)) |
| 2953 | (cond | 2953 | (cond |
| 2954 | ((plist-member plist :file) | 2954 | ((plist-member plist :file) |
| 2955 | (expand-file-name | 2955 | (let ((file-name |
| 2956 | (read-file-name prompt | 2956 | (read-file-name prompt |
| 2957 | (file-name-directory last-value) default 'confirm | 2957 | (file-name-directory last-value) default 'confirm |
| 2958 | (file-name-nondirectory last-value) | 2958 | (file-name-nondirectory last-value) |
| 2959 | (when (plist-get plist :file) | 2959 | (when (plist-get plist :file) |
| 2960 | `(lambda (f) | 2960 | `(lambda (f) |
| 2961 | (if (not (file-regular-p f)) | 2961 | (if (not (file-regular-p f)) |
| 2962 | t | 2962 | t |
| 2963 | (string-match | 2963 | (string-match |
| 2964 | (concat "\\<" ,(plist-get plist :file) "\\>") | 2964 | (concat "\\<" ,(plist-get plist :file) "\\>") |
| 2965 | (file-name-nondirectory f)))))))) | 2965 | (file-name-nondirectory f)))))))) |
| 2966 | (if (string= file-name "") | ||
| 2967 | "" | ||
| 2968 | (expand-file-name file-name)))) | ||
| 2966 | 2969 | ||
| 2967 | ((plist-member plist :completion) | 2970 | ((plist-member plist :completion) |
| 2968 | (completing-read prompt-def (plist-get plist :completion) nil t | 2971 | (completing-read prompt-def (plist-get plist :completion) nil t |