def get_kba_values(kb_name, searchname="", searchtype="s"):
    """Return an array of values "authority file" type = just values.

    :param kb_name: name of kb
    :param searchname: get these values, according to searchtype
    :param searchtype: s=substring, e=exact, , sw=startswith
    """
    if searchtype == 's' and searchname:
        searchname = '%'+searchname+'%'
    if searchtype == 'sw' and searchname:  # startswith
        searchname = searchname+'%'

    if not searchname:
        searchname = '%'

    query = db.session.query(models.KnwKBRVAL).join(models.KnwKB) \
        .filter(models.KnwKBRVAL.m_value.like(searchname),
                models.KnwKB.name.like(kb_name))

    return [(k.m_value,) for k in query.all()]
def get_kba_values ( kb_name , searchname = "" , searchtype = "s" ) : if searchtype == 's' and searchname : searchname = '%' + searchname + '%' if searchtype == 'sw' and searchname : searchname = searchname + '%' if not searchname : searchname = '%' query = db . session . query ( models . KnwKBRVAL ) . join ( models . KnwKB ) . filter ( models . KnwKBRVAL . m_value . like ( searchname ) , models . KnwKB . name . like ( kb_name ) ) return [ ( k . m_value , ) for k in query . all ( ) ]
Return an array of values "authority file" type = just values.

    :param kb_name: name of kb
    :param searchname: get these values, according to searchtype
    :param searchtype: s=substring, e=exact, , sw=startswith