Skip to content

CreateTable

nmc9 edited this page Apr 30, 2018 · 2 revisions

Create Table

A series of methods that help build a CREATE TABLE statement.

Shortcuts

This class is a series of hard coded Type Strings (INTEGER, DECIMAL,TEXT, INT(11), etc.) that can be used instead of hard coded strings for a stronger create table statement. TableHelper extends this class so they can be called directly

Put

Accepts as many Strings as you want as paramters to the create table statement

Example

Standard

createtable.put(ClassTable.FIELD_GENERIC,TEXT);

With Attributes

createtable.put(ClassTable.COL_ID,INTEGER,PRIMARY_KEY,AUTO_INCREMENT);

get

Returns the CreateTable object as a string that can be used to build the database table.

addIfNotExistsTag:

add the IF NOT EXISTS tag off by default

removeIfNotExistsTag:

removed the IF NOT EXISTS tag off by default