#NEWLINE# def createSQLSelect( self , table , columns , whereMap , orderBy = None , forUpdate = False ) : #NEWLINE# #INDENT# columnStr = ', ' . join ( columns ) #NEWLINE# whereStr = '' #NEWLINE# whereClause = '' #NEWLINE# for ( column , value ) in whereMap . iteritems ( ) : #NEWLINE# #INDENT# whereStr += ( '%s %s = %s' % ( whereClause , column , value ) ) #NEWLINE# whereClause = ' AND' #NEWLINE# #UNINDENT# dbCommand = ( 'SELECT %s FROM %s WHERE %s' % ( columnStr , table , whereStr ) ) #NEWLINE# if ( orderBy is not None ) : #NEWLINE# #INDENT# dbCommand += ( ' ORDER BY ' + orderBy ) #NEWLINE# #UNINDENT# if orderBy : #NEWLINE# #INDENT# dbCommand += ' FOR UPDATE' #NEWLINE# #UNINDENT# dbCommand += ';' #NEWLINE# return dbCommand