Skip to content

Commit

Permalink
docs for v0.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
endremborza committed Apr 27, 2022
1 parent 81fbe01 commit 460f5db
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/api/sqlmermaid.format_col_type.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
format_col_type
===============

.. currentmodule:: sqlmermaid

.. autofunction:: format_col_type
6 changes: 6 additions & 0 deletions docs/api/sqlmermaid.get_mermaid.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
get_mermaid
===========

.. currentmodule:: sqlmermaid

.. autofunction:: get_mermaid
6 changes: 6 additions & 0 deletions docs/api/sqlmermaid.open_in_browser.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
open_in_browser
===============

.. currentmodule:: sqlmermaid

.. autofunction:: open_in_browser
6 changes: 6 additions & 0 deletions docs/api/sqlmermaid.to_file.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
to_file
=======

.. currentmodule:: sqlmermaid

.. autofunction:: to_file
6 changes: 6 additions & 0 deletions docs/api/sqlmermaid.to_mermaid_node.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
to_mermaid_node
===============

.. currentmodule:: sqlmermaid

.. autofunction:: to_mermaid_node
11 changes: 11 additions & 0 deletions docs/notebooks/doc-000-intro.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Installation:
=============

using pip
---------

``pip install sqlmermaid``

.. code:: ipython3
from sqlmermaid import __version__
58 changes: 58 additions & 0 deletions docs/notebooks/doc-001-quickstart.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
.. code:: ipython3
import sqlalchemy as sa
from sqlmermaid import get_mermaid
metadata_obj = sa.MetaData()
.. code:: ipython3
user = sa.Table(
"user",
metadata_obj,
sa.Column("user_id", sa.Integer, primary_key=True),
sa.Column("user_name", sa.String(16), nullable=False),
sa.Column("email_address", sa.String(60)),
sa.Column("nickname", sa.String(50), nullable=False),
)
.. code:: ipython3
departments = sa.Table(
"departments",
metadata_obj,
sa.Column("department_id", sa.Integer, primary_key=True),
sa.Column("department_name", sa.String(60), nullable=False),
)
.. code:: ipython3
employees = sa.Table(
"employees",
metadata_obj,
sa.Column("employee_id", sa.Integer, primary_key=True),
sa.Column("employee_name", sa.String(60), nullable=False),
sa.Column("employee_dept", sa.Integer, sa.ForeignKey("departments.department_id")),
)
.. code:: ipython3
user_complaints = sa.Table(
"complaints",
metadata_obj,
sa.Column("about_dept", sa.Integer, sa.ForeignKey("departments.department_id")),
sa.Column("by_user", sa.Integer, sa.ForeignKey("user.user_id")),
sa.Column("at_time", sa.DateTime),
sa.Column("text", sa.String(500)),
sa.Index("comp_ind", "text"),
)
.. code:: ipython3
constr = "sqlite:///db3.sqlite" # "sqlite:///:memory:"
engine = sa.create_engine(constr)
metadata_obj.create_all(engine)
print(get_mermaid(constr))
4 changes: 4 additions & 0 deletions docs/release_notes/v0.0.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
v0.0.0
------

yay, first release

0 comments on commit 460f5db

Please sign in to comment.