the pre-fulltext experimentation version of the code

This commit is contained in:
Myk Melez 2008-01-24 15:28:22 -08:00
Родитель 8862f8dff6
Коммит c4260e4cf9
2 изменённых файлов: 10 добавлений и 20 удалений

Просмотреть файл

@ -6,21 +6,6 @@ if (typeof Cu == "undefined") Cu = Components.utils;
var Snowl = {
init: function() {
this._initModules();
try {
SnowlDatastore.dbConnection.executeSimpleSQL("create virtual table recipe using fts3(name, ingredients)");
insert into recipe (name, ingredients) values ('broccoli stew', 'broccoli peppers cheese tomatoes');
sqlite>insert into recipe (name, ingredients) values ('pumpkin stew', 'pumpkin onions garlic celery');
sqlite>insert into recipe (name, ingredients) values ('broccoli pie', 'broccoli cheese onions flour');
sqlite>insert into recipe (name, ingredients) values ('pumpkin pie', 'pumpkin sugar flour butter');
}
catch(ex) {
let error = ex + "\n" + SnowlDatastore.dbConnection.lastError + ": " + SnowlDatastore.dbConnection.lastErrorString;
dump(error + "\n");
Cu.reportError(error);
}
//SnowlFeedClient.refresh("http://www.melez.com/mykzilla/atom.xml");
},

Просмотреть файл

@ -71,6 +71,11 @@ let SnowlDatastore = {
timestamp INTEGER, \
link TEXT",
parts: "id INTEGER PRIMARY KEY, \
messageID INTEGER NOT NULL REFERENCES messages(id), \
content BLOB NOT NULL, \
contentType TEXT NOT NULL",
attributes: "id INTEGER PRIMARY KEY, \
namespace TEXT, \
name TEXT NOT NULL",
@ -132,7 +137,7 @@ let SnowlDatastore = {
dbConnection = this._dbCreate(dbService, dbFile);
else {
try {
dbConnection = dbService.openUnsharedDatabase(dbFile);
dbConnection = dbService.openDatabase(dbFile);
// Get the version of the database in the file.
var version = dbConnection.schemaVersion;
@ -165,8 +170,8 @@ let SnowlDatastore = {
_dbCreate: function(aDBService, aDBFile) {
var dbConnection = aDBService.openDatabase(aDBFile);
for (var table in this._dbSchema)
dbConnection.createTable(table, this._dbSchema[table]);
for (var tableName in this._dbSchema.tables)
dbConnection.createTable(tableName, this._dbSchema.tables[tableName]);
dbConnection.schemaVersion = this._dbVersion;
return dbConnection;
},
@ -190,8 +195,8 @@ let SnowlDatastore = {
},
_dbMigrate0To1: function(aDBConnection) {
for (var table in this._dbSchema)
aDBConnection.createTable(table, this._dbSchema[table]);
for (var tableName in this._dbSchema.tables)
dbConnection.createTable(tableName, this._dbSchema.tables[tableName]);
},
get _selectSourcesStatement() {