DataStore

DataStore is the main component of a series of addons that serve as data repositories in game. Their respective purpose is to offer scanning and storing services to other addons.

The advantages of this approach are:

  • data is scanned only once for all client addons (performance gain).
  • data is stored only once for all client addons (memory gain).
  • addon authors can spend more time coding higher level features.
  • each module is an independant addon, and therefore has its own SavedVariables file, meaning that you could clean _Crafts without disturbing _Containers.

Scope : a note to contributing authors

The core of the database is based on my work in Altoholic, and is thus designed with multiple-account support in mind. If client addons want to store data from foreign accounts, the database will be ready for it. Nothing is final at this point though, feel free to contribute, as the concept can and will be perfected.

The scope of each addons is to provide common methods for client addons. For instance, DataStore_Crafts embeds LibPeriodicTable-3.1-Tradeskill allowing it to give more than just scanning & storing data. However, the goal is not to put _everything_ into these addons, they must be seen as an abstraction layer and a service provider, nothing more.

These libraries cannot and should not be embedded, as they all manage their respective SavedVariables.

Existing modules

Each module will exist as a separate addon, so that authors can package only the ones they want with their own project.

More modules will come later.

Information Pages

  • Project overview : A slightly more detailed overview of the scope
  • API : Samples of commonly used methods (work-in-progress)

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of Farmbuyer Farmbuyer Dec 16, 2011 at 04:58 UTC - 0 likes

    @kitty1967: Go

    I answered that ticket. It's a Blizzard bug, DataStore has nothing to do with it. Any addon doing anything with menus will be blamed for it. You cannot set a focus using a dropdown menu or you will stumble across their bug, and the addon blamed by the popup has no responsibility whatsoever. You must use the /focus command or set the builtin keybinding to do the same thing.

    This is a long-known bug. Google can tell you more if you're prefer to ignore advice.

  • Avatar of WOWVern WOWVern Dec 03, 2011 at 23:58 UTC - 0 likes

    Is there going to be an update for 4.3?

  • Avatar of kitty1967 kitty1967 Jun 16, 2011 at 23:38 UTC - 0 likes

    Is this project still active? I continuously get a DataStore error when I try to set focus on someone. After clearing the error, attempting to set focus does nothing. Quite aggravating, I use /assist focus in many of my macros.

  • Avatar of Zabeard Zabeard Oct 19, 2010 at 15:45 UTC - 0 likes

    If there is a particular module not enabled, e.g. with the DataStore_Quests being bugged at the moment and preventing handing in quests.  It would appear that although the calling code gets an assert due to the assert(type(module) == "table") lines in the code.  Would it not be better to return 0 in replacement of lastUpdate value from the modules this way callees could tell that the information is not available and disable buttons as appropriate.  I believe this is what Altoholic is trying to do, but before it can the assert kicks in.

    This would mean that if one or more modules are disabled the callee's can fail gracefully instead of be abused with an assert.

  • Avatar of Thaoky Thaoky Aug 27, 2010 at 13:13 UTC - 0 likes

    I haven't tested the wowhead addon, but if I can find anything interesting I could reuse, I will. Anyway, it's my goal to avoid having to open tradeskills to get the whole list, I know it can be done by simply using the profession link, but with certain constraints. I plan to review that part for Cataclysm, hoping that new API functions will make it easier.

  • Avatar of quased quased Aug 27, 2010 at 10:40 UTC - 0 likes

    I'm really missing an option to automatically scan all tradeskills at login. I'm currently using the wowhead addon's "/wl collect" command to populate my DataStore database, but it seems like overkill since the wowhead addon uses resources aplenty.

  • Avatar of mswallie mswallie Aug 16, 2010 at 22:02 UTC - 0 likes

    Good to know -- And I'll have to keep an eye out for Odyssey. It sounds even better than what I was wishing I had. Thanks for the update!

  • Avatar of Thaoky Thaoky Aug 16, 2010 at 18:20 UTC - 0 likes

    DataStore_Quests does that. However, it only takes care of storing the quest history for client addons. My other addon, Odyssey, which is currently in alpha, shows which quests have been completed by your alts, by zone, etc..

    Since 3.3 (I think), Blizzard provides access to the complete quest history, even if you install the mod after the quest was completed.

  • Avatar of mswallie mswallie Aug 07, 2010 at 15:55 UTC - 0 likes

    Not a programmer, but following your progress on DataStore_Quests.  I'm looking for a mod that will allow me to access data about which quests I have completed back through the beginning of the game.  I've found a few addons that will track completed quests, but only *after* that mod was installed.  Will DataStore be able to provide access to that info?

  • Avatar of Thaoky Thaoky Jul 29, 2010 at 08:22 UTC - 0 likes

    @warkey28: I'll look into that.

    @ckaotik: Are you sure you got the character key correctly before calling GetCharacterClass ? It is fully intended that you pass a string argument which is converted into a table by the metatable inside DataStore.

    When you do the actual call, the key should be something like "Default.MyRealm.Thaoky".

    Thanks for your feedback on DataStore_Currencies, I'll update it.

Facts

Date created
Jul 30, 2009
Category
Last update
Jan 29, 2012
Development stage
Release
License
All Rights Reserved
Curse link
DataStore
Reverse relationships
1
Downloads
330,747
Recent files
  • A: r36 for 4.3 Jan 29, 2012
  • A: r35 for 4.3 Dec 10, 2011
  • A: r34 for 4.3 Dec 10, 2011
  • R: DataStore 4.2.002 for 4.2 Oct 30, 2011
  • A: r32 for 4.2 Oct 30, 2011

Authors