mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-03-20 14:50:01 +00:00
Additional method to retrieve all titles
This commit is contained in:
@@ -61,10 +61,21 @@ $tw.Wiki = function(options) {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
function sqlAllTitles() {
|
||||
let resultRows = [];
|
||||
db.exec({
|
||||
sql: "select title from tiddlers order by title",
|
||||
rowMode: "object",
|
||||
resultRows: resultRows
|
||||
});
|
||||
return resultRows;
|
||||
}
|
||||
sqlSaveTiddler({title: "HelloThere", text: "One"});
|
||||
console.log(sqlGetTiddler("HelloThere"));
|
||||
sqlSaveTiddler({title: "HelloThere", text: "Two", custom: "A custom field"});
|
||||
console.log(sqlGetTiddler("HelloThere"));
|
||||
sqlSaveTiddler({title: "AnotherTiddler", text: "Three"});
|
||||
console.log(sqlAllTitles());
|
||||
// Plain JS wiki store implementation follows
|
||||
options = options || {};
|
||||
var self = this,
|
||||
|
||||
Reference in New Issue
Block a user