Mercurial > wow > libmoduledbshare-1-0
comparison LibModuleDBShare-1.0/LibModuleDBShare-1.0.lua @ 16:2384f5c2a707
passed initialProfile along to DB creation
| author | Andrew Knoll <andrewtknoll@gmail.com> |
|---|---|
| date | Mon, 11 Mar 2013 16:10:39 -0400 |
| parents | 1dd07f05ecac |
| children | 4ed8d6827ef7 |
comparison
equal
deleted
inserted
replaced
| 15:1dd07f05ecac | 16:2384f5c2a707 |
|---|---|
| 30 assert(type(groupName) == "string", "Usage: LibModuleDBShare:NewGroup(groupName, usesDualSpec, initialProfile): 'groupName' is not a string."); | 30 assert(type(groupName) == "string", "Usage: LibModuleDBShare:NewGroup(groupName, usesDualSpec, initialProfile): 'groupName' is not a string."); |
| 31 assert(type(LibModuleDBShare.groups[groupName]) == "nil", "LibModuleDBShare:NewGroup(groupName, usesDualSpec, initialProfile): 'groupName' already exists"); | 31 assert(type(LibModuleDBShare.groups[groupName]) == "nil", "LibModuleDBShare:NewGroup(groupName, usesDualSpec, initialProfile): 'groupName' already exists"); |
| 32 local group = {} | 32 local group = {} |
| 33 group.name = groupName; | 33 group.name = groupName; |
| 34 group.syncDBTable = {}; | 34 group.syncDBTable = {}; |
| 35 group.syncDB = AceDB:New(group.syncDBTable, nil, true); | 35 group.syncDB = AceDB:New(group.syncDBTable, nil, initialProfile); |
| 36 for k, v in pairs(DBGroup) do | 36 for k, v in pairs(DBGroup) do |
| 37 group[k] = v; | 37 group[k] = v; |
| 38 end | 38 end |
| 39 return group; | 39 return group; |
| 40 end | 40 end |
