Coverage report: /development/source/library/org/datagraph/spocq-shard/src/core/libraries/dydra-ndk.lisp
| Kind | Covered | All | % |
| expression | 18 | 37 | 48.6 |
| branch | 0 | 0 | nil |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
;;; -*- Mode: lisp; Syntax: ansi-common-lisp; Base: 10; Package: cl-user; -*-
3
(in-package :org.datagraph.spocq.implementation)
6
;; lgrep dydra-ndk: | sed -e 's/.*\(dydra-ndk:*\)\([a-zA-Z0-9-]\+\).*/:\2/I' | sort | uniq
9
;; in case this is the only definition
11
(:export :count-matched-quads
14
:foreign-function-error
26
:quad-cursor-object-id
27
:quad-cursor-predicate-id
29
:quad-cursor-subject-id
30
:record-query-accounting
33
:statement-predicate-id
40
:term-matrix-column-count
42
:term-matrix-row-count
43
:term-value-as-boolean
54
:term-value-as-unix-time
57
(in-package :dydra-ndk)
59
(defcfun ("dydra_term_compare" %%term-compare) :int (term1-id :int64) (term2-id :int64))
61
(defun term-compare (term1-id term2-id)
62
"Compares the two RDF terms denoted by TERM1-ID and TERM2-ID.
63
Returns -1, 0, 1, or NIL (if the terms are incommensurable).
64
Signals an error if either of the term identifiers is invalid."
65
(declare (type fixnum term1-id term2-id))
66
(let ((result (%%term-compare term1-id term2-id)))
71
(defun term-lessp (term1-id term2-id)
72
(let ((order (term-compare term1-id term2-id)))
73
(when order (= (the fixnum order) -1))))
75
(defcfun ("dydra_string_collate" %%string-collate) :int (string1 :string) (string2 :string) (language :string))
76
(defcfun ("dydra_string_compare" %%string-compare) :int (string1 :string) (string2 :string))
78
(defun string-collate (string1 string2 language)
79
(declare (type string string1 string2 language))
80
(let ((result (%%string-collate string1 string2 language)))
81
(case result ((-1 0 1) result) (t nil))))
83
(defun string-compare (string1 string2)
84
(declare (type string string1 string2))
85
(let ((result (%%string-compare string1 string2)))
86
(case result ((-1 0 1) result) (t nil))))
89
(macrolet ((defstub (name args) `(defun ,name ,args (declare (ignore ,@args)))))
90
(defstub DYDRA-NDK:DECODE-TIME (time &optional zone))
91
(defstub DYDRA-NDK:encode-TIME (second minute hour day month year &optional zone))
92
(defstub DYDRA-NDK:RECORD-QUERY-ACCOUNTING (id url start-time notes))
93
(defstub DYDRA-NDK:REPORT-QUERY-ERROR (task-id condition-type &key string))
94
(defstub DYDRA-NDK:STATEMENT-OBJECT-ID (s))
95
(defstub DYDRA-NDK:STATEMENT-PREDICATE-ID (s))
96
(defstub DYDRA-NDK:STATEMENT-SUBJECT-ID (s))
97
(defstub DYDRA-NDK:STATEMENT-URN-STRING (s p o))
98
(defstub DYDRA-NDK:TERM-DATATYPE-ID (%term))
99
(defstub DYDRA-NDK:TERM-value-as-unix-time (number))
100
(defparameter DYDRA-NDK::*BUILD-REVISION* "")