Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1003 Bytes

README.textile

File metadata and controls

44 lines (34 loc) · 1003 Bytes

AS3-Spod

AS3/AIR Spod api for Simple Persistent Objects Database Library

Open a database:


const resouce : File = File.applicationStorageDirectory.resolvePath('session.db');

const manager : SpodManager = new SpodManager();
manager.open(resource, true);

Create a table of Users:


const database : SpodDatabase = maganger.database;
database.createTable(User);

Insert a new User:


const table : SpodTable = database.getTable(User);
const user : User = new User('Fred', 28);
table.insert(user);

Update a User with a new age (getting old!):


user.age = 29;
user.update();

Delete a User:


user.remove();

Sync a User with a database in case some other program is editing the db:


user.sync();

There’s much more, if you want to help then get forking and send pull requests.

AS3-Spod uses the MIT license.