Patch level : 4.0 582

Files correlati     :  ve8.exe
Ricompilazione Demo : [ ]
Commento            :

Nella ricezione da galileo si devono esportare nel file di testo solo i record modificati


git-svn-id: svn://10.65.10.50/trunk@14707 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2007-01-03 14:22:38 +00:00
parent 75ab480d62
commit 31ad7d6321
2 changed files with 9 additions and 5 deletions

View File

@ -3029,6 +3029,7 @@ int TSystemisamfile::dump(
int TSystemisamfile::dump(
const char* to, // @parm Nome del file verso quale esportare
TToken_string & field_list, // @parm Lista dei campi
TAssoc_array * keys, // @parm lista delle chiavi primarie da esportare
int nkey, // @parm Numero della chiave di ordinamento con cui scaricare i dati (defualt 1)
char fs, // @parm Carattere seperatore di campo (defualt <pipe>)
char fd, // @parm Carattere delimitatore di campo (default '\\0')
@ -3096,21 +3097,24 @@ int TSystemisamfile::dump(
setkey(nkey);
for ( first(); status() == NOERR && !p.iscancelled(); next(), i++)
{
p.setstatus(i + 1);
bool skip = false;
p.setstatus(i + 1);
if (filter && *filter)
{
TToken_string filter_str(filter);
TString16 fname;
bool skip = false;
while (!skip && !(fname=filter_str.get()).empty())
{
const char* fval = filter_str.get();
const TString& cmp = get(fname);
skip = cmp != fval;
}
if (skip)
continue;
}
skip |= (keys != NULL) && (keys->objptr(curr().build_key(1)) == NULL);
if (skip)
continue;
s = "";
FOR_EACH_ARRAY_ROW(fld, j, el)
{

View File

@ -616,7 +616,7 @@ public:
// @cmember Esporta VERSO un file ascii.
int dump(const char* to, int nkey = 1, char fs = '|', char fd = '\0', char rs = '\n', bool vis = true, bool withdeleted = false, const char * filter = NULL);
int dump(const char* to, TToken_string & field_list, int nkey = 1, char fs = '|', char fd = '\0', char rs = '\n', bool vis = true, bool withdeleted = false, const char * filter = NULL);
int dump(const char* to, TToken_string & field_list, TAssoc_array * keys = NULL, int nkey = 1, char fs = '|', char fd = '\0', char rs = '\n', bool vis = true, bool withdeleted = false, const char * filter = NULL);
virtual word class_id() const { return CLASS_SYSTEMISAMFILE; }
virtual bool is_kind_of(word id) const { return id == class_id() || TIsamfile::is_kind_of(id); }