2015-03-03 16:26 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/rddads/ads1.c
! use AdsSetLongLong() (if available) instead of AdsSetDouble() to not
strip less significant bits from 64bit integer number during conversion
to double
* allow ADS to decide if writing into rowver and modtime fields is legal
instead of generating our own arbitrary RTE
* include/dbinfo.ch
* src/rdd/workarea.c
+ added new dbInfo() action DBI_TRANSREC
It indicates if area is destination table of currently processed COPY TO
or APPEND FROM operation.
* include/hbapirdd.h
* src/rdd/wafunc.c
+ added new C function:
HB_ERRCODE hb_dbTransCounters( LPDBTRANSINFO lpdbTransInfo );
It copies field counters from source into destination table used
in transfer operation.
* src/rdd/dbcmd.c
* src/rdd/wafunc.c
+ call DBI_TRANSREC to inform destination area that record transfer
operation starts and stop. It allows destination RDD to change
rules used for assign to automatically updated fields, i.e. unblock
such operation.
+ call hb_dbTransCounters() to update counters in destination table
after COPY TO operation
* src/rdd/sdf1.c
* src/rdd/delim1.c
* clear AutoInc flag
* src/rdd/dbf1.c
+ allow to set get and set counter for RowVer fields using DBS_COUNTER
action
* return HB_FAILURE for DBS_COUNTER and DBS_STEP if it's not supported
by given field.
+ added support for DBI_TRANSREC - in case of DBF* RDDs it unblocks
writing to automatically updated fields
This commit is contained in:
@@ -292,6 +292,7 @@
|
||||
#define DBI_ISTEMPORARY 145 /* Is the table a temporary one? */
|
||||
#define DBI_LOCKTEST 146 /* record / file lock test */
|
||||
#define DBI_CODEPAGE 147 /* Codepage used */
|
||||
#define DBI_TRANSREC 148 /* Is it destination table of currently processed COPY TO or APPEND FROM operation? */
|
||||
|
||||
/* RECORD MAP (RM) support */
|
||||
#define DBI_RM_SUPPORTED 150 /* has WA RDD record map support? */
|
||||
|
||||
@@ -1207,6 +1207,7 @@ extern HB_EXPORT HB_ERRCODE hb_rddCreateTableTemp(
|
||||
const char * szAlias,
|
||||
const char * szCpId, HB_ULONG ulConnection,
|
||||
PHB_ITEM pStruct );
|
||||
extern HB_EXPORT HB_ERRCODE hb_dbTransCounters( LPDBTRANSINFO lpdbTransInfo );
|
||||
extern HB_EXPORT HB_ERRCODE hb_dbTransStruct(
|
||||
AREAP lpaSource, AREAP lpaDest,
|
||||
LPDBTRANSINFO lpdbTransInfo,
|
||||
|
||||
@@ -233,6 +233,7 @@ typedef struct _DBFAREA
|
||||
HB_BOOL fFLocked; /* HB_TRUE if file is locked */
|
||||
HB_BOOL fHeaderLocked; /* HB_TRUE if DBF header is locked */
|
||||
HB_BOOL fPackMemo; /* Pack memo file in pack operation */
|
||||
HB_BOOL fTransRec; /* HB_TRUE if records are transfered to this area, allow to change autoupdate fields and disable their initialization */
|
||||
HB_BOOL fTrigger; /* Execute trigger function */
|
||||
LPDBOPENINFO lpdbOpenInfo; /* Pointer to current dbOpenInfo structure in OPEN/CREATE methods */
|
||||
LPDBRELINFO lpdbPendingRel; /* Pointer to parent rel struct */
|
||||
|
||||
Reference in New Issue
Block a user