#schema #diesel #model #parser #generator #schema-file #generate

bin+lib diesel_schema_parser

Diesel Schema Parser and Model Generator

4 releases

0.1.3 Jan 23, 2021
0.1.2 Jan 23, 2021
0.1.1 Jan 22, 2021
0.1.0 Jan 22, 2021

#26 in #schema-file

MIT/Apache

15KB
333 lines

Rust Diesel Schema Parser

A tool to parse your Schema files generated by Diesel and Generate Models for you to use.

To run, you need a list of things:

  • Install Diesel
  • Connect it to a database
  • Run both setup and migrate to generate the schema.rs file
  • A template (see examples)
  • A config in the root of your project with the name .db-schema-parser-config.json (see examples)
  • A folder to for your models to be generated in

With all of these things in place, all you have to do is configure and then run the binary!

Dependencies

~3MB
~62K SLoC