(props)
遍历字段列表生成sql语句
遍历字段列表生成sql语句
遍历字段列表生成sql语句
def EachQueryProps(props):
    '''遍历字段列表生成sql语句
    '''
    sqlstr = ""
    if props == '*':
        return '*'
    elif type(props) == type([0]):
        for prop in props:
            sqlstr = sqlstr + prop +','
        sqlstr = sqlstr[:-1]
        return sqlstr
    else:
        raise Exception('props to query must be dict')
        return
def EachQueryProps ( props ) : sqlstr = "" if props == '*' : return '*' elif type ( props ) == type ( [ 0 ] ) : for prop in props : sqlstr = sqlstr + prop + ',' sqlstr = sqlstr [ : - 1 ] return sqlstr else : raise Exception ( 'props to query must be dict' ) return