You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/latex/sections/addqueryfuncs.tex
+62-57Lines changed: 62 additions & 57 deletions
Original file line number
Diff line number
Diff line change
@@ -66,62 +66,69 @@ \subsection{User Defined Functions}
66
66
67
67
\subsubsection{Functions available in \gufiquery and \gufisqlite}
68
68
69
-
\begin{table}[H]
70
-
\centering
71
-
\caption{General Utility Functions}
72
-
\begin{tabularx}{\textwidth}{| l | X |}
73
-
\hline
74
-
Function & Description \\
75
-
\hline
76
-
\texttt{uidtouser(uid)} & Converts a UID to a user name \\
77
-
\hline
78
-
\texttt{gidtogroup(gid)} & Converts a GID to a group name \\
79
-
\hline
80
-
\texttt{modetotxt(mode)} & Converts numerical permission bits to text \\
81
-
\hline
82
-
\texttt{strftime(format, timestamp)} & Replaces \href{https://www.sqlite.org/lang_datefunc.html}{SQLite~3's custom \texttt{strftime}} with \texttt{strftime(3)} \\
83
-
\hline
84
-
\texttt{blocksize(bytes, unit)} & Converts a size to a the number of blocks of size \texttt{unit} needed to store the first argument. \texttt{unit} is the combination of at least one integer and/or a prefix and a suffix: \\
& Note that this function was implemented to replicate \texttt{ls} output and is meant for use with \gufils only, so use with caution. \\
92
-
& \\
93
-
& Examples: \\
94
-
& \begin{tabular}{| l | l |}
95
-
\hline
96
-
Call & Output \\
97
-
\hline
98
-
blocksize(1024, `1000') & 2 \\
99
-
\hline
100
-
blocksize(1024, `1024') & 1 \\
101
-
\hline
102
-
blocksize(1024, `K') & 1K \\
103
-
\hline
104
-
blocksize(1024, `1K') & 1 \\
105
-
\hline
106
-
blocksize(1024, `KB') & 2KB \\
107
-
\hline
108
-
blocksize(1024, `1KB') & 2 \\
109
-
\hline
110
-
blocksize(1024, `KiB') & 1KiB \\
111
-
\hline
112
-
blocksize(1024, `1KiB') & 1 \\
113
-
\hline
114
-
\end{tabular} \\
69
+
\begin{longtable}{|l|p{0.5\linewidth}|}
70
+
\caption{General Utility Functions} \\
71
+
\hline
72
+
Function & Description \\
73
+
\hline
74
+
\texttt{uidtouser(uid)} & Converts a UID to a user name \\
75
+
\hline
76
+
\texttt{gidtogroup(gid)} & Converts a GID to a group name \\
77
+
\hline
78
+
\texttt{modetotxt(mode)} & Converts numerical permission bits to text \\
79
+
\hline
80
+
\texttt{strftime(format, timestamp)} & Replaces \href{https://www.sqlite.org/lang_datefunc.html}{SQLite~3's custom \texttt{strftime}} with \texttt{strftime(3)} \\
81
+
\hline
82
+
\texttt{intcat(int)} & Uses any integer. It provides the category that integer is in from Zero, O for less than 1000, K for less than 1 million, M less than billion, B for less than Trillion, T for less than quadrillion, q for less than quintillion, Q for more than Quintillion. (using 1000) \\
83
+
\hline
84
+
\texttt{bytecat(int)} & Uses any integer. Provides category from Zero, B for less than 1k, K for less than 1M, M for less than 1G, G for less than 1T, T for less than one P, P for less than 1E, E for more than 1E. (using 1024) \\
85
+
\hline
86
+
\texttt{agecat(time)} & Uses any unix epoch like mtime as input. It subtracts that from current time and categorizes into S seconds, M minutes, H hours, d days, W weeks, M months, Y years, D decades as categories. (for use in group by) \\
87
+
\hline
88
+
\texttt{epochtoage(time, unit)} & Provides age from now from unix epoch time fields like mtime, ctime, atime, crtime. Unit s (seconds), m (minutes), h (hours), d (days), w (weeks), M (months), y (years), D (decades). (for use in group by) \\
89
+
\hline
90
+
\texttt{hostname()} & Provides the hostname \gufiquery is running on (Helpful for multi-site record source) \\
91
+
\hline
92
+
\texttt{blocksize(bytes, unit)} & Converts a size to a the number of blocks of size \texttt{unit} needed to store the first argument. \texttt{unit} is the combination of at least one integer and/or a prefix and a suffix: \\
0 commit comments