'Search for something that is not an address, hash, or block number.
Currently, this is limited to chain names and currency codes.'

def search_general(abe, q):

    def process(row):
        (name, code3) = row
        return {'name': (((name + '    (') + code3) + ')'), 'uri': ('chain/' + str(name))}
    ret = map(process, abe.store.selectall("\n                                                SELECT    chain_name,    chain_code3\n                                                        FROM    chain\n                                                    WHERE    UPPER(chain_name)    LIKE    '%'    ||    ?    ||    '%'\n                                                                OR    UPPER(chain_code3)    LIKE    '%'    ||    ?    ||    '%'\n                                ", (q.upper(), q.upper())))
    return ret
