Expand description
Private module for very tightly coupled database conversion methods. In general, these have many invariants that need to be maintained when they’re called–do not assume it’s safe to make these public!
Macros§
- deserialize_
body 🔒 - Generates the code to deserialize a specific body variant from JSON
Structs§
Functions§
- convert_
active_ abilities_ from_ database - convert_
active_ abilities_ to_ database - convert_
body_ from_ database - convert_
body_ to_ database_ json - convert_
character_ from_ database - convert_
hardcore_ from_ database - convert_
hardcore_ to_ database - convert_
inventory_ from_ database_ items - Properly-recursive items (currently modular weapons) occupy the same
inventory slot as their parent. The caller is responsible for ensuring that
inventory_items and loadout_items are topologically sorted (i.e. forall i,
items[i].parent_container_item_id == x
implies exists j < i satisfyingitems[j].item_id == x
) - convert_
items_ to_ database_ items - Returns a vector that contains all item rows to upsert; parent is responsible for deleting items from the same owner that aren’t affirmatively kept by this.
- convert_
loadout_ from_ database_ items - convert_
overflow_ items_ from_ database_ items - convert_
recipe_ book_ from_ database_ items - convert_
skill_ 🔒groups_ from_ database - convert_
skill_ groups_ to_ database - convert_
skill_ set_ from_ database - NOTE: This does not return an error on failure, since we can partially recover from some failures. Instead, it returns the error in the second return value; make sure to handle it if present!
- convert_
stats_ from_ database - convert_
waypoint_ from_ database_ json - convert_
waypoint_ to_ database_ json - get_
item_ 🔒from_ asset - get_
mutable_ 🔒item