searching an array?

Chris Sheffield cmsheffield at icloud.com
Thu Apr 4 12:41:19 EDT 2013


Thanks, Mike. Eventually this data will be stored in a SQLite db. I'm just working on a proof of concept right now and am not quite ready to create the database.

I'm not sure about using arrayEncode(), as it returns a bunch of binary gobbledegook that may be difficult to decipher, but I may look into that further.

Thanks again,
Chris

On Apr 4, 2013, at 10:06 AM, Mike Bonner <bonnmike at gmail.com> wrote:

> it might be possible to arrayencode the array and search that.  If its a
> text only search it doesn't look like this should be too awful bad as long
> as key names and text entries stay clear text (it seems they do)  Looking
> at the data there is a definite pattern.  Would it be worth it?  Probably
> not.  Maybe switch to using sqlite (or an in-memory sqlite db if that
> better fits requirement) and use select with that.
> 
> Or rather than seek through the whole array each time, maybe write your own
> indexing routines and keep running indexes going any time the array is
> modified. Not that I have a clue how to actually do that.
> 
> 
> On Thu, Apr 4, 2013 at 9:36 AM, Andrew Kluthe <andrew at ctech.me> wrote:
> 
>> Not that I have seen or come across. Although, people on the list come up
>> with some pretty neat (and fast) search routines for things.
>> 
>> 
>> On Thu, Apr 4, 2013 at 10:31 AM, Chris Sheffield <cmsheffield at icloud.com
>>> wrote:
>> 
>>> Okay array experts. I need help. :-)
>>> 
>>> Is there any way to search and/or filter an array? I'm not finding
>>> anything in the docs, but I probably don't know what I'm looking for. My
>>> only thought was to use combine to convert the array to a list, and then
>>> use the filter command to locate what I need. But there's a problem with
>>> this... My array is multidimensional, and combine doesn't work.
>>> 
>>> So short of iterating through each array element, is there any other way
>>> to do this?
>>> 
>>> Thanks,
>>> Chris
>>> 
>>> 
>>> --
>>> Chris Sheffield
>>> Read Naturally, Inc.
>>> www.readnaturally.com
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>> 
>> 
>> 
>> --
>> Regards,
>> 
>> Andrew Kluthe
>> andrew at ctech.me
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list