[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/triples 8d7d3c13f4 05/19: Make the combined to and from
From: |
ELPA Syncer |
Subject: |
[elpa] externals/triples 8d7d3c13f4 05/19: Make the combined to and from functions public. |
Date: |
Sat, 5 Nov 2022 11:58:16 -0400 (EDT) |
branch: externals/triples
commit 8d7d3c13f4bd4c3cb3335ba8be8c17f030926eb2
Author: Andrew Hyatt <ahyatt@gmail.com>
Commit: Andrew Hyatt <ahyatt@gmail.com>
Make the combined to and from functions public.
---
triples.el | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/triples.el b/triples.el
index a26c29a874..149d13cd63 100644
--- a/triples.el
+++ b/triples.el
@@ -96,7 +96,7 @@ values."
:and (like predicate $r2)]
(car sub-triples) (format "%s/%%" type))))
(seq-uniq
- (mapcar #'car (mapcar
#'triples--combined-to-type-and-prop
+ (mapcar #'car (mapcar #'triples-combined-to-type-and-prop
(mapcar #'cl-second (cdr
sub-triples)))))))
(triples--group-by-subjects (cdr op)))))
(mapc (lambda (triple)
@@ -120,7 +120,7 @@ values."
(defun triples-verify-schema-compliant (db triples)
"Error if TRIPLES is not compliant with schema in DB."
(mapc (lambda (triple)
- (pcase-let ((`(,type . ,prop) (triples--combined-to-type-and-prop
(nth 1 triple))))
+ (pcase-let ((`(,type . ,prop) (triples-combined-to-type-and-prop
(nth 1 triple))))
(unless (or (eq type 'base)
(emacsql db [:select * :from triples :where (= subject
$s1)
:and (= predicate 'schema/property) :and
(= object $s2)]
@@ -179,10 +179,10 @@ PROPERTIES is a plist of properties, without TYPE
prefixes."
(cl-loop for e in v for i from 0
collect
(list subject
- (triples--type-and-prop-to-combined type
prop)
+ (triples-type-and-prop-to-combined type
prop)
e
(list :index i)))
- (list (list subject (triples--type-and-prop-to-combined
type prop) v))))
+ (list (list subject (triples-type-and-prop-to-combined type
prop) v))))
properties))))
(defun triples-get-type (db subject type)
@@ -197,7 +197,7 @@ PROPERTIES is a plist of properties, without TYPE prefixes."
:and (like predicate $r2)] subject (format "%s/%%"
type)))
(append
(cl-loop for k being the hash-keys of preds using (hash-values v)
- nconc (list (triples--encolon (cdr
(triples--combined-to-type-and-prop k)))
+ nconc (list (triples--encolon (cdr
(triples-combined-to-type-and-prop k)))
(if (and (car v)
(plist-get (cdar v) :index))
(mapcar #'car (sort v (lambda (a b)
@@ -208,7 +208,7 @@ PROPERTIES is a plist of properties, without TYPE prefixes."
nconc
(let ((reversed-prop (plist-get
(triples-properties-for-predicate
- db (triples--type-and-prop-to-combined
type pred))
+ db (triples-type-and-prop-to-combined
type pred))
:base/virtual-reversed)))
(when reversed-prop
(let ((result (emacsql db [:select subject :from triples
:where (= object $s1)
@@ -271,13 +271,13 @@ TYPE-VALS-CONS is a list of conses, combining a type and
a plist of values."
"Return a list of all subjects with a particular TYPE in DB."
(mapcar #'car (triples-subjects-with-predicate-object db 'base/type type)))
-(defun triples--combined-to-type-and-prop (combined)
+(defun triples-combined-to-type-and-prop (combined)
"Return cons of type and prop that form the COMBINED normal representation.
This is something of form `:type/prop'."
(let ((s (split-string (format "%s" combined) "/")))
(cons (triples--decolon (nth 0 s)) (intern (nth 1 s)))))
-(defun triples--type-and-prop-to-combined (type prop)
+(defun triples-type-and-prop-to-combined (type prop)
(intern (format "%s/%s" (triples--decolon type) (triples--decolon prop))))
(defun triples--plist-mapc (fn plist)
- [elpa] externals/triples cc5629fe5c 07/19: Wrap all database access in `triples-set-types' in a transaction., (continued)
- [elpa] externals/triples cc5629fe5c 07/19: Wrap all database access in `triples-set-types' in a transaction., ELPA Syncer, 2022/11/05
- [elpa] externals/triples 257de87fdc 08/19: Minor code cleanup., ELPA Syncer, 2022/11/05
- [elpa] externals/triples 4627d6ed6d 10/19: Fix minor mistakes in ert tests., ELPA Syncer, 2022/11/05
- [elpa] externals/triples fb63dfe44a 12/19: Convert to sqlite., ELPA Syncer, 2022/11/05
- [elpa] externals/triples 0252dad7d1 17/19: Fixes from code review from Stefan Monnier., ELPA Syncer, 2022/11/05
- [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 <=
- [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, 2022/11/05