Login
Changes To DbFunctions
Login

Changes to "DbFunctions" between 2013-09-19 17:01:42 and 2013-09-24 17:18:21

22
23
24
25
26
27
28










29
30
31
32
33
34
35
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45







+
+
+
+
+
+
+
+
+
+







<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.

An example of getting all directory names in the repository (across all
file versions, for simplicity):

<nowiki><pre>
SELECT DISTINCT(fsl_dirpart(name)) n
FROM filename WHERE n IS NOT NULL
ORDER BY n
</pre></nowiki>

To get all the dirs for a specific version one needs to do more work. We'll leave that as an exercise for... me, and once i figure it out i'll post it. It seems that getting that information requires C-level code for the time being.

<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.