DateTimes, LLongs and other 8-byte fields.
Ruslan Zasukhin
sunshine at public.kherson.ua
Thu Nov 17 10:26:25 CST 2005
On 11/17/05 9:28 AM, "Ed Kleban" <Ed at Kleban.com> wrote:
Hi Ed,
> I see that there are casting functions for the VCursor class, which I
> understand are for moving values between a Cursor and a Table's Vfields.
Mmmmm actually this is to write one line of code instead of 2
fldLong = curs.Longfield( I )
vs
fld = curs.field( I )
fldLong = Vlong( fld )
> But what I don't find are any functions to assist with getting 8-byte values
> into and out of RB variables.
Moment. FYI.
REALbasic send/get to plugin always int = 4 bytes
IF you put this into Valentina's Vbyte field, then on disk will be use ONE
byte only
> For example, How do I get the high vs low four bytes of an LLong or ULong
> field? The only mechanism I see for this is GetString an SetString, which
> is a bit perplexing. I use Valentina to do a super fast lookup of my data
> to get it into a current Table record or into a Cursor, but then I have to
> convert a binary value to a string which I then have to chop up with string
> operations and convert back to a binary value to use?
>
> Yuck! ... or am I missing something here?
I have not catch yet what you want
> How about some numeric accessor methods for VFields in general, or at least
> the 8-byte fields specifically:
> rbIntVar = aVULongField.highLong
> rbIntVar = aVULongField.lowLong
> rbIntVar = aVLongField.hightLong
> rbIntVar = aVLongField.lowLong
Not agree.
We give you 8 bytes, which we have extract from Table.
You self can get any bit as you want using YOUR language.
If REALbasic is not able do this, I think exists plugins which can.
IT is not Valentina task split to bits
> Admittedly, most or all of these will be moving an unsigned 32-bit value
> into what RB would treat as a signed integer, but at least we could rapidly
> read and then "do the math" on binary values without having to go through
> strings.
>
> And who knows... considering all the database announcements coming out of
> REALsoftware, someday they might eventually implement size and
> representation specific variables such as Int8, Int16, Int32, UInt8, UInt16,
> and UInt32, and Byte; then you wouldn't even have to do messy math.
>
> Heck, they may even implement Int64 and UInt64 someday in which case you
> could read, use, compare, and write the whole sucker directly.
>
> Also, for dates and times:
>
> rbDateVar = aVDateTimeField.rbDateValue
> aVDateTimeField.setFromRbDateValue( rbDateValue )
Yes we going add support of RB Date
> By the way... If it should happen that in some distant year in the future
> that the REALfolk did indeed implement variables such as Int8, Int16, Int32,
> UInt8, UInt16, and UInt32, Byte, Int64 and UInt64 in the language, what
> other advantages could Valentina make of such an addition?
Just we will return you this types :-)
Although you right now can use UNSIGNED fields.
Problem is that YOU in RB cannot reach top bit to get correct range
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list