Quantcast
VGInterface.com
Search Downloads


Go Back   LoTROInterface > LotRO Tools & Utilities for Developers

Category: LotRO Tools & Utilities for DevelopersLibDB
Interface Information
Download
How do I install this? (FAQ)
Name: LibDB   Popular!
Author:
Date: 10-17-2010 02:13 AM
Size: 1.37 Kb
Version: 0.3
Rate File: 1 out of 5 with 1 votes  
Description
This is specifically for Lua developers making it a bit easier for profile management.

Short description of methods:

DB:New( datascope, key, defaults, defaultprofile )

Returns a new database with datascope, key, default table, and the defaultprofile.
Ex:
mydb = DB:New( Turbine.DataScope.Server, "MyAddon", Defaults, Defaults )


DB:CopyProfile( profile )

Returns a copy of a profile.
Ex:
mydb.profiles["Destination"] = mydb:CopyProfile( mydb.profiles["Defaults"] )


DBeleteProfile( profile )

Sets profile to nil and saves databse.
Ex:
mydbeleteProfile()


DB:SetCurrentProfile( profile )

Sets DB.profiles["ACTIVE"] to the profile name field and saves the database.
Ex:
mydb:SetCurrentProfile( mydb.profiles["Defaults"] )


DB:GetCurrentProfile()

Returns DB.profiles["ACTIVE"]
Ex:
local current = mydb:GetCurrentProfile()


DB:RegisterDefaults( defaultstable )

Used to create DB.profiles["Defaults"], set it equal to defaultstable, and set DB.profiles["ACTIVE"] to "Defaults" if the active profile is not already defined.
It then saves the database.
Ex:
mydb:RegisterDefaults( Defaulttable )


DB:ResetDB( defaultprofile )

Sets DB.profiles to nil, adds the default table into the profiles, registers the default table, and saves the database.
Ex:
mydb:ResetDB( Defaulttable )


DB:SaveDB()

Saves the database.
Ex:
mydb:SaveDB()


DB:NewProfile( name )

Returns a copy of DB.profiles["Defaults"] as DB.profiles[name]
Ex:
mydb:NewProfile( "MyNewProfileName" )



v0.3 10/17/2010:
Updated Copyprofile error that was left out before upload.
File Statistics
User Rating:
1 out of 5 with 1 votes
Downloads: 4233
Views: 8720
Favorites: 1
Uploaded By:
 
Last Modified: 10-17-2010 11:00 PM by Grim    

View Pictures. Download Now! Post A Comment

There have been no comments posted to this file.
Be the first to add one.

 
Category Jump:
Search this Category:
 

All times are GMT -5. The time now is 09:47 PM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | VGInterface | LoTROInterface | MMOInterface | Swtorui