File Details
LibSharedVariables-1.0
- R
- Mar 23, 2026
- 3.12 KB
- 14
- 2.5.5+1
- Classic + 1
File Name
LibSharedVariables-1.0.zip
Supported Versions
- 2.5.5
- 1.15.8
Changelog
[1.0.0] - 23/03/2026
Added
- Initial release of LibSharedVariables-1.0.
- Library registration through LibStub as major
LibSharedVariables-1.0with minor1. - Main API:
lib:Load(name, defaults, defaultsPC, onLoad)returning a reusable handle per addon name. - Automatic saved variable table creation in
_Gfor<name>DB(account-wide) and<name>PCDB(per-character). - Merged proxy database view at
handle.dbwith prioritized lookup: Character DB -> Account DB -> Character defaults (defaultsPC) -> Account defaults (defaults). - Smart write routing in
handle.db: existing character keys stay character-scoped; keys indefaultsPCpersist to character DB; keys indefaultspersist to account DB; new keys default to character DB. - Utility methods:
handle:Get(key, default)andhandle:Set(key, value). - Merged iteration support via
pairs(handle.db)with duplicate key suppression and precedence-aware order. - Argument validation for
name(non-empty string) andonLoad(function when provided). - Handle reuse behavior when
Loadis called multiple times with the same name, including refresh of DB references and defaults. - Optional
onLoad(db, handle)callback invoked on first handle creation.
Compatibility
- Interface values declared in TOC:
11508, 20505. - Requires
LibStub(LibStub/LibStub.lua). - Load-on-demand library (
## LoadOnDemand: 1). - Lua addon environment for World of Warcraft saved variables.
Notes
- This is the first public build for the library.
- Versioning follows LibStub major/minor conventions, mapped to changelog release
1.0.0. - The design targets predictable data ownership between account and character scopes while keeping access through a single merged
dbview. - Licensed under GPL-3.0 (see
LICENSE).