update packages
This commit is contained in:
@@ -81,7 +81,7 @@
|
||||
|
||||
(defun emacsql-quote-identifier (string)
|
||||
"Double-quote (identifier) STRING for use in a SQL expression."
|
||||
(format "\"%s\"" (replace-regexp-in-string "\"" "\"\"" string)))
|
||||
(format "\"%s\"" (string-replace "\"" "\"\"" string)))
|
||||
|
||||
(defun emacsql-escape-identifier (identifier)
|
||||
"Escape an identifier, if needed, for SQL."
|
||||
@@ -99,7 +99,7 @@
|
||||
(if (string-match-p ":" name)
|
||||
(mapconcat #'emacsql-escape-identifier
|
||||
(mapcar #'intern (split-string name ":")) ".")
|
||||
(let ((print (replace-regexp-in-string "-" "_" (format "%S" identifier)))
|
||||
(let ((print (string-replace "-" "_" (format "%S" identifier)))
|
||||
(special "[]-\000-\040!\"#%&'()*+,./:;<=>?@[\\^`{|}~\177]"))
|
||||
(if (or (string-match-p special print)
|
||||
(string-match-p "^[0-9$]" print)
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
(defun emacsql-escape-format (thing)
|
||||
"Escape THING for use as a `format' spec."
|
||||
(replace-regexp-in-string "%" "%%" thing))
|
||||
(string-replace "%" "%%" thing))
|
||||
|
||||
;;; Schema compiler
|
||||
|
||||
@@ -146,8 +146,7 @@
|
||||
|
||||
(defun emacsql--from-keyword (keyword)
|
||||
"Convert KEYWORD into SQL."
|
||||
(let ((name (substring (symbol-name keyword) 1)))
|
||||
(upcase (replace-regexp-in-string "-" " " name))))
|
||||
(upcase (string-replace "-" " " (substring (symbol-name keyword) 1))))
|
||||
|
||||
(defun emacsql--prepare-constraints (constraints)
|
||||
"Compile CONSTRAINTS into a partial SQL expression."
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
;;; Commentary:
|
||||
|
||||
;; This library provides an EmacSQL back-end for PostgreSQL, which
|
||||
;; uses the `pg' package to directly speak to the database. This
|
||||
;; library requires at least Emacs 28.1.
|
||||
;; uses the `pg' package to directly speak to the database.
|
||||
|
||||
;; (For an alternative back-end for PostgreSQL, see `emacsql-psql'.)
|
||||
|
||||
@@ -19,14 +18,10 @@
|
||||
|
||||
(require 'emacsql)
|
||||
|
||||
(if (>= emacs-major-version 28)
|
||||
(require 'pg nil t)
|
||||
(message "emacsql-pg.el requires Emacs 28.1 or later"))
|
||||
(declare-function pg-connect "ext:pg"
|
||||
( dbname user &optional
|
||||
(password "") (host "localhost") (port 5432) (tls nil)))
|
||||
(require 'pg nil t)
|
||||
(declare-function pg-connect-plist "ext:pg")
|
||||
(declare-function pg-disconnect "ext:pg" (con))
|
||||
(declare-function pg-exec "ext:pg" (connection &rest args))
|
||||
(declare-function pg-exec "ext:pg" (con &rest args))
|
||||
(declare-function pg-result "ext:pg" (result what &rest arg))
|
||||
|
||||
(defclass emacsql-pg-connection (emacsql-connection)
|
||||
@@ -41,11 +36,14 @@
|
||||
(nil "TEXT"))))
|
||||
"A connection to a PostgreSQL database via pg.el.")
|
||||
|
||||
(cl-defun emacsql-pg (dbname user &key
|
||||
(host "localhost") (password "") (port 5432) debug)
|
||||
(cl-defun emacsql-pg ( dbname user &key
|
||||
(host "localhost") (password nil) (port 5432) debug)
|
||||
"Connect to a PostgreSQL server using pg.el."
|
||||
(require 'pg)
|
||||
(let* ((pgcon (pg-connect dbname user password host port))
|
||||
(let* ((pgcon (pg-connect-plist dbname user
|
||||
:password password
|
||||
:host host
|
||||
:port port))
|
||||
(connection (make-instance 'emacsql-pg-connection
|
||||
:handle (and (fboundp 'pgcon-process)
|
||||
(pgcon-process pgcon))
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
;; -*- no-byte-compile: t; lexical-binding: nil -*-
|
||||
(define-package "emacsql" "20260401.1220"
|
||||
(define-package "emacsql" "20260601.1722"
|
||||
"High-level SQL database front-end."
|
||||
'((emacs "26.1"))
|
||||
'((emacs "28.1"))
|
||||
:url "https://github.com/magit/emacsql"
|
||||
:commit "2fe6d4562b32a170a750d5e80514fbb6b6694803"
|
||||
:revdesc "2fe6d4562b32"
|
||||
:commit "d811bbefcb5e27841af55cae53aa939ba720de77"
|
||||
:revdesc "d811bbefcb5e"
|
||||
:authors '(("Christopher Wellons" . "wellons@nullprogram.com"))
|
||||
:maintainers '(("Jonas Bernoulli" . "emacs.emacsql@jonas.bernoulli.dev")))
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
;; Maintainer: Jonas Bernoulli <emacs.emacsql@jonas.bernoulli.dev>
|
||||
;; Homepage: https://github.com/magit/emacsql
|
||||
|
||||
;; Package-Version: 20260401.1220
|
||||
;; Package-Revision: 2fe6d4562b32
|
||||
;; Package-Requires: ((emacs "26.1"))
|
||||
;; Package-Version: 20260601.1722
|
||||
;; Package-Revision: d811bbefcb5e
|
||||
;; Package-Requires: ((emacs "28.1"))
|
||||
|
||||
;; SPDX-License-Identifier: Unlicense
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"The EmacSQL SQL database front-end."
|
||||
:group 'comm)
|
||||
|
||||
(defconst emacsql-version "4.3.6")
|
||||
(defconst emacsql-version "4.4.1")
|
||||
|
||||
(defvar emacsql-global-timeout 30
|
||||
"Maximum number of seconds to wait before bailing out on a SQL command.
|
||||
|
||||
Reference in New Issue
Block a user