Skip to content

Commit

Permalink
Added links
Browse files Browse the repository at this point in the history
  • Loading branch information
janickr committed Aug 25, 2024
1 parent 5e66732 commit 5d1db82
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ A set of mysql stored functions/procedures to read protobuf binary data
[![PyPi](https://img.shields.io/pypi/v/myprotosql)](https://pypi.org/project/myprotosql/)

## Getting started (with *.proto files)
1) [Download and install](https://github.com/protocolbuffers/protobuf?tab=readme-ov-file#protobuf-compiler-installation) protoc
See [decode using .proto files](#decode-using-proto-files) for an example.
1) [Download and install](https://github.com/protocolbuffers/protobuf?tab=readme-ov-file#protobuf-compiler-installation) protoc
2) Install myprotosql (requires python):
```bash
pip install myprotosql
```
```
3) Run protoc with the myprotosql plugin (your `*.proto` files located in `./proto`, output in `./build`):
```bash
protoc --proto_path=proto --myprotosql_out=build ./proto/*
Expand All @@ -23,7 +24,7 @@ A set of mysql stored functions/procedures to read protobuf binary data
```
## Getting started (without *.proto files)
This is similar to `protoc --decode_raw`.
This is similar to `protoc --decode_raw`. See [decode raw](#decode-raw) for an example.
1) Install myprotosql (requires python):
```bash
Expand All @@ -47,7 +48,7 @@ Running `install_myprotosql.sql` installs two functions that can be used to deco
- myproto_decode_to_textformat(binary_message, message_type, type_descriptors)
- myproto_decode_to_jsonformat(binary_message, message_type, type_descriptors)
### Decode raw
### Decode raw
Decoding without the `*.proto` files
#### Textformat
Expand Down Expand Up @@ -84,7 +85,7 @@ message ParentMessage {
optional SubMessage c = 3;
}
```
Check out "Getting started (with *.proto files)" to compile these `*.proto` files in something MySQL can understand.
Check out [Getting started (with *.proto files)](#getting-started-with-proto-files) to compile these `*.proto` files in something MySQL can understand.
#### Textformat
Expand Down

0 comments on commit 5d1db82

Please sign in to comment.