2002-11-21 12:05 UTC+0300 Alexander Kresin <alex@belacy.belgorod.su>
This commit is contained in:
@@ -7,6 +7,16 @@
|
||||
For example:
|
||||
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2002-11-21 12:05 UTC+0300 Alexander Kresin <alex@belacy.belgorod.su>
|
||||
* source/rdd/dbfntx/dbfntx1.c
|
||||
* DBOI_ORDERCOUNT is supported now
|
||||
* hb_stackPop() is added in ntxOrderCreate()
|
||||
* contrib/rdd_ads/ads1.c
|
||||
* adsOrderCreate() created indexes as if ADDITIVE clause is specified, even
|
||||
it was absent - is fixed now.
|
||||
adsOrderCreate() respects current order if WHILE clause is specified
|
||||
|
||||
2002-11-20 22:00 UTC-0300 Luiz Rafael Culik <culikr@uol.com.br>
|
||||
* utils/hbmake/hbmake.prg
|
||||
utils/hbmake/hbmlang.c
|
||||
|
||||
@@ -1943,6 +1943,10 @@ static ERRCODE adsOrderCreate( ADSAREAP pArea, LPDBORDERCREATEINFO pOrderInfo )
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("adsOrderCreate(%p, %p)", pArea, pOrderInfo));
|
||||
|
||||
if( !pArea->lpdbOrdCondInfo || ( pArea->lpdbOrdCondInfo->fAll &&
|
||||
!pArea->lpdbOrdCondInfo->fAdditive ) )
|
||||
SELF_ORDLSTCLEAR( ( AREAP ) pArea );
|
||||
|
||||
if( !pOrderInfo->abBagName || *(pOrderInfo->abBagName) == '\0' )
|
||||
ulOptions = ADS_COMPOUND;
|
||||
else
|
||||
@@ -1999,6 +2003,8 @@ static ERRCODE adsOrderCreate( ADSAREAP pArea, LPDBORDERCREATEINFO pOrderInfo )
|
||||
}
|
||||
else
|
||||
strcat( (char * ) pucWhile, (char * ) pArea->lpdbOrdCondInfo->abWhile );
|
||||
if ( pArea->hOrdCurrent )
|
||||
hTableOrIndex = pArea->hOrdCurrent;
|
||||
}
|
||||
|
||||
if ( pArea->lpdbOrdCondInfo )
|
||||
@@ -2023,6 +2029,20 @@ static ERRCODE adsOrderCreate( ADSAREAP pArea, LPDBORDERCREATEINFO pOrderInfo )
|
||||
}else
|
||||
pArea->hOrdCurrent = phIndex;
|
||||
|
||||
if( pArea->lpdbOrdCondInfo && !pArea->lpdbOrdCondInfo->fAll &&
|
||||
!pArea->lpdbOrdCondInfo->fAdditive )
|
||||
{
|
||||
ADSHANDLE ahIndex[50];
|
||||
UNSIGNED16 pusArrayLen = 50;
|
||||
|
||||
SELF_ORDLSTCLEAR( ( AREAP ) pArea );
|
||||
ulRetVal = AdsOpenIndex( pArea->hTable,
|
||||
(UNSIGNED8*) pOrderInfo->abBagName, ahIndex, &pusArrayLen );
|
||||
if( ulRetVal != AE_SUCCESS && ulRetVal != AE_INDEX_ALREADY_OPEN)
|
||||
return FAILURE;
|
||||
pArea->hOrdCurrent = ahIndex[0];
|
||||
}
|
||||
|
||||
return adsGoTop( pArea );
|
||||
}
|
||||
|
||||
@@ -2517,7 +2537,7 @@ static ERRCODE adsSetFilter( ADSAREAP pArea, LPDBFILTERINFO pFilterInfo )
|
||||
static ERRCODE adsSetScope( ADSAREAP pArea, LPDBORDSCOPEINFO sInfo )
|
||||
{
|
||||
UNSIGNED16 usDataType = ADS_STRINGKEY ;
|
||||
BOOL bTypeError ;
|
||||
/* BOOL bTypeError ; */
|
||||
UNSIGNED8 *pucScope;
|
||||
HB_TRACE(HB_TR_DEBUG, ("adsSetScope(%p, %p)", pArea, sInfo));
|
||||
|
||||
@@ -2534,7 +2554,7 @@ static ERRCODE adsSetScope( ADSAREAP pArea, LPDBORDSCOPEINFO sInfo )
|
||||
case ADS_STRING:
|
||||
if ( sInfo->scopeValue->type == HB_IT_STRING )
|
||||
{
|
||||
bTypeError = FALSE;
|
||||
/* bTypeError = FALSE; */
|
||||
pucScope = (UNSIGNED8*) hb_itemGetCPtr( sInfo->scopeValue );
|
||||
AdsSetScope( pArea->hOrdCurrent, (sInfo->nScope + 1), /*ADS top/bottom are 1,2 instead of 0,1*/
|
||||
(UNSIGNED8*) pucScope,
|
||||
@@ -2547,7 +2567,7 @@ static ERRCODE adsSetScope( ADSAREAP pArea, LPDBORDSCOPEINFO sInfo )
|
||||
if ( sInfo->scopeValue->type & HB_IT_NUMERIC )
|
||||
{
|
||||
double dTemp;
|
||||
bTypeError = FALSE;
|
||||
/* bTypeError = FALSE; */
|
||||
dTemp = hb_itemGetND( sInfo->scopeValue );
|
||||
usDataType = ADS_DOUBLEKEY ;
|
||||
AdsSetScope( pArea->hOrdCurrent, (sInfo->nScope + 1), /*ADS top/bottom are 1,2 instead of 0,1*/
|
||||
@@ -2561,7 +2581,7 @@ static ERRCODE adsSetScope( ADSAREAP pArea, LPDBORDSCOPEINFO sInfo )
|
||||
if ( sInfo->scopeValue->type == HB_IT_DATE )
|
||||
{
|
||||
double dTemp;
|
||||
bTypeError = FALSE;
|
||||
/* bTypeError = FALSE; */
|
||||
dTemp = hb_itemGetDL( sInfo->scopeValue ) ;
|
||||
usDataType = ADS_DOUBLEKEY ;
|
||||
AdsSetScope( pArea->hOrdCurrent, (sInfo->nScope + 1),
|
||||
|
||||
@@ -3463,6 +3463,7 @@ static ERRCODE ntxOrderCreate( NTXAREAP pArea, LPDBORDERCREATEINFO pOrderInfo )
|
||||
hb_macroRun( pExpMacro );
|
||||
pResult = pExpr;
|
||||
hb_itemCopy( pResult, &hb_stack.Return );
|
||||
hb_stackPop();
|
||||
}
|
||||
|
||||
uiType = hb_itemType( pResult );
|
||||
@@ -3553,6 +3554,7 @@ static ERRCODE ntxOrderCreate( NTXAREAP pArea, LPDBORDERCREATEINFO pOrderInfo )
|
||||
hb_macroRun( pForMacro );
|
||||
pResult = pExpr;
|
||||
hb_itemCopy( pResult, &hb_stack.Return );
|
||||
hb_stackPop();
|
||||
}
|
||||
uiType = hb_itemType( pResult );
|
||||
if( uiType != HB_IT_LOGICAL )
|
||||
@@ -3739,6 +3741,23 @@ static ERRCODE ntxOrderInfo( NTXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pInfo
|
||||
{
|
||||
}
|
||||
break;
|
||||
case DBOI_ORDERCOUNT:
|
||||
if( pInfo->atomBagName && (char*) hb_itemGetCPtr( pInfo->atomBagName ))
|
||||
{
|
||||
hb_itemPutNL( pInfo->itmResult, 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
LPTAGINFO current = pArea->lpNtxTag;
|
||||
int i = 0;
|
||||
do
|
||||
{
|
||||
i ++;
|
||||
current = current->pNext;
|
||||
} while( current );
|
||||
hb_itemPutNL( pInfo->itmResult, i );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -3763,6 +3782,9 @@ static ERRCODE ntxOrderInfo( NTXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pInfo
|
||||
case DBOI_SCOPEBOTTOMCLEAR :
|
||||
hb_itemClear( pInfo->itmResult );
|
||||
break;
|
||||
case DBOI_ORDERCOUNT:
|
||||
hb_itemPutNL( pInfo->itmResult, 0 );
|
||||
break;
|
||||
default:
|
||||
hb_itemPutC( pInfo->itmResult, "" );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user