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
|`commit_stats(repository_id, [from_commit_hash], to_commit_hash) json`|returns the stats between two commits for a repository. If `from_commit_hash` is empty, it will compare the given `to_commit_hash` with its parent commit. Vendored files stats are not included in the result of this function. This function is more thoroughly explained later in this document.|
9
+
|`blame(repository, commit)`|Returns an array of lines changes and authorship. |
10
10
|`commit_file_stats(repository_id, [from_commit_hash], to_commit_hash) json array`|returns an array with the stats of each file in `to_commit_hash` since the given `from_commit_hash`. If `from_commit_hash` is not given, the parent commit will be used. Vendored files stats are not included in the result of this function. This function is more thoroughly explained later in this document.|
11
-
|`is_tag(reference_name)bool`| checks if the given reference name is a tag. |
12
-
|`is_vendor(file_path)bool`| checks if the given file name is a vendored file. |
13
-
|`language(path, [blob])text`| gets the language of a file given its path and the optional content of the file. |
14
-
|`uast(blob, [lang, [xpath]]) blob`| returns a node array of UAST nodes in semantic mode. |
15
-
|`uast_mode(mode, blob, lang) blob`| returns a node array of UAST nodes specifying its language and mode (semantic, annotated or native). |
16
-
|`uast_xpath(blob, xpath) blob`| performs an XPath query over the given UAST nodes. |
17
-
|`uast_extract(blob, key) text array`| extracts information identified by the given key from the uast nodes. |
18
-
|`uast_children(blob) blob`| returns a flattened array of the children UAST nodes from each one of the UAST nodes in the given array. |
19
-
|`loc(path, blob) json`| returns a JSON map, containing the lines of code of a file, separated in three categories: Code, Blank and Comment lines. |
20
-
|`version() text`| returns the gitbase version in the following format `8.0.11-{GITBASE_VERSION}` for compatibility with MySQL versioning. |
11
+
|`commit_stats(repository_id, [from_commit_hash], to_commit_hash) json`|returns the stats between two commits for a repository. If `from_commit_hash` is empty, it will compare the given `to_commit_hash` with its parent commit. Vendored files stats are not included in the result of this function. This function is more thoroughly explained later in this document.|
21
12
|`is_remote(reference_name)bool`| checks if the given reference name is from a remote one. |
22
-
|`is_tag(reference_name)bool`| check if the given reference name is a tag. |
13
+
|`is_tag(reference_name)bool`| checks if the given reference name is a tag. |
14
+
|`is_vendor(file_path)bool`| checks if the given file name is a vendored file. |
23
15
|`language(path, [blob])text`| gets the language of a file given its path and the optional content of the file. |
16
+
|`loc(path, blob) json`| returns a JSON map, containing the lines of code of a file, separated in three categories: Code, Blank and Comment lines. |
24
17
|`uast(blob, [lang, [xpath]]) blob`| returns a node array of UAST nodes in semantic mode. |
18
+
|`uast_children(blob) blob`| returns a flattened array of the children UAST nodes from each one of the UAST nodes in the given array. |
19
+
|`uast_extract(blob, key) text array`| extracts information identified by the given key from the uast nodes. |
25
20
|`uast_mode(mode, blob, lang) blob`| returns a node array of UAST nodes specifying its language and mode (semantic, annotated or native). |
26
21
|`uast_xpath(blob, xpath) blob`| performs an XPath query over the given UAST nodes. |
27
-
|`uast_extract(blob, key) text array`| extracts information identified by the given key from the uast nodes. |
28
-
|`uast_children(blob) blob`| returns a flattened array of the children UAST nodes from each one of the UAST nodes in the given array. |
29
-
|`loc(path, blob) json`| returns a JSON map, containing the lines of code of a file, separated in three categories: Code, Blank and Comment lines. |
22
+
|`version() text`| returns the gitbase version in the following format `8.0.11-{GITBASE_VERSION}` for compatibility with MySQL versioning. |
30
23
31
24
## Standard functions
32
25
@@ -37,7 +30,6 @@ These are all functions that are available because they are implemented in `go-m
|`ARRAY_LENGTH(json)`|if the json representation is an array, this function returns its size.|
39
32
|`AVG(expr)`| returns the average value of expr in all rows.|
40
-
|`BLAME(repository, commit)`|Returns an array, of lines changes and authorship.|
41
33
|`CEIL(number)`| returns the smallest integer value that is greater than or equal to `number`.|
42
34
|`CEILING(number)`| returns the smallest integer value that is greater than or equal to `number`.|
43
35
|`CHAR_LENGTH(str)`| returns the length of the string in characters.|
@@ -46,10 +38,10 @@ These are all functions that are available because they are implemented in `go-m
46
38
|`CONCAT_WS(sep, ...)`| concatenates any group of fields into a single string. The first argument is the separator for the rest of the arguments. The separator is added between the strings to be concatenated. The separator can be a string, as can the rest of the arguments. If the separator is NULL, the result is NULL.|
47
39
|`CONNECTION_ID()`| returns the current connection ID.|
48
40
|`COUNT(expr)`| returns a count of the number of non-NULL values of expr in the rows retrieved by a SELECT statement.|
41
+
|`DATE(date)`| returns the date part of the given `date`.|
49
42
|`DATE_ADD(date, interval)`| adds the interval to the given `date`.|
50
43
|`DATE_SUB(date, interval)`| subtracts the interval from the given `date`.|
51
44
|`DAY(date)`| is a synonym for DAYOFMONTH().|
52
-
|`DATE(date)`| returns the date part of the given `date`.|
53
45
|`DAYOFMONTH(date)`| returns the day of the month (0-31).|
54
46
|`DAYOFWEEK(date)`| returns the day of the week of the given `date`.|
55
47
|`DAYOFYEAR(date)`| returns the day of the year of the given `date`.|
0 commit comments