Coverage report: /development/source/library/com/dydra/gitlab/dydra-cgi/ffi/lisp/rdfcache/quad.lisp
| Kind | Covered | All | % |
| expression | 0 | 33 | 0.0 |
| branch | 0 | 2 | 0.0 |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
3
;;; Quad API: Accessors
5
(defmacro quad-slot-value (quad-var slot-name)
6
`(foreign-slot-value ,quad-var 'quad ,slot-name))
10
(defun make-quad (&optional context subject predicate object)
11
"Returns a foreign pointer to a newly-allocated quad."
12
(let ((quad (%make-quad (or subject (null-pointer))
13
(or predicate (null-pointer))
14
(or object (null-pointer))
15
(or context (null-pointer)))))
18
;;; Quad API: Term accessors
20
(defun quad-term-p (quad term-name)
21
"Returns `T` if the given `quad` has the term value designated by
22
`term-name`, `NIL` otherwise."
23
(not (null-pointer-p (quad-term-pointer quad term-name))))
25
(defun quad-term-pointer (quad term-name)
26
(with-checked-pointer (quad)
27
(quad-slot-value quad term-name)))
29
(defun quad-term-type (quad term-name)
30
(term-type (quad-term-pointer quad term-name)))
32
(defun quad-term-value (quad term-name)
33
(term-value (quad-term-pointer quad term-name)))