Cursor.FindSingleValue
Ivan Smahin
ivan_smahin at paradigmasoft.com
Tue Dec 29 04:36:30 CST 2009
Hello Thomas,
Tuesday, December 29, 2009, 11:54:25 AM, you wrote:
> Hi Ivan,
>> vCursor1.put_RecID( RecID_Of_Cursor2 );
> Yes, this would be perfect, I was already looking for this.
> but unfortunally something like this is not in VNET 4.3
> Or am I missing something?
Well there is another way. Probably even faster one.
There is a method VCursor::ToArraySet() which produces
set of original recIDs.
You may do it once -
pSet = vCursor1.ToArraySet();
Then you know how to get an recID using the second cursor.
And you need only find an appropriate position in arrayset for
particular recID.
In C++ it should be as simple as
ArraySet_Ptr pSet = pCur->ToArraySet();
vuint32 pos = pSet->FindIndex( inRecID );
But probably FindIndex() is not implemented for VNET.
Anyway you may get a set iterator (probably you may even sort this set by
RecID first - for speeding up searching - see documentation)
and then looking for position with set iterator.
The only pitfall is an additional memory for that arrayset.
--
Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com
More information about the Valentina
mailing list