mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-05 23:10:28 +00:00
Clarify method name
This commit is contained in:
parent
70b048f356
commit
8f9ae7e4d5
@ -52,9 +52,9 @@ exports.startup = function() {
|
||||
$tw.sqlTiddlerStore.createRecipe("recipe-tau",["bag-alpha"]);
|
||||
$tw.sqlTiddlerStore.createRecipe("recipe-upsilon",["bag-alpha","bag-gamma","bag-beta"]);
|
||||
// Save tiddlers
|
||||
$tw.sqlTiddlerStore.saveTiddler({title: "$:/SiteTitle",text: "Bag Alpha"},"bag-alpha");
|
||||
$tw.sqlTiddlerStore.saveTiddler({title: "$:/SiteTitle",text: "Bag Beta"},"bag-beta");
|
||||
$tw.sqlTiddlerStore.saveTiddler({title: "$:/SiteTitle",text: "Bag Gamma"},"bag-gamma");
|
||||
$tw.sqlTiddlerStore.saveBagTiddler({title: "$:/SiteTitle",text: "Bag Alpha"},"bag-alpha");
|
||||
$tw.sqlTiddlerStore.saveBagTiddler({title: "$:/SiteTitle",text: "Bag Beta"},"bag-beta");
|
||||
$tw.sqlTiddlerStore.saveBagTiddler({title: "$:/SiteTitle",text: "Bag Gamma"},"bag-gamma");
|
||||
};
|
||||
|
||||
})();
|
||||
|
@ -212,7 +212,7 @@ SqlTiddlerStore.prototype.createRecipe = function(recipename,bagnames) {
|
||||
});
|
||||
};
|
||||
|
||||
SqlTiddlerStore.prototype.saveTiddler = function(tiddlerFields,bagname) {
|
||||
SqlTiddlerStore.prototype.saveBagTiddler = function(tiddlerFields,bagname) {
|
||||
// Update the tiddlers table
|
||||
this.runStatement(`
|
||||
INSERT OR REPLACE INTO tiddlers (bag_id, title)
|
||||
@ -269,7 +269,7 @@ SqlTiddlerStore.prototype.saveRecipeTiddler = function(tiddlerFields,recipename)
|
||||
recipe_name: recipename
|
||||
});
|
||||
// Save the tiddler to the topmost bag
|
||||
this.saveTiddler(tiddlerFields,row.bag_name);
|
||||
this.saveBagTiddler(tiddlerFields,row.bag_name);
|
||||
};
|
||||
|
||||
SqlTiddlerStore.prototype.deleteTiddler = function(title,bagname) {
|
||||
|
@ -37,10 +37,10 @@ describe("SQL tiddler store", function() {
|
||||
// Run tests
|
||||
it("should save and retrieve tiddlers", function() {
|
||||
// Save tiddlers
|
||||
sqlTiddlerStore.saveTiddler({title: "Another Tiddler",text: "I'm in alpha",tags: "one two three"},"bag-alpha");
|
||||
sqlTiddlerStore.saveTiddler({title: "Hello There",text: "I'm in alpha as well",tags: "one two three"},"bag-alpha");
|
||||
sqlTiddlerStore.saveTiddler({title: "Hello There",text: "I'm in beta",tags: "four five six"},"bag-beta");
|
||||
sqlTiddlerStore.saveTiddler({title: "Hello There",text: "I'm in gamma",tags: "seven eight nine"},"bag-gamma");
|
||||
sqlTiddlerStore.saveBagTiddler({title: "Another Tiddler",text: "I'm in alpha",tags: "one two three"},"bag-alpha");
|
||||
sqlTiddlerStore.saveBagTiddler({title: "Hello There",text: "I'm in alpha as well",tags: "one two three"},"bag-alpha");
|
||||
sqlTiddlerStore.saveBagTiddler({title: "Hello There",text: "I'm in beta",tags: "four five six"},"bag-beta");
|
||||
sqlTiddlerStore.saveBagTiddler({title: "Hello There",text: "I'm in gamma",tags: "seven eight nine"},"bag-gamma");
|
||||
// Verify what we've got
|
||||
expect(sqlTiddlerStore.getRecipeTiddlers("recipe-rho")).toEqual([ "Another Tiddler", "Hello There"]);
|
||||
expect(sqlTiddlerStore.getRecipeTiddlers("recipe-sigma")).toEqual([ "Another Tiddler", "Hello There"]);
|
||||
|
Loading…
Reference in New Issue
Block a user