Skip to content

mohsenyz/mdb-android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MDB - Android orm database library

Basic useful feature list:

  • very small library
  • can be uses in all api versions
  • fast and easy
  • File contents are saved in the URL so you can share files

MDB is an android orm database library like sugarorm

I create this library just to train java reflection api hope it will be usefull for you too

How to use (step by step):

public class Books extends MDBRecord<Books>{
	public String name;
    public long price;
}

And when your app start first time:

	MDB.init(Books.class);

Above code will make a sqlite table it is more fast than making sql for creating table by hand

And then you can :

Books book = new Books();
book.name = "the man who smiles";
book.price = 1000;
//to save as a new field in database
int id = book.save();//return unique id of inserted field

And for updating row:

Books book = new Books().findById(id);
book.name = "the woman who smiles";
book.save();//it will just update the row

for deleting row:

book.delete();

Thanks:

  • sugarorm library

About

Small android orm database library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages