Skip to content

Protobuf protoc compiler plugin generating MySQL script useful to create backend database.

License

Apache-2.0, GPL-3.0 licenses found

Licenses found

Apache-2.0
LICENSE
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

gimlee/proto-sql

 
 

Repository files navigation

proto-sql

Protobuf protoc compiler plugin generating MySQL script useful to create backend database.

proto-sql protoc plugin is very simple, so you can use it as an example how to implement your own plugin.

Generated SQL script is intended for MySQL. For others you need make a little changes.

If you get SQL errors "Can not create foreign key..." while execute generated script, it means referred table is not created yet. Just execute SQL script again and again until errors disappears ;(

Build

./configure; make

For more detailed instruction please read INSTALL text file.

Windows

Open proto-sql.vcxproj on VS2013, set include and library path to the protobuf location.

Dependencies

protobuf

protoc

Usage

Example given:

protoc --plugin=protoc-gen-sql="/proto-sql" --proto_path=proto --sql_out=php proto/fil-to-compile.proto

About

Protobuf protoc compiler plugin generating MySQL script useful to create backend database.

Resources

License

Apache-2.0, GPL-3.0 licenses found

Licenses found

Apache-2.0
LICENSE
GPL-3.0
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 55.6%
  • Makefile 36.3%
  • C++ 5.5%
  • C 2.1%
  • M4 0.5%