Patch level : 12.0 1090
Files correlati : bs0.exe Commento : aggiunto un meccanismo di trace nell'importazione bee store Interno:
This commit is contained in:
parent
2d73b980f0
commit
754aeb32a3
@ -370,9 +370,7 @@ bool TTransaction::set(
|
||||
const char* rowkey = build_rowkey(table, row);
|
||||
TAssoc_array * row_data = (TAssoc_array *)_rows.objptr(rowkey);
|
||||
|
||||
if (_executer.blank())
|
||||
_executer = table;
|
||||
if (row_data == nullptr)
|
||||
if (row_data == nullptr)
|
||||
_rows.add(rowkey, row_data = new TAssoc_array, true);
|
||||
if (row_data != nullptr)
|
||||
{
|
||||
@ -492,7 +490,10 @@ bool TTransaction::read_ini()
|
||||
int index = get_varkey_index(key);
|
||||
TString name = get_varkey_name(key);
|
||||
|
||||
set(name, cnf.get(name, *para, index), index, table, row);
|
||||
if (name == "Executer")
|
||||
_executer = cnf.get(name, *para);
|
||||
else
|
||||
set(name, cnf.get(name, *para, index), index, table, row);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@ -537,6 +538,9 @@ bool TTransaction::read_xml()
|
||||
int index = get_varkey_index(*str);
|
||||
TString name = get_varkey_name(*str);
|
||||
|
||||
if (name == "Executer")
|
||||
_executer = child_row->GetAttr(*str);
|
||||
else
|
||||
set(name, child_row->GetAttr(*str), index, logicnum, row);
|
||||
}
|
||||
}
|
||||
@ -575,6 +579,7 @@ bool TTransaction::write_ini()
|
||||
|
||||
_head.get_keys(arr);
|
||||
cnf.set("Version", "2.0");
|
||||
cnf.set("Executer", _executer);
|
||||
FOR_EACH_ARRAY_ROW(arr, r, str)
|
||||
{
|
||||
int index = get_varkey_index(*str);
|
||||
@ -624,6 +629,7 @@ bool TTransaction::write_xml()
|
||||
TXmlItem & child = xml.AddChild("Transaction");
|
||||
_head.get_keys(arr);
|
||||
child.AddEnclosedText("Version", "2.0");
|
||||
child.AddEnclosedText("Executer", _executer);
|
||||
FOR_EACH_ARRAY_ROW(arr, r, str)
|
||||
child.AddEnclosedText(*str, *((TString *)_head.objptr(*str)));
|
||||
_rows.get_keys(row_arr);
|
||||
@ -740,9 +746,14 @@ void execute_transactions(TArray & transactions, TLog_report & log, bool interac
|
||||
while (true)
|
||||
{
|
||||
int i = first;
|
||||
TTransaction t = (TTransaction &)transactions[i];
|
||||
TString table = t.executer();
|
||||
TString table = ((TTransaction &)transactions[i]).executer();
|
||||
int logicnum = atoi(table);
|
||||
TFilename pref = ((TTransaction &)transactions[i]).name();
|
||||
TString ext = ((TTransaction &)transactions[i]).ext();
|
||||
|
||||
pref.ext("");
|
||||
while (isdigit(pref[pref.len() - 1]))
|
||||
pref.rtrim(1);
|
||||
|
||||
while (processed[i])
|
||||
i++;
|
||||
@ -750,16 +761,12 @@ void execute_transactions(TArray & transactions, TLog_report & log, bool interac
|
||||
break;
|
||||
if (table.full())
|
||||
{
|
||||
TFilename pref = t.name();
|
||||
|
||||
pref.ext("");
|
||||
while (isdigit(pref[pref.len() - 1]))
|
||||
pref.rtrim(1);
|
||||
|
||||
int totalTransaction = 0;
|
||||
|
||||
while (i >= 0)
|
||||
{
|
||||
TTransaction &t = (TTransaction &)transactions[i];
|
||||
|
||||
TRACE("Salvataggio registrazione %d - %s = %s %s starts with %s", i , (const char*)t.executer(), (const char*)table, (const char*)t.name(), (const char*)pref);
|
||||
if (t.executer() == table && t.name().starts_with(pref))
|
||||
{
|
||||
@ -773,7 +780,6 @@ void execute_transactions(TArray & transactions, TLog_report & log, bool interac
|
||||
i++;
|
||||
if (i > last)
|
||||
break;
|
||||
t = (TTransaction &)transactions[i];
|
||||
}
|
||||
TString app;
|
||||
|
||||
@ -784,7 +790,7 @@ void execute_transactions(TArray & transactions, TLog_report & log, bool interac
|
||||
TFilename filemask(pref);
|
||||
TString_array files;
|
||||
|
||||
filemask << "*" << "." << t.ext();
|
||||
filemask << "*" << "." << ext;
|
||||
app << (interactive ? " -i" : " -b") << filemask;
|
||||
if (prog_msg.full())
|
||||
app << " -m\"" << prog_msg << "\"";
|
||||
@ -821,7 +827,7 @@ void execute_transactions(TArray & transactions, TLog_report & log, bool interac
|
||||
{
|
||||
TString msg(TR("Esecutore sconosciuto per le transazioni sul file "));
|
||||
|
||||
msg << (logicnum == 0) ? t.executer() : prefix().description(logicnum);
|
||||
msg << (logicnum == 0) ? table : prefix().description(logicnum);
|
||||
log.log(2, msg);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user