Skip to content

Commit 3e038db

Browse files
authored
Merge branch 'master' into quasilyte/switchTrue
2 parents 636327d + 568a476 commit 3e038db

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ jobs:
3838

3939
before_deploy:
4040
- make packages
41-
- DOCKER_PUSH_LATEST=1 make docker-push
41+
- export DOCKER_PUSH_LATEST=$(echo ${TRAVIS_BRANCH} | grep -E '^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$') || true
42+
- make docker-push
4243
- make static-package
4344

4445
deploy:

docs/using-gitbase/functions.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,21 @@ To make some common tasks easier for the user, there are some functions to inter
1515
|uast_extract(blob, key)| extracts information identified by the given key from the uast nodes |
1616
|uast_children(blob)| returns a flattened array of the children UAST nodes from each one of the UAST nodes in the given sequence |
1717

18+
19+
## Note about uast and uast_mode functions
20+
21+
The data returned by these functions are a list of UAST nodes serialized as explained below.
22+
23+
Each node is serialized sequentially using [protobuf](https://developers.google.com/protocol-buffers/) and prefixed by an Int32 (in big endian byte order) specifying the length of the serialized node. The [bblfsh/sdk](https://github.com/bblfsh/sdk) contains the proto files and the tools to do it.
24+
25+
It results in a byte stream following this structure:
26+
```
27+
BigEndianInt32(len(marhsal(node))+marshal(node)+
28+
BigEndianInt32(len(marhsal(node))+marshal(node)+
29+
BigEndianInt32(len(marhsal(node))+marshal(node)+
30+
...
31+
```
32+
1833
## Standard functions
1934

2035
You can check standard functions in [`go-mysql-server` documentation](https://github.com/src-d/go-mysql-server/tree/1fa8e98aab8f06ae1569c4d381ccc9d3051f761a#custom-functions).

0 commit comments

Comments
 (0)