Ho tolto la ricerca incrementale nei casi difficili (chiavi composte)

HO scelto il nome del file indice dei cursori al momento del loro utilizzo.


git-svn-id: svn://10.65.10.50/trunk@430 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1994-10-20 13:32:24 +00:00
parent d8283b4f7b
commit 5b160aa49d
5 changed files with 19 additions and 12 deletions

View File

@ -1,4 +1,4 @@
// $Id: maskfld.cpp,v 1.33 1994-10-19 15:00:23 guy Exp $
// $Id: maskfld.cpp,v 1.34 1994-10-20 13:32:15 guy Exp $
#include <xvt.h>
#include <applicat.h>
@ -1411,7 +1411,9 @@ KEY TBrowse::run()
KEY k = K_ESC;
long selected = 0;
TToken_string siblings; create_siblings(siblings);
TToken_string siblings;
if (_inp_id.items() == 1)
create_siblings(siblings);
{
TToken_string* sib = siblings.empty() ? NULL : &siblings;

View File

@ -1 +1 @@
#define VERSION 1.11
#define VERSION 1.11

View File

@ -1,4 +1,4 @@
// $Id: relapp.cpp,v 1.17 1994-10-19 11:49:19 alex Exp $
// $Id: relapp.cpp,v 1.18 1994-10-20 13:32:20 guy Exp $
#include <mailbox.h>
#include <sheet.h>
#include <urldefid.h>
@ -727,7 +727,7 @@ bool TRelation_application::main_loop()
}
break;
case K_INS:
if (_mask->query_mode() || _mask->save(TRUE))
if (_mask->query_mode() || save(FALSE))
insert_mode();
break;
case K_DEL:

View File

@ -1,4 +1,4 @@
// $Id: relation.cpp,v 1.18 1994-10-17 11:41:09 alex Exp $
// $Id: relation.cpp,v 1.19 1994-10-20 13:32:22 guy Exp $
// relation.cpp
// fv 12/8/93
// relation class for isam files
@ -649,7 +649,7 @@ HIDDEN bool __evalcondition(const TRectype& r,TExpression* cond)
return (bool) *cond;
}
FILE* TCursor::open_index(bool create) const
FILE* TCursor::open_index(bool create)
{
#if XVT_OS == XVT_OS_SCOUNIX
const char* const r = "r";
@ -659,6 +659,11 @@ FILE* TCursor::open_index(bool create) const
const char* const w = "wb";
#endif
if (create)
{
CHECKS(_indexname.empty(), "Can't rename cursor index ", (const char*)_indexname);
_indexname.temp("ci$$");
}
FILE* f = fopen(_indexname, create ? w : r);
if (f == NULL)
fatal_box("Can't use cursor index for file %d: '%s'\n",
@ -951,7 +956,6 @@ TCursor::TCursor(TRelation* r, const char* filter, int nkey, TRectype *from, TRe
_if = r;
_nkey = nkey;
CHECKD(_nkey > 0 && _nkey <= file().filehnd()->r->NKeys, "Bad key number : ", _nkey);
_indexname.temp("ci");
_pos = 0;
_totrec = 0;
@ -995,7 +999,8 @@ TCursor::TCursor(TRelation* r, const char* filter, int nkey, TRectype *from, TRe
TCursor::~TCursor()
{
::remove(_indexname);
if (_indexname.not_empty())
::remove(_indexname);
if (_fexpr) delete _fexpr;
}

View File

@ -1,4 +1,4 @@
/* $Id: relation.h,v 1.7 1994-09-27 10:19:34 alex Exp $ */
/* $Id: relation.h,v 1.8 1994-10-20 13:32:24 guy Exp $ */
// join.h
// fv 12/8/93
// join class for isam files
@ -171,7 +171,7 @@ class TCursor : public TObject
int filtercursor(int pagecnt, TRecnotype* page);
bool changed();
FILE* open_index(bool create = FALSE) const;
FILE* open_index(bool create = FALSE);
TRecnotype update();
@ -241,7 +241,7 @@ class TFieldref : public TObject
// @DPRIV
short _fileid; // Numero del file
TString16 _id; // Nome tabella o stringa col numero del file
TString16 _name; // Nome del campo
TString80 _name; // Nome del campo
int _from, _to; // Substring
protected: