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
+76
@@ -0,0 +1,76 @@
|
||||
# Rune Base Handler Documentation
|
||||
|
||||
## Overview
|
||||
This document describes the database relationships and interactions for the `dbRuneBaseHandler` class. The rune base handler manages the base definitions and properties of rune items in the Magicbane emulator system.
|
||||
|
||||
## Handler Class
|
||||
**File:** `src/engine/db/handlers/dbRuneBaseHandler.java`
|
||||
**Class:** `dbRuneBaseHandler`
|
||||
**Extends:** `dbHandlerBase`
|
||||
|
||||
## Database Tables
|
||||
|
||||
### Main Table(s)
|
||||
- **Table Name:** `obj_runebase`
|
||||
- **Description:** Core rune base item information including name, description, and basic properties
|
||||
- **Columns:**
|
||||
- UID (Primary Key)
|
||||
- name
|
||||
- description
|
||||
- itemType
|
||||
- rarity
|
||||
- iconID
|
||||
- value
|
||||
- weight
|
||||
|
||||
### Related Tables
|
||||
|
||||
| Table Name | Description | Relationship |
|
||||
|------------|-------------|--------------|
|
||||
| `obj_rune_baseattribute` | Links rune base items to their attributes | RuneBaseID → obj_runebase.UID, AttributeID → obj_runebaseattribute.UID |
|
||||
| `obj_rune_baseeffect` | Links rune base items to their effects | RuneBaseID → obj_runebase.UID, EffectID → obj_runebaseeffect.UID |
|
||||
| `static_rune_type` | Static definitions of rune types | RuneTypeID → obj_runebase.UID |
|
||||
|
||||
## Key Queries
|
||||
|
||||
### Get Rune Base by ID
|
||||
```sql
|
||||
SELECT * FROM `obj_runebase` WHERE `UID`=?
|
||||
```
|
||||
**File:** `dbRuneBaseHandler.java`, Line ~60
|
||||
|
||||
### Get All Rune Bases
|
||||
```sql
|
||||
SELECT * FROM `obj_runebase`
|
||||
```
|
||||
**File:** `dbRuneBaseHandler.java`, Line ~85
|
||||
|
||||
### Get Rune Base by Type
|
||||
```sql
|
||||
SELECT * FROM `obj_runebase` WHERE `itemType`=?
|
||||
```
|
||||
**File:** `dbRuneBaseHandler.java`, Line ~120
|
||||
|
||||
## Relationships
|
||||
|
||||
1. **Rune Base to Attributes:** Many-to-many through `obj_rune_baseattribute` table
|
||||
2. **Rune Base to Effects:** Many-to-many through `obj_rune_baseeffect` table
|
||||
3. **Rune Base to Static Types:** One-to-many (via `static_rune_type.RuneTypeID`)
|
||||
4. **Rune Base to Item Properties:** Defines the core characteristics of rune items
|
||||
|
||||
## Java Field to Database Column Mappings
|
||||
|
||||
| Java Field | Database Column | Notes |
|
||||
|------------|-----------------|-------|
|
||||
| `name` | `obj_runebase.name` | Rune base name |
|
||||
| `description` | `obj_runebase.description` | Description of the rune |
|
||||
| `itemType` | `obj_runebase.itemType` | Type of rune (weapon, armor, etc.) |
|
||||
| `rarity` | `obj_runebase.rarity` | Rarity level of the rune |
|
||||
| `iconID` | `obj_runebase.iconID` | Icon identifier for UI display |
|
||||
| `value` | `obj_runebase.value` | Value or worth of the rune |
|
||||
| `weight` | `obj_runebase.weight` | Weight of the rune item |
|
||||
|
||||
## Notes
|
||||
- Rune bases define the fundamental properties of all rune items in the game
|
||||
- Each rune base can have multiple attributes and effects associated with it
|
||||
- The system supports various rune types with different characteristics
|
||||
Reference in new issue
Block a user