package com.icecondor.nest;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteDatabase.CursorFactory;

public class GeoRssSqlite extends SQLiteOpenHelper {
	public static final String NAME = "name";
	public static final String URL = "url";
	public static final String SERVICES_TABLE = "services";
	public static final String SHOUTS_TABLE = "shouts";

	public GeoRssSqlite(Context context, String name, CursorFactory factory,
			int version) {
		super(context, name, factory, version);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL("CREATE TABLE services (_id integer primary key, name text, url text)");
		db.execSQL("CREATE TABLE shouts (_id integer primary key, guid text unique, title text, lat float, long float, date datetime, service_id integer)");
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub

	}

}

@@ -814,16 +814,33 @@
 t unique
+ on conflict fail
 , title 

use on conflict fail in sqlite3 for guid column