VContentProvider icon indicating copy to clipboard operation
VContentProvider copied to clipboard

Creating tables with autoincrement id

Open YuraLaguta opened this issue 12 years ago • 1 comments
trafficstars

I find this method useful for creating routing tables for many-to-many relations Perhaps some else would found it useful

/** * For autoincrement key * * @param table */ public VTableCreation(String table) { this.table = table; columns = new ArrayList<VTableColumn>(); indices = new HashSet<String>(); sb = new StringBuilder(); sb.append("CREATE TABLE IF NOT EXISTS ").append(table).append(" (_id INTEGER PRIMARY KEY"); }

YuraLaguta avatar May 20 '13 03:05 YuraLaguta

I don't have much time to add new features for this repo, but you can fork it and add features yourself, and send a pull request.

coocood avatar May 20 '13 03:05 coocood