Database
-----------

### Database Resource

{{#each vars.ResourceMapping}}
* [{{@key}} Resource](./doc/database/Resources.md#{{@key}}-Resource)
{{/each}}


### Console to database

```bash
pon db:cli
```

In the console, you can access database resources via [ClayResource][clay_resource_a_p_i_url] class


**Terminal Example**

```bash
Welcome to the-db prompt!
DB Env: { dialect: 'mysql', host: 'localhost', port: '6002', database: 'thedemosite_dev', username: 'thedemosite_dev', root_username: 'root', hooks: null }
DB Resources: [ 'TheDBSchema', 'TheDBLog', 'Alias', 'History', 'Profile', 'Role', 'Sign', 'User' ]

the-db> User.count()  # Evaluate One-line Javascript in the terminal
106
the-db> (await User.first()).name  # Using async interface
'superadmin-71d5acfe'
the-db>
```
