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.

  1. create json file describes schema. example here

  2. right click on json file -> generate sqlite model...:

enter image description here

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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -