Below is the example of transpiling DBML into protobuf.
dbml
Table user {
id integer [pk]
username varchar
role varchar
}
```proto //! Generated by protobuf-dbml 0.1.0-beta.1
syntax = "proto3";
message User { int32 id = 1; string username = 2; string role = 3; }
```
```rust use std::io::Result;
use protobuf_dbml::*;
fn main() -> Result<()> { config("tests/dbml/sample1.dbml", transpiler::Target::Proto3) .setout_path("tests/gen/mod.proto") .transpile() }
```
Licensed under either of
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Always welcome you to participate, contribute and together.