cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shuge Lee <shuge....@gmail.com>
Subject How to write WHERE .. LIKE query ?
Date Tue, 11 May 2010 04:00:18 GMT
Hi all:

How to write WHERE ... LIKE query ?
For examples(described in Python):

Schema:

# columnfamily name
resources = [
   # key
    'foo': {
        # columns and value
        'url': 'foo.com',
        'pushlier': 'foo',
    },
    'oof': {
        'url': 'oof.com',
        'pushlier': 'off',
    },
   #  ... ,
}

# this is very easy,
SELECT * FROM KEY = 'foo'

but following are really hard:
SELECT * FROM resources WHERE key LIKE 'o%' # get all records which key name
contains character 'o'?
SELECT * FROM resources WHERE url == 'oof.com'

Anyone have good ideas  ?

-- 

Lee Li

Mime
View raw message