diff options
Diffstat (limited to 'org/output_sqlite.org')
-rw-r--r-- | org/output_sqlite.org | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/org/output_sqlite.org b/org/output_sqlite.org index bdb2ca7..06e7f01 100644 --- a/org/output_sqlite.org +++ b/org/output_sqlite.org @@ -31,18 +31,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, ) { <<sqlite_db_statement_composite_collection>> if (!(doc_matters.opt.action.quiet)) { @@ -50,7 +50,7 @@ template SQLiteHubBuildTablesAndPopulate() { } } } - SQLiteDbStatementComposite!()(db, doc_matters, doc_abstraction); + SQLiteDbStatementComposite!()(db, doc_abstraction, doc_matters); } } #+END_SRC @@ -59,18 +59,18 @@ template SQLiteHubBuildTablesAndPopulate() { #+BEGIN_SRC d :tangle "../src/doc_reform/output/sqlite.d" 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, ) { <<sqlite_db_statement_composite_discrete>> if (!(doc_matters.opt.action.quiet)) { @@ -78,7 +78,7 @@ template SQLiteHubDiscreteBuildTablesAndPopulate() { } } } - SQLiteDiscreteDbStatementComposite!()(db, doc_matters, doc_abstraction); + SQLiteDiscreteDbStatementComposite!()(db, doc_abstraction, doc_matters); } } #+END_SRC @@ -200,9 +200,9 @@ template SQLiteInsertMetadata() { #+BEGIN_SRC d :tangle "../src/doc_reform/output/sqlite.d" 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); @@ -291,7 +291,7 @@ template SQLiteDbDrop() { _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"); } } @@ -308,7 +308,7 @@ template SQLiteDbDrop() { { _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; @@ -536,8 +536,8 @@ auto inline_links(M,O)( ) { 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)) |