database questions
Mark Brownell
gizmotron at earthlink.net
Mon Aug 4 12:36:01 EDT 2003
Hi Alex,
Is there a stack somewhere that illustrates this kind of database for
larger data sets?
Mark
On Monday, August 4, 2003, at 10:03 AM, Alex Rice wrote:
>
> On Sunday, August 3, 2003, at 03:59 PM, Alex Rice wrote:
>> function dataField pKey
>> put the customProperties of stack kDataStack into tData
> ...
>> However I haven't needed to do much optimization yet though. I
>> suspect that dataField(key) function above could be written better.
>>
>
> (following up own post)
>
> It seems that avoiding a copy of the custom property array speeds
> things up quite a bit for larger data sets.
>
> function dataField pKey
> put the db_state["databaseID"] of stack kDataStack into tDB
> put sessionID() , pKey , "value" into tFilter
> put format("the %s[\"%s\"] of stack \"%s\"", tDB, tFilter,
> kDataStack) into tx
> return value(tx)
> end dataField
>
> on setDataField pKey, pValue
> put the db_state["databaseID"] of stack kDataStack into tDB
> put sessionID() , pKey , "value" into tFilter
> put format("set the %s[\"%s\"] of stack \"%s\" to pValue", \
> tDB, tFilter, kDataStack) into tx
> do tx
> end setDataField
>
>
> Alex Rice,
More information about the use-livecode
mailing list