Example usage for android.database.sqlite SQLiteDatabase insert

List of usage examples for android.database.sqlite SQLiteDatabase insert

Introduction

In this page you can find the example usage for android.database.sqlite SQLiteDatabase insert.

Prototype

public long insert(String table, String nullColumnHack, ContentValues values) 

Source Link

Document

Convenience method for inserting a row into the database.

Usage

From source file:Main.java

public static void insertDrink(SQLiteDatabase db, String name) {
    ContentValues actValues = new ContentValues();
    actValues.put("NAME", name);
    db.insert(dbName, null, actValues);
}

From source file:Main.java

private static void insertLodiStart(SQLiteDatabase db, String time) {
    ContentValues routevalues = new ContentValues();
    routevalues.put("LODI_TIME", time);
    db.insert("JAMES_START", null, routevalues);
}

From source file:Main.java

private static void insertLodiStartWeekends(SQLiteDatabase db, String time) {
    ContentValues routevalues = new ContentValues();
    routevalues.put("LODI_TIME", time);
    db.insert("JAMES_START_WEEKEND", null, routevalues);
}

From source file:Main.java

public static long insert(SQLiteDatabase db, String name, String data) {
    ContentValues values = new ContentValues();
    values.put("data", data);
    return db.insert(name, null, values);
}

From source file:Main.java

private static void insertEastCampusStartSunday(SQLiteDatabase db, String time) {
    ContentValues routevalues = new ContentValues();
    routevalues.put("STARTSTOP_TIME_EASTCAMPUS", time);
    db.insert("EASTCAMPUS_START_SUNDAY", null, routevalues);
}

From source file:Main.java

private static void insertEastCampusStart(SQLiteDatabase db, String time) {
    ContentValues routevalues = new ContentValues();
    routevalues.put("STARTSTOP_TIME_EASTCAMPUS", time);
    db.insert("EASTCAMPUS_START", null, routevalues);
}

From source file:Main.java

private static void insertWestcottStart(SQLiteDatabase db, String time) {
    ContentValues routevalues = new ContentValues();
    routevalues.put("TOWARDS_START_TIME_WESTCOTT", time);
    db.insert("WESTCOTT_START", null, routevalues);
}

From source file:Main.java

private static void insertDrumlinsStart(SQLiteDatabase db, String time) {
    ContentValues routevalues = new ContentValues();
    routevalues.put("TOWARDS_START_TIME_DRUMLINS", time);
    db.insert("DRUMLINS_START", null, routevalues);
}

From source file:Main.java

private static void insertStopNames(SQLiteDatabase db, String stopNames) {
    ContentValues stopNameValues = new ContentValues();
    stopNameValues.put("STOP_NAMES", stopNames);
    db.insert("STOPS_LIST", null, stopNameValues);

}

From source file:Main.java

private static void insertStartTime(SQLiteDatabase db, String startStopName, String startTime) {
    ContentValues routevalues = new ContentValues();
    routevalues.put("START_STOPNAME", startStopName);
    routevalues.put("START_TIME_FROM_CAMPUS_JAMES", startTime);

    db.insert("FROMSUROUTE_JAMES", null, routevalues);
}