You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
415 B

11 years ago
from CodernityDB.tree_index import TreeBasedIndex
11 years ago
11 years ago
class ProfileIndex(TreeBasedIndex):
_version = 1
11 years ago
def __init__(self, *args, **kwargs):
11 years ago
kwargs['key_format'] = 'i'
11 years ago
super(ProfileIndex, self).__init__(*args, **kwargs)
def make_key(self, key):
11 years ago
return key
11 years ago
def make_key_value(self, data):
11 years ago
if data.get('_t') == 'profile':
return data.get('order', 99), None