Paul Nelson
Paul Nelson

Reputation: 1341

wildcards in keys of couchdb-python views

The published way to use wildcards in couchdb keys is:

key=somekeyname\ufff0

but that doesn't seem to work in python.

Specifically, my view query is:

results = db.view(docname, key='mykey\ufff0')

I've tried zillions of combinations of ",',\, etc. I either get no data or the error: TypeError: 'str' object is not callable

I need to find: mykey, mykey=0, mykey=1 mykey_somethingelse, etc.

Any help is appreciated.

Upvotes: 0

Views: 869

Answers (1)

Kxepal
Kxepal

Reputation: 4679

"key" parameter doesn't provides wildcard functionality, but direct match with specified value. Probably you'd like to receive all keys that starts with "mykey" value, but only, right? Than you need to use startkey and endkey arguments that defines range of possible view key values to match.

I wounder how and why you get TypeError exception with such description there, but probably you better to describe that problem at couchdb-python issue tracker with full trackeback and used versions. Thanks(:

Upvotes: 1

Related Questions