nette-databaselisted
Install: claude install-skill nette/agent-plugins
## Database
Uses Nette Database, typically with MySQL, PostgreSQL or SQLite as the backend.
```shell
composer require nette/database
```
See [the Explorer API reference](references/explorer.md) for the full ActiveRow/Selection API.
See [the SQL query reference](references/sql-way.md) for direct SQL queries.
### Database Conventions
- Table names use **singular form** (e.g., `user` not `users`)
- Use TINYINT(1) for booleans
- Use `id` for primary keys
- Character encoding: `utf8mb4` with appropriate collation (e.g. `utf8mb4_0900_ai_ci`, or `utf8mb4_cs_0900_ai_ci` for Czech)
- Standard timestamp fields:
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP
- never use TIMESTAMP for date/time fields
### Entity Mapping
Nette Database has a built-in `EntityMapping` interface (since 3.2) that the Explorer uses to resolve an `ActiveRow` subclass for each table and (optionally) translate between column names and PHP property names. The default implementation (`DefaultEntityMapping`) supports:
- **Table-to-class map with wildcards.** Keys may be exact names (`special_table`), wildcard patterns (`forum_*`) or a bare `*` catch-all. Class names may contain `*`, which is replaced with the PascalCase of the captured portion: `forum_post` + `App\Forum\*Row` → `App\Forum\PostRow`. A class without `*` is a fixed class (`log_*: App\Logging\LogRow` maps every `log_*` table to the same `LogRow`). Schema prefixes like `public.` are stripped before PascalCase conversion. Exact keys take p