|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
<h1>Fossil DB User-defined Functions</h1>
The Fossil DB schemas can be perused, in the form of
commented SQL, in [http://fossil.wanderinghorse.net/repos/libfossil/doxygen/|the API docs].
A fossil-bound DB handle gets a few extra SQL-callable functions, as
listed below in alphabetical order...
<h3>FSL_CONTENT()</h3>
<tt>FSL_CONTENT(INTEGER|STRING)</tt> returns the undeltified,
uncompressed content for the blob record with the given RID (if
the argument is an integer) or symbolic name (as per
fsl_sym_to_rid()). If the argument does not resolve to an
in-repo blob, a db-level error is triggered. If passed an
integer, no validation is done on its validity, but such
checking can be enforced by instead passing the the RID as
a string in the form "rid:THE_RID".
<h3>FSL_DIRPART()</h3>
<tt><nowiki>FSL_DIRPART(STRING[, BOOL=0])</nowiki></tt> behaves like
fsl_file_dirpart(), returning the result as a string
unless it is empty, in which case the result is an
SQL NULL.
<h3>FSL_SYM2RID()</h3>
<tt>FSL_SYM2RID(STRING)</tt> returns a blob RID for the
given symbol, as per fsl_sym_to_rid(). Triggers an
SQL error if fsl_sym_to_rid() fails.
<h3>FSL_USER()</h3>
Returns the current value of fsl_cx_user_get(), or NULL
if that is not set.
<h3>NOW()</h3>
Returns the current time as an integer, as per time(2).
|