# nounsql
**NounSQL is a DSL for Database Schema Design.**
A compiler from `.nsql` to SQL DDL.
```sh
cargo install nounsql
nounsql sql schema.nsql
```
| `check` | diagnostics only |
| `sql` | the DDL |
| `ir` | the resolved schema |
| `ast` | the syntax tree |
| `--dialect <name>` | output target |
| `-o, --output <path>` | write to a file instead of stdout |
| `--deny-warnings` | exit non-zero if anything was warned about |
Pass `-` as the input to read standard input.
```
nouns {
account "A person who signs in"
post "Something an account wrote"
}
mixin base {
column id type=serial
pk id
}
table account {
use base
column email type=text
index email unique
}
table post {
use base
belongs_to account
column title type=text
}
```
Documentation: https://misebox.github.io/nounsql