Skip to content

Commit

Permalink
Merge pull request #507 from macoto1995/viewpoints-in-README
Browse files Browse the repository at this point in the history
Added description about Viewpoints in README.md
  • Loading branch information
k1LoW authored Sep 26, 2023
2 parents e4cde91 + 94d138a commit 66421d6
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Key features of `tbls` are:
- [Lint](#lint)
- [Comments](#comments)
- [Relations](#relations)
- [Viewpoints](#viewpoints)
- [Dictionary](#dictionary)
- [Personalized Templates](#personalized-templates)
- [Required Version](#required-version)
Expand Down Expand Up @@ -919,6 +920,7 @@ relations:
![img](sample/mysql/logs.svg)
#### Override relations
If you want to override an existing relation, set the `override:` to `true`.
Expand Down Expand Up @@ -1032,6 +1034,41 @@ All configuration values can be set by expanding the environment variables.
dsn: my://${MYSQL_USER}:${MYSQL_PASSWORD}@hostname:3306/${MYSQL_DATABASE}
```

### Viewpoints
Viewpoints of your database schema based on concerns of your domain and add description to them.
You can also define groups of tables within viewpoints.

``` yaml
# .tbls.yml
viewpoints:
-
name: comments on post
desc: Users can comment on each post multiple times and put a star on each comments.
tables:
- users
- posts
- comments
- comment_stars
- post_comments
- post_comment_stars
groups:
-
name: Comments
desc: Tables about comments
tables:
- posts
- comments
- post_comments
-
name: Stars
desc: Tables about stars
tables:
- comment_stars
- post_comment_stars
```

## Output formats

`tbls out` output in various formats.
Expand Down

0 comments on commit 66421d6

Please sign in to comment.