0.0
No commit activity in last 3 years
No release in over 3 years
Display your DB (sql) association graph
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
~> 5.0
~> 10.0

Runtime

>= 0
 Project Readme

RomSqlGraph

Rom-rb and hanami tool for generating db (sql) association graph.

For generating image you need to install graphviz tool (http://www.graphviz.org)

Installation

Add this line to your application's Gemfile:

gem 'rom_sql_graph'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rom_sql_graph

Usage

# First: create rom repository object
repo = UserRepository.new

# Second: get ROM container
rom_container = repo.container

# Next: create Rom::Sql::Graph object
graph = RomSqlGraph.generate(rom_container)

# Generate image or html file with your db associations
graph.generate_image
graph.generate_html

# convert graph to any type
graph.to_a
graph.to_s
graph.to_json

Image example

ossboard-graph

TODO:

  • add tests
  • generate html
  • generate json

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rom_sql_graph. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.