Complete documentation for all 44 database handlers with centralized performance considerations
This commit is contained in:
1 parent
69aa91d403
commit
4f60b228d5
45 files changed
+11599
No files matched your search
@@ -0,0 +1,54 @@
|
||||
# dbKitHandler Documentation
|
||||
|
||||
## Overview
|
||||
This document describes the database relationships and interactions for the `dbKitHandler` class. The kit handler manages static data about game kits, which are predefined sets of items or abilities that players can obtain or use in the game.
|
||||
|
||||
## Handler Class
|
||||
**File:** `src/engine/db/handlers/dbKitHandler.java`
|
||||
**Class:** `dbKitHandler`
|
||||
**Extends:** `dbHandlerBase`
|
||||
|
||||
## Database Tables
|
||||
|
||||
### Main Kit Table
|
||||
- **Table Name:** `static_rune_validkit`
|
||||
- **Description:** Stores information about valid kits available in the game, including their properties and restrictions
|
||||
- **Columns:**
|
||||
- UID (Primary Key)
|
||||
- kitName
|
||||
- description
|
||||
- raceRestriction
|
||||
- classRestriction
|
||||
- itemLimit
|
||||
- isAvailable
|
||||
|
||||
## Key Queries
|
||||
|
||||
### GET_ALL_KITS
|
||||
```sql
|
||||
SELECT * FROM `static_rune_validkit`
|
||||
```
|
||||
**File:** `dbKitHandler.java`, Line ~29
|
||||
|
||||
### GET_KIT_BY_NAME
|
||||
```sql
|
||||
SELECT * FROM `static_rune_validkit` WHERE `kitName`=?
|
||||
```
|
||||
**File:** `dbKitHandler.java`, Line ~45
|
||||
|
||||
## Relationships
|
||||
|
||||
1. **Kit to Race Restrictions:** Many-to-many relationship through raceRestriction field
|
||||
2. **Kit to Class Restrictions:** Many-to-many relationship through classRestriction field
|
||||
3. **Kit to Items:** One-to-many relationship via itemLimit referencing items in the game
|
||||
|
||||
## Java Field to Database Column Mappings
|
||||
|
||||
| Java Field | Database Column | Notes |
|
||||
|------------|-----------------|-------|
|
||||
| `kitName` | `static_rune_validkit.kitName` | Unique name identifier for the kit |
|
||||
| `description` | `static_rune_validkit.description` | Description of the kit's purpose and benefits |
|
||||
| `raceRestriction` | `static_rune_validkit.raceRestriction` | Race restriction for the kit |
|
||||
| `classRestriction` | `static_rune_validkit.classRestriction` | Class restriction for the kit |
|
||||
| `itemLimit` | `static_rune_validkit.itemLimit` | Maximum number of items allowed in this kit |
|
||||
| `isAvailable` | `static_rune_validkit.isAvailable` | Boolean flag indicating if kit is currently available |
|
||||
Reference in new issue
Block a user