| 1 | ## -*- Mode: CPerl -*- | ||||||||||||||||||||||||||||||||||||||||||
| 2 | ## File: DiaColloDB::methods::export.pm | ||||||||||||||||||||||||||||||||||||||||||
| 3 | ## Author: Bryan Jurish <moocow@cpan.org> | ||||||||||||||||||||||||||||||||||||||||||
| 4 | ## Description: collocation db, top-level import/export methods | ||||||||||||||||||||||||||||||||||||||||||
| 5 | ## + really just adds methods to top-level DiaColloDB package | ||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||
| 7 | ##-- dummy package | ||||||||||||||||||||||||||||||||||||||||||
| 8 | package DiaColloDB::methods::export; | ||||||||||||||||||||||||||||||||||||||||||
| 9 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 10 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||
| 12 | package DiaColloDB; | ||||||||||||||||||||||||||||||||||||||||||
| 13 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||||||
| 15 | ##============================================================================== | ||||||||||||||||||||||||||||||||||||||||||
| 16 | ## Export/Import | ||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||
| 18 | ## $bool = $coldb->dbexport() | ||||||||||||||||||||||||||||||||||||||||||
| 19 | ## $bool = $coldb->dbexport($outdir,%opts) | ||||||||||||||||||||||||||||||||||||||||||
| 20 | ## + $outdir defaults to "$coldb->{dbdir}/export" | ||||||||||||||||||||||||||||||||||||||||||
| 21 | ## + %opts: | ||||||||||||||||||||||||||||||||||||||||||
| 22 | ## export_sdat => $bool, ##-- whether to export *.sdat (stringified tuple files for debugging; default=0) | ||||||||||||||||||||||||||||||||||||||||||
| 23 | ## export_cof => $bool, ##-- do/don't export cof.* (default=do) | ||||||||||||||||||||||||||||||||||||||||||
| 24 | ## export_tdf => $bool, ##-- do/don't export tdf.* (default=do) | ||||||||||||||||||||||||||||||||||||||||||
| 25 | 0 | ▶ | sub dbexport { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
dbexport: not called CC=38 SCAR=73.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 26 | 0 | my ($coldb,$outdir,%opts) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 27 | 0 | ▶ | $coldb->logconfess("cannot dbexport() an un-opened DB") if (!$coldb->opened); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 28 | 0 | ▶ | $outdir //= "$coldb->{dbdir}/export"; | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$outdir //= qq[$coldb->{"dbdir"}/export]
MC/DC0%0/1
$outdir //= qq[$coldb->{"dbdir"}/export]
$outdir
Truth table0%0/2
A
A= $outdir
| |||||||||||||||||||||||||||||||||||||||||||
| 29 | 0 | $outdir =~ s{/$}{}; | |||||||||||||||||||||||||||||||||||||||||
| 30 | 0 | $coldb->vlog('info', "export($outdir/)"); | |||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||
| 32 | ##-- options | ||||||||||||||||||||||||||||||||||||||||||
| 33 | 0 | ▶ | my $export_sdat = exists($opts{export_sdat}) ? $opts{export_sdat} : 0; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 34 | 0 | ▶ | my $export_cof = exists($opts{export_cof}) ? $opts{export_cof} : 1; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 35 | 0 | ▶ | my $export_tdf = exists($opts{export_tdf}) ? $opts{export_tdf} : 1; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||
| 37 | ##-- create export directory | ||||||||||||||||||||||||||||||||||||||||||
| 38 | 0 | ▶ | -d $outdir | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
-d $outdir or make_path($outdir)
MC/DC0%0/2
-d $outdir or make_path($outdir)
-d $outdir
make_path($outdir)
Truth table0%0/3
A or B
A= -d $outdirB= make_path($outdir)
| |||||||||||||||||||||||||||||||||||||||||||
| 39 | or make_path($outdir) | ||||||||||||||||||||||||||||||||||||||||||
| 40 | or $coldb->logconfess("dbexport(): could not create export directory $outdir: $!"); | ||||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||||
| 42 | ##-- dump: header | ||||||||||||||||||||||||||||||||||||||||||
| 43 | 0 | ▶ | $coldb->saveHeader("$outdir/header.json") | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 44 | or $coldb->logconfess("dbexport(): could not export header to $outdir/header.json: $!"); | ||||||||||||||||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||||||||||||||
| 46 | ##-- dump: load enums | ||||||||||||||||||||||||||||||||||||||||||
| 47 | 0 | my $adata = $coldb->attrData(); | |||||||||||||||||||||||||||||||||||||||||
| 48 | 0 | $coldb->vlog($coldb->{logExport}, "dbexport(): loading enums to memory"); | |||||||||||||||||||||||||||||||||||||||||
| 49 | 0 | ▶ | $coldb->{tenum}->load() if ($coldb->{tenum} && !$coldb->{tenum}->loaded); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$coldb->{"tenum"} and not $coldb->{"tenum"}->loaded
MC/DC0%0/2
$coldb->{"tenum"} and not $coldb->{"tenum"}->loaded
$coldb->{"tenum"}
not $coldb->{"tenum"}->loaded
Truth table0%0/3
A and not(B)
A= $coldb->{"tenum"}B= not $coldb->{"tenum"}->loaded
| |||||||||||||||||||||||||||||||||||||||||||
| 50 | 0 | foreach (@$adata) { | |||||||||||||||||||||||||||||||||||||||||
| 51 | 0 | ▶ | $_->{enum}->load() if ($_->{enum} && !$_->{enum}->loaded); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$_->{"enum"} and not $_->{"enum"}->loaded
MC/DC0%0/2
$_->{"enum"} and not $_->{"enum"}->loaded
$_->{"enum"}
not $_->{"enum"}->loaded
Truth table0%0/3
A and not(B)
A= $_->{"enum"}B= not $_->{"enum"}->loaded
| |||||||||||||||||||||||||||||||||||||||||||
| 52 | } | ||||||||||||||||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||||||||||||||||
| 54 | ##-- dump: common: stringification | ||||||||||||||||||||||||||||||||||||||||||
| 55 | 0 | my $pack_t = $coldb->{pack_t}; | |||||||||||||||||||||||||||||||||||||||||
| 56 | 0 | my ($ts2txt,$ti2txt); | |||||||||||||||||||||||||||||||||||||||||
| 57 | 0 | ▶ | if ($export_sdat) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 58 | 0 | $coldb->vlog($coldb->{logExport}, "dbexport(): preparing tuple-stringification structures"); | |||||||||||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||||||||||||
| 60 | 0 | foreach (@$adata) { | |||||||||||||||||||||||||||||||||||||||||
| 61 | 0 | my $i2s = $_->{i2s} = $_->{enum}->toArray; | |||||||||||||||||||||||||||||||||||||||||
| 62 | 0 | ▶ | $_->{i2txt} = sub { return $i2s->[$_[0]//0]//''; }; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
Condition0%0/4
$$i2s[$_[0] // 0] // ""
$_[0] // 0
MC/DC0%0/1
$$i2s[$_[0] // 0] // ""
$$i2s[$_[0] // 0]
MC/DC0%0/1
$_[0] // 0
$_[0]
Truth table0%0/2
A
A= $$i2s[$_[0] // 0]
Truth table0%0/2
A
A= $_[0]
| |||||||||||||||||||||||||||||||||||||||||||
| 63 | } | ||||||||||||||||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||||||||||||||||
| 65 | 0 | my $ti2s = $coldb->{tenum}->toArray; | |||||||||||||||||||||||||||||||||||||||||
| 66 | 0 | my @ai2s = map {$_->{i2s}} @$adata; | |||||||||||||||||||||||||||||||||||||||||
| 67 | 0 | my (@t); | |||||||||||||||||||||||||||||||||||||||||
| 68 | 0 | ▶ | $ts2txt = sub { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||
| 69 | 0 | @t = unpack($pack_t,$_[0]); | |||||||||||||||||||||||||||||||||||||||||
| 70 | 0 | ▶ | return join("\t", (map {$ai2s[$_][$t[$_]//0]//''} (0..$#ai2s))); | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/4
$ai2s[$_][$t[$_] // 0] // ""
$t[$_] // 0
MC/DC0%0/1
$ai2s[$_][$t[$_] // 0] // ""
$ai2s[$_][$t[$_] // 0]
MC/DC0%0/1
$t[$_] // 0
$t[$_]
Truth table0%0/2
A
A= $ai2s[$_][$t[$_] // 0]
Truth table0%0/2
A
A= $t[$_]
| |||||||||||||||||||||||||||||||||||||||||||
| 71 | 0 | }; | |||||||||||||||||||||||||||||||||||||||||
| 72 | 0 | ▶ | $ti2txt = sub { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=5 SCAR=34.0
| |||||||||||||||||||||||||||||||||||||||||||
| 73 | 0 | ▶ | @t = unpack($pack_t, $ti2s->[$_[0]//0]//''); | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/4
$$ti2s[$_[0] // 0] // ""
$_[0] // 0
MC/DC0%0/1
$$ti2s[$_[0] // 0] // ""
$$ti2s[$_[0] // 0]
MC/DC0%0/1
$_[0] // 0
$_[0]
Truth table0%0/2
A
A= $$ti2s[$_[0] // 0]
Truth table0%0/2
A
A= $_[0]
| |||||||||||||||||||||||||||||||||||||||||||
| 74 | 0 | ▶ | return join("\t", (map {$ai2s[$_][$t[$_]//0]//''} (0..$#ai2s))); | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/4
$ai2s[$_][$t[$_] // 0] // ""
$t[$_] // 0
MC/DC0%0/1
$ai2s[$_][$t[$_] // 0] // ""
$ai2s[$_][$t[$_] // 0]
MC/DC0%0/1
$t[$_] // 0
$t[$_]
Truth table0%0/2
A
A= $ai2s[$_][$t[$_] // 0]
Truth table0%0/2
A
A= $t[$_]
| |||||||||||||||||||||||||||||||||||||||||||
| 75 | 0 | }; | |||||||||||||||||||||||||||||||||||||||||
| 76 | } | ||||||||||||||||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||||||||||||||||
| 78 | ##-- dump: tenum: raw | ||||||||||||||||||||||||||||||||||||||||||
| 79 | 0 | $coldb->vlog($coldb->{logExport}, "dbexport(): exporting tuple-enum file $outdir/tenum.dat (raw)"); | |||||||||||||||||||||||||||||||||||||||||
| 80 | 0 | ▶ | $coldb->{tenum}->saveTextFile("$outdir/tenum.dat") | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 81 | or $coldb->logconfess("export failed for $outdir/tenum.dat"); | ||||||||||||||||||||||||||||||||||||||||||
| 82 | |||||||||||||||||||||||||||||||||||||||||||
| 83 | ##-- dump: xenum: stringified | ||||||||||||||||||||||||||||||||||||||||||
| 84 | 0 | ▶ | if ($export_sdat) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 85 | 0 | $coldb->vlog($coldb->{logExport}, "dbexport(): exporting tuple-enum file $outdir/tenum.sdat (strings)"); | |||||||||||||||||||||||||||||||||||||||||
| 86 | 0 | ▶ | $coldb->{tenum}->saveTextFile("$outdir/tenum.sdat", pack_s=>$ts2txt) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 87 | or $coldb->logconfess("dbexport() failed for $outdir/tenum.sdat"); | ||||||||||||||||||||||||||||||||||||||||||
| 88 | } | ||||||||||||||||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||||||||||||||||
| 90 | ##-- dump: by attribute: enum | ||||||||||||||||||||||||||||||||||||||||||
| 91 | 0 | foreach (@$adata) { | |||||||||||||||||||||||||||||||||||||||||
| 92 | ##-- dump: by attribute: enum | ||||||||||||||||||||||||||||||||||||||||||
| 93 | 0 | $coldb->vlog($coldb->{logExport}, "dbexport(): exporting attribute enum file $outdir/$_->{a}_enum.dat"); | |||||||||||||||||||||||||||||||||||||||||
| 94 | 0 | ▶ | $_->{enum}->saveTextFile("$outdir/$_->{a}_enum.dat") | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 95 | or $coldb->logconfess("dbexport() failed for $outdir/$_->{a}_enum.dat"); | ||||||||||||||||||||||||||||||||||||||||||
| 96 | } | ||||||||||||||||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||||||||||||||||
| 98 | ##-- dump: by attribute: a2t | ||||||||||||||||||||||||||||||||||||||||||
| 99 | 0 | foreach (@$adata) { | |||||||||||||||||||||||||||||||||||||||||
| 100 | ##-- dump: by attribute: a2t: raw | ||||||||||||||||||||||||||||||||||||||||||
| 101 | 0 | $coldb->vlog($coldb->{logExport}, "dbexport(): exporting attribute expansion multimap $outdir/$_->{a}_2t.dat (raw)"); | |||||||||||||||||||||||||||||||||||||||||
| 102 | 0 | ▶ | $_->{a2t}->saveTextFile("$outdir/$_->{a}_2t.dat") | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 103 | or $coldb->logconfess("dbexport() failed for $outdir/$_->{a}_2t.dat"); | ||||||||||||||||||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||||||||||||||||
| 105 | ##-- dump: by attribute: a2x: stringified | ||||||||||||||||||||||||||||||||||||||||||
| 106 | 0 | ▶ | if ($export_sdat) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 107 | 0 | $coldb->vlog($coldb->{logExport}, "dbexport(): exporting attribute expansion multimap $outdir/$_->{a}_2t.sdat (strings)"); | |||||||||||||||||||||||||||||||||||||||||
| 108 | 0 | ▶ | $_->{a2t}->saveTextFile("$outdir/$_->{a}_2t.sdat", a2s=>$_->{i2txt}, b2s=>$ti2txt) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 109 | or $coldb->logconfess("dbexport() failed for $outdir/$_->{a}_2t.sdat"); | ||||||||||||||||||||||||||||||||||||||||||
| 110 | } | ||||||||||||||||||||||||||||||||||||||||||
| 111 | } | ||||||||||||||||||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||||||||||||||||
| 113 | ##-- dump: xf | ||||||||||||||||||||||||||||||||||||||||||
| 114 | 0 | ▶ | if ($coldb->{xf}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 115 | ##-- dump: xf: raw | ||||||||||||||||||||||||||||||||||||||||||
| 116 | 0 | $coldb->vlog($coldb->{logExport}, "dbexport(): exporting tuple-frequency index $outdir/xf.dat (raw)"); | |||||||||||||||||||||||||||||||||||||||||
| 117 | 0 | ▶ | $coldb->{xf}->saveTextFile("$outdir/xf.dat") | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 118 | or $coldb->logconfess("export failed for $outdir/xf.dat"); | ||||||||||||||||||||||||||||||||||||||||||
| 119 | |||||||||||||||||||||||||||||||||||||||||||
| 120 | ##-- dump: xf: stringified | ||||||||||||||||||||||||||||||||||||||||||
| 121 | 0 | ▶ | if ($export_sdat) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 122 | 0 | $coldb->vlog($coldb->{logExport}, "dbexport(): exporting tuple-frequency index $outdir/xf.sdat (strings)"); | |||||||||||||||||||||||||||||||||||||||||
| 123 | 0 | ▶ | $coldb->{xf}->saveTextFile("$outdir/xf.sdat", i2s=>$ti2txt) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 124 | or $coldb->logconfess("dbexport() failed for $outdir/xf.sdat"); | ||||||||||||||||||||||||||||||||||||||||||
| 125 | } | ||||||||||||||||||||||||||||||||||||||||||
| 126 | } | ||||||||||||||||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||||||||||||||||
| 128 | ##-- dump: cof | ||||||||||||||||||||||||||||||||||||||||||
| 129 | 0 | ▶ | if ($coldb->{cof} && $export_cof) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$coldb->{"cof"} and $export_cof
MC/DC0%0/2
$coldb->{"cof"} and $export_cof
$coldb->{"cof"}
$export_cof
Truth table0%0/3
A and B
A= $coldb->{"cof"}B= $export_cof
| |||||||||||||||||||||||||||||||||||||||||||
| 130 | 0 | $coldb->vlog($coldb->{logExport}, "dbexport(): exporting co-frequency index $outdir/cof.dat (raw)"); | |||||||||||||||||||||||||||||||||||||||||
| 131 | 0 | ▶ | $coldb->{cof}->saveTextFile("$outdir/cof.dat") | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 132 | or $coldb->logconfess("export failed for $outdir/cof.dat"); | ||||||||||||||||||||||||||||||||||||||||||
| 133 | |||||||||||||||||||||||||||||||||||||||||||
| 134 | 0 | ▶ | if ($export_sdat) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 135 | 0 | $coldb->vlog($coldb->{logExport}, "dbexport(): exporting co-frequency index $outdir/cof.sdat (strings)"); | |||||||||||||||||||||||||||||||||||||||||
| 136 | 0 | ▶ | $coldb->{cof}->saveTextFile("$outdir/cof.sdat", i2s=>$ti2txt) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 137 | or $coldb->logconfess("export failed for $outdir/cof.sdat"); | ||||||||||||||||||||||||||||||||||||||||||
| 138 | } | ||||||||||||||||||||||||||||||||||||||||||
| 139 | } | ||||||||||||||||||||||||||||||||||||||||||
| 140 | |||||||||||||||||||||||||||||||||||||||||||
| 141 | ##-- dump: tdf | ||||||||||||||||||||||||||||||||||||||||||
| 142 | 0 | ▶ | if ($coldb->{tdf} && $coldb->{index_tdf} && $export_tdf) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$coldb->{"tdf"} and $coldb->{"index_tdf"} and $export_tdf
$coldb->{"tdf"} and $coldb->{"index_tdf"}
MC/DC0%0/3
$coldb->{"tdf"} and $coldb->{"index_tdf"} and $export_tdf
$coldb->{"tdf"}
$coldb->{"index_tdf"}
$export_tdf
Truth table0%0/4
A and B and C
A= $coldb->{"tdf"}B= $coldb->{"index_tdf"}C= $export_tdf
| |||||||||||||||||||||||||||||||||||||||||||
| 143 | 0 | $coldb->vlog($coldb->{logExport}, "dbexport(): exporting term-document index $outdir/tdf.*"); | |||||||||||||||||||||||||||||||||||||||||
| 144 | 0 | ▶ | $coldb->{tdf}->export("$outdir/tdf", $coldb) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 145 | or $coldb->logconfess("export failed for $outdir/tdf.*"); | ||||||||||||||||||||||||||||||||||||||||||
| 146 | } | ||||||||||||||||||||||||||||||||||||||||||
| 147 | |||||||||||||||||||||||||||||||||||||||||||
| 148 | ##-- all done | ||||||||||||||||||||||||||||||||||||||||||
| 149 | 0 | $coldb->vlog($coldb->{logExport}, "dbexport(): export to $outdir complete."); | |||||||||||||||||||||||||||||||||||||||||
| 150 | 0 | return $coldb; | |||||||||||||||||||||||||||||||||||||||||
| 151 | } | ||||||||||||||||||||||||||||||||||||||||||
| 152 | |||||||||||||||||||||||||||||||||||||||||||
| 153 | ## $coldb = $coldb->dbimport() | ||||||||||||||||||||||||||||||||||||||||||
| 154 | ## $coldb = $coldb->dbimport($txtdir,%opts) | ||||||||||||||||||||||||||||||||||||||||||
| 155 | ## + import ColocDB data from $txtdir | ||||||||||||||||||||||||||||||||||||||||||
| 156 | ## + TODO | ||||||||||||||||||||||||||||||||||||||||||
| 157 | 0 | ▶ | sub dbimport { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
dbimport: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 158 | 0 | my ($coldb,$txtdir,%opts) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 159 | 0 | ▶ | $coldb = $coldb->new() if (!ref($coldb)); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 160 | 0 | $coldb->logconfess("dbimport(): not yet implemented"); | |||||||||||||||||||||||||||||||||||||||||
| 161 | } | ||||||||||||||||||||||||||||||||||||||||||
| 162 | |||||||||||||||||||||||||||||||||||||||||||
| 163 | |||||||||||||||||||||||||||||||||||||||||||
| 164 | 1 | 1; ##-- be happy | |||||||||||||||||||||||||||||||||||||||||