aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/output/sqlite.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc_reform/output/sqlite.d')
-rw-r--r--src/doc_reform/output/sqlite.d32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/doc_reform/output/sqlite.d b/src/doc_reform/output/sqlite.d
index e0c9390..acfbff3 100644
--- a/src/doc_reform/output/sqlite.d
+++ b/src/doc_reform/output/sqlite.d
@@ -10,18 +10,18 @@ mixin DocReformOutputRgxInit;
static auto rgx = Rgx();
long _metadata_tid_lastrowid;
template SQLiteHubBuildTablesAndPopulate() {
- void SQLiteHubBuildTablesAndPopulate(M,D)(
- M doc_matters,
+ void SQLiteHubBuildTablesAndPopulate(D,M)(
D doc_abstraction,
+ M doc_matters,
) {
auto pth_sqlite = DocReformPathsSQLite!()(doc_matters.sqlite.filename, doc_matters.output_path);
pth_sqlite.base.mkdirRecurse;
auto db = Database(pth_sqlite.sqlite_file);
template SQLiteDbStatementComposite() {
- void SQLiteDbStatementComposite(Db,M,D)(
+ void SQLiteDbStatementComposite(Db,D,M)(
Db db,
- M doc_matters,
D doc_abstraction,
+ M doc_matters,
) {
{
string _db_statement;
@@ -42,7 +42,7 @@ template SQLiteHubBuildTablesAndPopulate() {
_db_statement ~= SQLiteInsertMetadata!()(doc_matters);
SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT MetaData");
/+ get tid (lastrowid or max) for use in doc_objects table +/
- _db_statement ~= SQLiteInsertDocObjectsLoop!()(doc_matters, doc_abstraction);
+ _db_statement ~= doc_abstraction.SQLiteInsertDocObjectsLoop!()(doc_matters);
SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "INSERT DocObjects");
}
}
@@ -53,29 +53,29 @@ template SQLiteHubBuildTablesAndPopulate() {
}
}
}
- SQLiteDbStatementComposite!()(db, doc_matters, doc_abstraction);
+ SQLiteDbStatementComposite!()(db, doc_abstraction, doc_matters);
}
}
template SQLiteHubDiscreteBuildTablesAndPopulate() {
- void SQLiteHubDiscreteBuildTablesAndPopulate(M,D)(
- M doc_matters,
+ void SQLiteHubDiscreteBuildTablesAndPopulate(D,M)(
D doc_abstraction,
+ M doc_matters,
) {
auto pth_sqlite = DocReformPathsSQLiteDiscrete!()(doc_matters.output_path, doc_matters.src.language);
pth_sqlite.base.mkdirRecurse;
auto db = Database(pth_sqlite.sqlite_file(doc_matters.src.filename));
template SQLiteDiscreteDbStatementComposite() {
- void SQLiteDiscreteDbStatementComposite(Db,M,D)(
+ void SQLiteDiscreteDbStatementComposite(Db,D,M)(
Db db,
- M doc_matters,
D doc_abstraction,
+ M doc_matters,
) {
{
string _db_statement;
{
_db_statement ~= SQLiteTablesReCreate!()();
_db_statement ~= SQLiteInsertMetadata!()(doc_matters);
- _db_statement ~= SQLiteInsertDocObjectsLoop!()(doc_matters, doc_abstraction);
+ _db_statement ~= doc_abstraction.SQLiteInsertDocObjectsLoop!()(doc_matters);
SQLiteDbRun!()(db, _db_statement, doc_matters.opt.action, "table CREATE Tables, INSERT DocObjects");
}
db.close;
@@ -85,7 +85,7 @@ template SQLiteHubDiscreteBuildTablesAndPopulate() {
}
}
}
- SQLiteDiscreteDbStatementComposite!()(db, doc_matters, doc_abstraction);
+ SQLiteDiscreteDbStatementComposite!()(db, doc_abstraction, doc_matters);
}
}
template SQLiteDbRun() {
@@ -286,8 +286,8 @@ template SQLiteFormatAndLoadObject() {
) {
if (obj.has.inline_links) {
if (obj.metainfo.is_a != "code") {
- _txt = replaceAll!(hit =>
- hit[1] ~ "┤" ~ to!string((obj.stow.link[hit[2].to!ulong])).encode ~ "├"
+ _txt = replaceAll!(m =>
+ m[1] ~ "┤" ~ to!string((obj.stow.link[m[2].to!ulong])).encode ~ "├"
)(_txt, rgx.inline_link_number_only);
}
if ((_txt.match(rgx.mark_internal_site_lnk))
@@ -1133,9 +1133,9 @@ template SQLiteInsertMetadata() {
}
}
template SQLiteInsertDocObjectsLoop() {
- string SQLiteInsertDocObjectsLoop(M,D)(
- M doc_matters,
+ string SQLiteInsertDocObjectsLoop(D,M)(
D doc_abstraction,
+ M doc_matters,
) {
string _uid = SQLinsertDelimiter!()(doc_matters.src.doc_uid);
auto site_url = DocReformPathsUrl!()(doc_matters);