Patch level : 2.0 668
Files correlati : ef0 Ricompilazione Demo : [ ] Commento : GF20117 La stampa cartacea della distinta ordinata per scadenze non funziona più. Così come anche la relativa stampa di controllo per distinte. git-svn-id: svn://10.65.10.50/trunk@11707 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0007dd0423
commit
306f8356ab
@ -526,9 +526,19 @@ void TFile_cache::test_firm()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if (_limit > 0 && items() > _limit)
|
if (_limit > 0 && items() > _limit)
|
||||||
flush_needed = TRUE;
|
flush_needed = TRUE; // Perche' buttare via tutto?
|
||||||
|
*/
|
||||||
|
|
||||||
|
//
|
||||||
|
if (_limit > 0 && items() > _limit)
|
||||||
|
{
|
||||||
|
const THash_object* rand = _cache.random_hash_object();
|
||||||
|
if (rand != NULL)
|
||||||
|
discard(rand->key()); // Butta via un elemento a caso per fare posto
|
||||||
|
}
|
||||||
|
|
||||||
if (flush_needed)
|
if (flush_needed)
|
||||||
{
|
{
|
||||||
flush();
|
flush();
|
||||||
@ -610,7 +620,7 @@ bool TFile_cache::discard(const char* victim)
|
|||||||
{
|
{
|
||||||
if (victim && *victim)
|
if (victim && *victim)
|
||||||
return _cache.remove(victim);
|
return _cache.remove(victim);
|
||||||
destroy();
|
// destroy(); // ???
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1731,17 +1731,18 @@ TRecnotype TSorted_cursor::buildcursor(TRecnotype rp)
|
|||||||
{
|
{
|
||||||
check_expr(s); // Toglie l'eventuale operatore UPPER(), in modo che l'ultimo carattere
|
check_expr(s); // Toglie l'eventuale operatore UPPER(), in modo che l'ultimo carattere
|
||||||
// indichi eventualmente la direzione dell'ordinamento
|
// indichi eventualmente la direzione dell'ordinamento
|
||||||
char versus = (s.right(1)=="-") ? 'd' : 'a';
|
const char last = s.right(1)[0];
|
||||||
if (s.right(1) == "-" || s.right(1) == "+")
|
const char versus = (last=='-') ? 'd' : 'a';
|
||||||
|
if (last == '-' || last == '+')
|
||||||
s.rtrim(1);
|
s.rtrim(1);
|
||||||
TFieldref f(s,0);
|
TFieldref f(s,0);
|
||||||
// Il controllo del file e' automatico in f.len()
|
// Il controllo del file e' automatico in f.len()
|
||||||
const int n = f.file();
|
const int n = f.file();
|
||||||
const int flen = f.len(relation()->curr(n));
|
const TRectype& r = relation()->curr(n);
|
||||||
|
const int flen = f.len(r);
|
||||||
sort.addsortkey(abspos,flen,versus);
|
sort.addsortkey(abspos,flen,versus);
|
||||||
CHECKS(flen!=0,"Field can not have null length: ",(const char *) s);
|
CHECKS(flen!=0,"Field can not have null length: ",(const char *) s);
|
||||||
|
|
||||||
const TRectype& r = relation()->curr(n);
|
|
||||||
abspos += flen;
|
abspos += flen;
|
||||||
CHECKD(abspos<=256, "Sort key too long: ", abspos);
|
CHECKD(abspos<=256, "Sort key too long: ", abspos);
|
||||||
}
|
}
|
||||||
@ -1767,11 +1768,9 @@ TRecnotype TSorted_cursor::buildcursor(TRecnotype rp)
|
|||||||
break; // means that no more keys are available
|
break; // means that no more keys are available
|
||||||
|
|
||||||
oldrecno=recno;
|
oldrecno=recno;
|
||||||
bool to_be_added = TRUE;
|
|
||||||
|
|
||||||
if (filtered)
|
// Attenzione: la filtercursor non si silita a filtrare ma avanza anche il cursore!!!!
|
||||||
to_be_added = filtercursor(recno);
|
const bool to_be_added = filtercursor(recno);
|
||||||
|
|
||||||
if (to_be_added)
|
if (to_be_added)
|
||||||
{
|
{
|
||||||
El_To_Sort Element;
|
El_To_Sort Element;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user