memsql/common/query_builder.py
def update(table_name, **fields):
    """ Build a update query.

    >>> update('foo_table', a=5, b=2)
    "UPDATE `foo_table` SET `a`=%(_QB_a)s, `b`=%(_QB_b)s", { '_QB_a': 5, '_QB_b': 2 }
    """
    prefix = "UPDATE `%s` SET " % table_name
    sets, params = simple_expression(', ', **fields)
    return prefix + sets, params
def update(table_name, **fields):
    """ Build a update query.

    >>> update('foo_table', a=5, b=2)
    "UPDATE `foo_table` SET `a`=%(_QB_a)s, `b`=%(_QB_b)s", { '_QB_a': 5, '_QB_b': 2 }
    """
    prefix = "UPDATE `%s` SET " % table_name
    sets, params = simple_expression(', ', **fields)
    return prefix + sets, params
Build a update query.

    >>> update('foo_table', a=5, b=2)
    "UPDATE `foo_table` SET `a`=%(_QB_a)s, `b`=%(_QB_b)s", { '_QB_a': 5, '_QB_b': 2 }