PostgresDescribe v0.1.4 PostgresDescribe View Source
This library provides a Mix
task that documents PostgreSQL database tables
in files within the directory tree.
Link to this section Summary
Functions
Main entry point into PostgresDescribe
’s library code. Takes no arguments,
pulls configuration from the environment and/or defaults
Link to this section Functions
Main entry point into PostgresDescribe
’s library code. Takes no arguments,
pulls configuration from the environment and/or defaults.
The following configuration values are required at a minimum:
database
: Your PG database namewrite_dir
: Where we should write your description filestables
(map): Keys are schemas in your database (at a minimum you probably wantpublic
), and values are lists of table names within that schema
If any of these values are not provided, this function will raise an
ArgumentError
.
Additional configuration values you can set:
host
: Your PG host (defaults tolocalhost
)port
: PG port (defaults to5432
)user
: Your PG user (defaults to your current username,whoami
)password
: Your PG password (defaults tonil
)
Configuration can be provided through your application config under the
postgres_describe
application:
config :postgres_describe,
database: "mydatabase",
write_dir: Path.join([System.tmp_dir, "db_docs"]),
tables: %{
public: ["table1", "table2"]
}
Or through system environment variables.