Unusual behaviour [Valentina with LIVECODE API, Bitset/Array Set conversions]

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Sat Jun 23 02:10:22 CDT 2012


On 6/22/12 9:54 AM, "wtng" <wtng at pacific.net.sg> wrote:

Hi Wee,

> Ruslan/ Kirill,
> 
> Ruslan, yes I use the SQL way most of the time and work with the cursor.
> However, I am testing to see if certain queries have better performance if I
> use the API way.  That's why I am testing the BitSet/ArraySet functions.
> BTW, Valentina is a very good database to use with LiveCode.:)
> 
> Kirill, the syntax in your reply works well!  In summary,
> 
> 1.  Must clone the BitSet and use the clone to convert.

Stop stop stop, guys.

Kirill, why we need clone here ???
 This should work as constructor of new object ...


Cheking sources ...
Ops, sorry. This is absolute nonsense  :-(((

3 methods of ArraySet class must be re-writte.
    sources, docs, tests...

Kirill, these are CONSTRUCTORs
Thye must look as

   put VArraySet_FromBitSet( bitSet_All ) into newArraySet.


Constructors DO NOT need first parameter of ObjectRef,
Because it not exists yet.


Wee, I am sorry for this, but if you want to use this feature,
You will need switch to next 5.0 beta 35, where this will  be fixed.


 
> Message: 3
> Date: Thu, 21 Jun 2012 11:31:12 +0300
> From: Kirill Pekarov <kirill_pekarov at valentina-db.com>
> To: Valentina Developers <valentina at lists.macserve.net>
> Subject: Re: Unusual behaviour [Valentina with LIVECODE API,
>     Converting BitSets    to ArraySets]
> Message-ID: <4FE2DBD0.4060206 at valentina-db.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Hi.
> 
> Please try such syntax:
> 
> 
> function Test_V4REV_VArraySet_FromBitSet
>     get TEST("Test_V4REV_VArraySet_FromBitSet")
> 
>     -- Prepare database
>     get Test_V4REV_VTable_Prepare()
> 
>     put VTable_SelectAllRecords( mTbl1 ) into setAll
>     put VSet_Count( setAll ) into res
> 
>     get DO_TEST_EQ( res, 3 )
> 
>     put VSet_Clone(setAll) into arraySet
>     get VArraySet_FromBitSet( arraySet, setAll )
>     put VSet_Count( arraySet ) into res2
> 
>     get DO_TEST_EQ( res2, 3 )
> 
>     -- Close database
>     get CloseAndTrashTestDatabase()
> end Test_V4REV_VArraySet_FromBitSet




-- 
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