[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/triples 3593f55dfb 16/19: Support numbers stored via em
From: |
ELPA Syncer |
Subject: |
[elpa] externals/triples 3593f55dfb 16/19: Support numbers stored via emacsql. |
Date: |
Sat, 5 Nov 2022 11:58:17 -0400 (EDT) |
branch: externals/triples
commit 3593f55dfbbd750737c98bbcb8d21736a630cf24
Author: Andrew Hyatt <ahyatt@gmail.com>
Commit: Andrew Hyatt <ahyatt@gmail.com>
Support numbers stored via emacsql.
Although the triples columns are all TEXT type, emacsql was able to store
raw
numbers in them, not strings. This makes it possible to retrieve those
numbers.
---
triples.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/triples.el b/triples.el
index ca42b023db..c003db4b86 100644
--- a/triples.el
+++ b/triples.el
@@ -116,10 +116,13 @@ one, because sqlite cannot handle symbols."
This imitates the way emacsql returns items, with strings
becoming either symbols, lists, or strings depending on whether
the string itself is wrapped in quotes."
- (if (and (string-prefix-p "\"" result)
+ (if (and (stringp result)
+ (string-prefix-p "\"" result)
(string-suffix-p "\"" result))
(string-remove-suffix "\"" (string-remove-prefix "\"" result))
- (read result)))
+ (if (numberp result)
+ result
+ (read result))))
(defun triples--insert (db subject predicate object &optional properties)
"Insert triple to DB: SUBJECT, PREDICATE, OBJECT with PROPERTIES.
- [elpa] externals/triples d17b3d6e17 19/19: Merge branch 'combined'., (continued)
- [elpa] externals/triples d17b3d6e17 19/19: Merge branch 'combined'., ELPA Syncer, 2022/11/05
- [elpa] externals/triples 2dae3d49b9 18/19: Various fixes for emacsql code, which wasn't being tested correctly., ELPA Syncer, 2022/11/05
- [elpa] externals/triples 6afcb290ca 15/19: Support both emacs 29 sqlite and emacsql., ELPA Syncer, 2022/11/05
- [elpa] externals/triples aca95ba7f3 03/19: Ensure that we don't duplicate triples., ELPA Syncer, 2022/11/05
- [elpa] externals/triples d82cc1d6b8 14/19: Finish basic sqlite layer, and fix everything so tests work., ELPA Syncer, 2022/11/05
- [elpa] externals/triples 8d7d3c13f4 05/19: Make the combined to and from functions public., ELPA Syncer, 2022/11/05
- [elpa] externals/triples ad6e329540 04/19: Fix for ert tests broken by the last commit., ELPA Syncer, 2022/11/05
- [elpa] externals/triples fdbbd5f61d 09/19: Added package-requires., ELPA Syncer, 2022/11/05
- [elpa] externals/triples cef7ad3a81 11/19: Remove emacs requirement for now., ELPA Syncer, 2022/11/05
- [elpa] externals/triples cca16121d9 13/19: Fix bugs in `triples-remove-type'., ELPA Syncer, 2022/11/05
- [elpa] externals/triples 3593f55dfb 16/19: Support numbers stored via emacsql.,
ELPA Syncer <=