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
**gitbase**, is a SQL database interface to Git repositories.
4
4
5
-
It can be used to perform SQL queries about the Git history and about the [Universal AST](https://doc.bblf.sh/) of the code itself. gitbase is being built to work on top of any number of git repositories.
5
+
It can be used to perform SQL queries about the Git history and
6
+
about the [Universal AST](https://doc.bblf.sh/) of the code itself. gitbase is being built to work on top of any number of git repositories.
6
7
7
-
gitbase implements the _MySQL_ wire protocol, it can be accessed using any MySQL client or library from any language.
8
+
gitbase implements the *MySQL* wire protocol, it can be accessed using any MySQL
9
+
client or library from any language.
8
10
9
11
[src-d/go-mysql-server](https://github.com/src-d/go-mysql-server) is the SQL engine implementation used by `gitbase`.
10
12
@@ -14,21 +16,20 @@ The project is currently in **alpha** stage, meaning it's still lacking performa
14
16
15
17
## Examples
16
18
17
-
You can see some [query examples](using-gitbase/examples.md) in [gitbase documentation](https://github.com/src-d/gitbase/tree/f68dd7f644c24e3acba490a20c6c735b7770c54b/docs/README.md).
19
+
You can see some [query examples](/docs/using-gitbase/examples.md) in [gitbase documentation](/docs).
18
20
19
21
## Motivation and scope
20
22
21
23
gitbase was born to ease the analysis of git repositories and their source code.
22
24
23
25
Also, making it MySQL compatible, we provide the maximum compatibility between languages and existing tools.
24
26
25
-
It comes as a single self-contained binary and it can be used as a standalone service. The service is able to process local repositories or integrate with existing tools and frameworks \(e.g. Apache Spark\) to make source code analysis on a large scale.
27
+
It comes as a single self-contained binary and it can be used as a standalone service. The service is able to process local repositories or integrate with existing tools and frameworks (e.g. Apache Spark) to make source code analysis on a large scale.
26
28
27
29
## Further reading
28
30
29
-
From here, you can directly go to [getting started](using-gitbase/getting-started.md).
31
+
From here, you can directly go to [getting started](/docs/using-gitbase/getting-started.md).
30
32
31
33
## License
32
34
33
-
Apache License Version 2.0, see [LICENSE](https://github.com/src-d/gitbase/tree/f68dd7f644c24e3acba490a20c6c735b7770c54b/LICENSE/README.md)
34
-
35
+
Apache License Version 2.0, see [LICENSE](LICENSE)
Copy file name to clipboardExpand all lines: docs/join-the-community.md
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,17 @@
2
2
3
3
## Chat
4
4
5
-
If you need support, want to contribute or just want to say hi, join us at the [source{d} community Slack](https://join.slack.com/t/sourced-community/shared_invite/enQtMjc4Njk5MzEyNzM2LTFjNzY4NjEwZGEwMzRiNTM4MzRlMzQ4MmIzZjkwZmZlM2NjODUxZmJjNDI1OTcxNDAyMmZlNmFjODZlNTg0YWM). We hang out in the \#general channel.
5
+
If you need support, want to contribute or just want to say hi, join us at the [source{d} community Slack](https://join.slack.com/t/sourced-community/shared_invite/enQtMjc4Njk5MzEyNzM2LTFjNzY4NjEwZGEwMzRiNTM4MzRlMzQ4MmIzZjkwZmZlM2NjODUxZmJjNDI1OTcxNDAyMmZlNmFjODZlNTg0YWM). We hang out in the #general channel.
*Extracted from https://github.com/jaegertracing/jaeger-client-go/blob/master/README.md*
19
+
20
+
Property| Description
21
+
--- | ---
22
+
JAEGER_SERVICE_NAME | The service name
23
+
JAEGER_AGENT_HOST | The hostname for communicating with agent via UDP
24
+
JAEGER_AGENT_PORT | The port for communicating with agent via UDP
25
+
JAEGER_REPORTER_LOG_SPANS | Whether the reporter should also log the spans
26
+
JAEGER_REPORTER_MAX_QUEUE_SIZE | The reporter's maximum queue size
27
+
JAEGER_REPORTER_FLUSH_INTERVAL | The reporter's flush interval (ms)
28
+
JAEGER_SAMPLER_TYPE | The sampler type
29
+
JAEGER_SAMPLER_PARAM | The sampler parameter (number)
30
+
JAEGER_SAMPLER_MANAGER_HOST_PORT | The host name and port when using the remote controlled sampler
31
+
JAEGER_SAMPLER_MAX_OPERATIONS | The maximum number of operations that the sampler will keep track of
32
+
JAEGER_SAMPLER_REFRESH_INTERVAL | How often the remotely controlled sampler will poll jaeger-agent for the appropriate sampling strategy
33
+
JAEGER_TAGS | A comma separated list of `name = value` tracer level tags, which get added to all reported spans. The value can also refer to an environment variable using the format `${envVarName:default}`, where the `:default` is optional, and identifies a value to be used if the environment variable cannot be found
34
+
JAEGER_DISABLED | Whether the tracer is disabled or not. If true, the default `opentracing.NoopTracer` is used.
35
+
JAEGER_RPC_METRICS | Whether to store RPC metrics
36
+
37
+
## Command line arguments
38
+
39
+
```
40
+
Please specify one command of: server or version
41
+
Usage:
42
+
gitbase [OPTIONS] <server | version>
43
+
44
+
Help Options:
45
+
-h, --help Show this help message
46
+
47
+
Available commands:
48
+
server Starts a gitbase server instance
49
+
version Show the version information
50
+
```
51
+
52
+
`server` command contains the following options:
53
+
54
+
```
55
+
Usage:
56
+
gitbase [OPTIONS] server [server-OPTIONS]
57
+
58
+
Starts a gitbase server instance
59
+
60
+
By default when gitbase encounters an error in a repository it
61
+
stops the query. With GITBASE_SKIP_GIT_ERRORS variable it won't
62
+
complain and just skip those rows or repositories.
63
+
64
+
Help Options:
65
+
-h, --help Show this help message
66
+
67
+
[server command options]
68
+
-d, --directories= Path where the git repositories are located (standard and siva), multiple directories can be defined. Accepts globs.
69
+
--depth= load repositories looking at less than <depth> nested subdirectories. (default: 1000)
70
+
--host= Host where the server is going to listen (default: localhost)
71
+
-p, --port= Port where the server is going to listen (default: 3306)
72
+
-u, --user= User name used for connection (default: root)
73
+
-P, --password= Password used for connection
74
+
--pilosa= URL to your pilosa server (default: http://localhost:10101) [$PILOSA_ENDPOINT]
75
+
-i, --index= Directory where the gitbase indexes information will be persisted. (default: /var/lib/gitbase/index) [$GITBASE_INDEX_DIR]
76
+
--no-squash Disables the table squashing.
77
+
--trace Enables jaeger tracing [$GITBASE_TRACE]
78
+
-r, --readonly Only allow read queries. This disables creating and deleting indexes as well. [$GITBASE_READONLY]
79
+
--no-git disable the load of git standard repositories.
OR blob_content REGEXP '(?i)twitter.*[\'\\"][0-9a-zA-Z]{35,44}[\'\\"]'
97
95
OR blob_content REGEXP '(?i)github.*[\'\\"][0-9a-zA-Z]{35,40}[\'\\"]'
@@ -105,7 +103,7 @@ WHERE
105
103
);
106
104
```
107
105
108
-
###Create an index for columns on a table
106
+
## Create an index for columns on a table
109
107
110
108
You can create an index either on a specific column or on several columns:
111
109
@@ -115,27 +113,27 @@ CREATE INDEX commits_hash_idx ON commits USING pilosa (commit_hash);
115
113
CREATEINDEXfiles_commit_path_blob_idxON commit_files USING pilosa (commit_hash, file_path, blob_hash);
116
114
```
117
115
118
-
###Create an index for an expression on a table
116
+
## Create an index for an expression on a table
119
117
120
118
Note that just one expression at a time is allowed to be indexed.
121
119
122
120
```sql
123
121
CREATEINDEXfiles_lang_idxON files USING pilosa (language(file_path, blob_content));
124
122
```
125
123
126
-
###Drop a table's index
124
+
## Drop a table's index
127
125
128
126
```sql
129
127
DROPINDEX files_lang_idx ON files;
130
128
```
131
129
132
-
##UAST UDFs Examples
130
+
# UAST UDFs Examples
133
131
134
132
First of all, you should check out the [bblfsh documentation](https://docs.sourced.tech/babelfish) to get yourself familiar with UAST concepts.
135
133
136
-
Also, you can take a look to all the UDFs and their signatures in the [functions section](functions.md)
134
+
Also, you can take a look to all the UDFs and their signatures in the [functions section](/docs/using-gitbase/functions.md)
137
135
138
-
###Retrieving UASTs with the UDF `uast`
136
+
## Retrieving UASTs with the UDF `uast`
139
137
140
138
```sql
141
139
SELECT file_path, uast(blob_content, language(file_path)) FROM files;
@@ -147,9 +145,9 @@ This function allows you to directly filter the retrieved UAST by performing a X
147
145
SELECT file_path, uast(blob_content, language(file_path), "//FuncLit") FROM files;
148
146
```
149
147
150
-
This UDF will give you `semantic` UASTs by default. To get some other type see the UDF [`uast_mode`](examples.md#retrieving-different-kinds-of-uasts-using-uast_mode).
148
+
This UDF will give you `semantic` UASTs by default. To get some other type see the UDF [`uast_mode`](#retrieving-different-kinds-of-uasts-using-uast_mode).
151
149
152
-
###Retrieving different kinds of UASTs using `uast_mode`
150
+
## Retrieving different kinds of UASTs using `uast_mode`
0 commit comments