java - Easy way to make an SQLite database? -
i working new eclipse adt (android development tools). when used older version, there plugin motorola named motodev studio helped make database quite easily. doesn't seem work anymore new adt.
does have alternative making easy sqlite database content, , "converting" java code android? (i've been looking online, can't seem find it)
you can use eclipse plugin: https://github.com/sromku/android-sqlite-model-generator-plugin
this plugin allow generate java source code android based on sqlite database schema define in json file.
create json file describes schema. example here
right click on json file ->
generate sqlite model...
:
then, can work database using generated code. example, if define student
table few columns, adding new student this:
student student = new student(); student.setfirstname("john"); student.setlastname("smith"); student.setage(30); model model = model.getinstance(context); model.createstudent(student);
more info , details found in github project
Comments
Post a Comment