Exemplo n.º 1
0
Arquivo: fscan.go Projeto: dhn/feedme
func initSQL() {
	if !checkFileExist(config.SQLDatabase) {
		fmt.Printf("%s not found, please run first ffetch\n", config.SQLDatabase)
	} else {
		cursor, _ = sqlite3.Open(config.SQLDatabase)
	}
}
Exemplo n.º 2
0
Arquivo: ffetch.go Projeto: dhn/feedme
func initSQL() {
	cursor, _ = sqlite3.Open(config.SQLDatabase)

	query := "CREATE TABLE IF NOT EXISTS feed(" +
		"id        INTEGER PRIMARY KEY," +
		"site      TEXT," +
		"title     TEXT UNIQUE," +
		"link      TEXT," +
		"date      INTEGER," +
		"read      INTEGER);"

	cursor.Exec(query)
}