Skip to content

Working with SQLDocs

Frank Stüber edited this page Jul 31, 2023 · 2 revisions

Create a new database schama file

To create a new database schema JSON file for a PostgreSQL database, type something like this:

sqldocs build-json 
  -l en 
  -db postgres 
  -c "Server=localhost;Port=5432;Database=mydatabase;User ID=postgres;Password=qwertz;" 
  -s "c:\my-mkdocs-project\dbschema.json"

To create a new database schema JSON file for a Firebird database, type something like this:

sqldocs build-json 
  -l en 
  -db firebird 
  -c "Host=localhost;Database='c:\database\mydatabase.fdb';Charset=UTF8;User ID=sysdba;Password=qwertz;" 
  -s "c:\my-mkdocs-project\dbschema.json"

With subsequent calls, the JSON file is not completely recreated, but rather updated with new data. This means that manual changes (e.g. descriptions) are not overwritten.

Create a new MkDocs project

To create a new MkDocs project for a PostgreSQL database, type something like this:

sqldocs build-mkdocs 
  -l en 
  -db postgres 
  -s "c:\my-mkdocs-project\dbschema.json" 
  -o "c:\my-mkdocs-project"

To create a new MkDocs project for a Firebird database, type something like this:

sqldocs build-mkdocs 
  -l en 
  -db firebird 
  -s "c:\my-mkdocs-project\dbschema.json" 
  -o "c:\my-mkdocs-project"

With subsequent calls, the MkDocs project is not completely recreated, but rather updated with new data. This means that manual changes are not overwritten.

Everything in one step

You can combine both commands into one.

For a PostgreSQL database, type something like this:

sqldocs build-json-mkdocs 
  -l en 
  -db postgres 
  -c "Server=localhost;Port=5432;Database=mydatabase;User ID=postgres;Password=qwertz;" 
  -s "c:\my-mkdocs-project\dbschema.json" 
  -o "c:\my-mkdocs-project"

For a Firebird database, type something like this:

sqldocs build-json-mkdocs 
  -l en 
  -db firebird 
  -c "Host=localhost;Database='c:\database\mydatabase.fdb';Charset=UTF8;User ID=sysdba;Password=qwertz;" 
  -s "c:\my-mkdocs-project\dbschema.json" 
  -o "c:\my-mkdocs-project"
Clone this wiki locally