comparison roundup/backends/back_mysql.py @ 2005:fc52d57c6c3e

documentation cleanup
author Richard Jones <richard@users.sourceforge.net>
date Wed, 11 Feb 2004 23:55:10 +0000
parents 5660b89f8903
children 261c2e6ceb1e
comparison
equal deleted inserted replaced
2004:1782fe36e7b8 2005:fc52d57c6c3e
3 # 3 #
4 # This module is free software, and you may redistribute it and/or modify 4 # This module is free software, and you may redistribute it and/or modify
5 # under the same terms as Python, so long as this copyright message and 5 # under the same terms as Python, so long as this copyright message and
6 # disclaimer are retained in their original form. 6 # disclaimer are retained in their original form.
7 # 7 #
8 # Mysql backend for roundup 8
9 # 9 '''This module defines a backend implementation for MySQL.'''
10 __docformat__ = 'restructuredtext'
10 11
11 from roundup.backends.rdbms_common import * 12 from roundup.backends.rdbms_common import *
12 from roundup.backends import rdbms_common 13 from roundup.backends import rdbms_common
13 import MySQLdb 14 import MySQLdb
14 import os, shutil 15 import os, shutil
206 class MysqlClass: 207 class MysqlClass:
207 # we're overriding this method for ONE missing bit of functionality. 208 # we're overriding this method for ONE missing bit of functionality.
208 # look for "I can't believe it's not a toy RDBMS" below 209 # look for "I can't believe it's not a toy RDBMS" below
209 def filter(self, search_matches, filterspec, sort=(None,None), 210 def filter(self, search_matches, filterspec, sort=(None,None),
210 group=(None,None)): 211 group=(None,None)):
211 ''' Return a list of the ids of the active nodes in this class that 212 '''Return a list of the ids of the active nodes in this class that
212 match the 'filter' spec, sorted by the group spec and then the 213 match the 'filter' spec, sorted by the group spec and then the
213 sort spec 214 sort spec
214 215
215 "filterspec" is {propname: value(s)} 216 "filterspec" is {propname: value(s)}
216 "sort" and "group" are (dir, prop) where dir is '+', '-' or None 217
217 and prop is a prop name or None 218 "sort" and "group" are (dir, prop) where dir is '+', '-' or None
218 "search_matches" is {nodeid: marker} 219 and prop is a prop name or None
219 220
220 The filter must match all properties specificed - but if the 221 "search_matches" is {nodeid: marker}
221 property value to match is a list, any one of the values in the 222
222 list may match for that property to match. 223 The filter must match all properties specificed - but if the
224 property value to match is a list, any one of the values in the
225 list may match for that property to match.
223 ''' 226 '''
224 # just don't bother if the full-text search matched diddly 227 # just don't bother if the full-text search matched diddly
225 if search_matches == {}: 228 if search_matches == {}:
226 return [] 229 return []
227 230

Roundup Issue Tracker: http://roundup-tracker.org/