alexfu / SQLiteQueryBuilder

A library that provides a simple API for building SQLite query statements in Java.
MIT License
70 stars 21 forks source link

Can't provide auto increment primary key #39

Closed jaypoojara closed 8 years ago

jaypoojara commented 8 years ago

if i do something like this SQLiteQueryBuilder.create().table(Constants.TBL_RECENT).column(new Column("demo", ColumnType.TEXT)).column(new Column("demo1", ColumnType.INTEGER)).column(new Column("pk", ColumnType.INTEGER, ColumnConstraint.PRIMARY_KEY)).toString() out put will be CREATE TABLE recent(demo TEXT,demo1 INTEGER,pk INTEGER PRIMARY KEY)

but what if i want to do some thing like this CREATE TABLE recent(demo TEXT,demo1 INTEGER,pk INTEGER PRIMARY KEY) AUTOINCREMENT

jaypoojara commented 8 years ago

https://www.sqlite.org/autoinc.html

alexfu commented 8 years ago

@jaypoojara please refer to https://github.com/alexfu/SQLiteQueryBuilder/blob/develop/src/test/java/com/alexfu/sqlitequerybuilder/CreateTableTest.java#L136

jaypoojara commented 8 years ago

@alexfu thank you. i already managed it. thank you very much.