AceDB-3.0

From WowAce Wiki
Jump to: navigation, search

AceDB-3.0 is a Library which allows easy access to complex table-based databases mostly used for Saved Variables

See AceDB-3.0 API Documentation for full documentation.

Very Simplistic Usage Example

MyAddon.toc:

## SavedVariables: MyAddonDB

MyAddon.lua:

-- creating a database object on top of our SavedVariables Var
-- Note: This should not be called from the main chunk, but instead
--       from OnInitialize or some such.
local db = AceDB:New("MyAddonDB")

-- now save some value to our profile
db.profile.firstValue = 1
db.profile.secondValue = 2

-- and some data to our character based data
db.char.firstValue = 1

You can access all datatypes in the same way:

db.<datatype>.key = value

Links