Modifica a TSorted_cursor::buildcursor() per far si' che accetti
anche gli alias. (es. 216@->RAGSOC). git-svn-id: svn://10.65.10.50/trunk@2542 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
826499de7f
commit
5e3950f072
@ -1,4 +1,4 @@
|
|||||||
// $Id: relation.cpp,v 1.74 1995-12-29 12:09:00 andrea Exp $
|
// $Id: relation.cpp,v 1.75 1996-01-30 15:59:31 angelo Exp $
|
||||||
// relation.cpp
|
// relation.cpp
|
||||||
// fv 12/8/93
|
// fv 12/8/93
|
||||||
// relation class for isam files
|
// relation class for isam files
|
||||||
@ -1377,10 +1377,11 @@ TRecnotype TSorted_cursor::buildcursor(TRecnotype rp)
|
|||||||
s.cut(s.len()-1);
|
s.cut(s.len()-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()
|
||||||
int flen = f.len(relation()->curr());
|
int n = f.file();
|
||||||
|
int flen = f.len(n<0 ? relation()->lfile(n).curr() : relation()->curr());
|
||||||
_sort->addsortkey(abspos+f.from(),flen,versus);
|
_sort->addsortkey(abspos+f.from(),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);
|
||||||
int lf = (f.file()!=0 ? f.file() : file().num());
|
int lf = (relation()->lfile(n).num());
|
||||||
TRectype r(lf);
|
TRectype r(lf);
|
||||||
abspos+=r.length(f.name());
|
abspos+=r.length(f.name());
|
||||||
CHECKD(abspos<=512,"Cannot exceed 512 bytes-key %d",abspos);
|
CHECKD(abspos<=512,"Cannot exceed 512 bytes-key %d",abspos);
|
||||||
@ -1728,7 +1729,7 @@ int TFieldref::len(TRectype &rec) const
|
|||||||
{
|
{
|
||||||
if (_to >= 0)
|
if (_to >= 0)
|
||||||
return _to - _from;
|
return _to - _from;
|
||||||
if (_fileid == 0)
|
if (_fileid <= 0)
|
||||||
return rec.length(_name) - _from;
|
return rec.length(_name) - _from;
|
||||||
|
|
||||||
const TRectype r(_fileid);
|
const TRectype r(_fileid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user