grr/server/grr_response_server/databases/mysql_utils.py
def Placeholders(num, values = 1):
  """Returns a string of placeholders for MySQL INSERTs.

  Examples:
    >>> Placeholders(3)
    u'(%s, %s, %s)'

    >>> Placeholders(num=3, values=2)
    u'(%s, %s, %s), (%s, %s, %s)'

  Args:
    num: The number of %s placeholders for each value.
    values: The number of values to be INSERTed

  Returns:
    a string with `values` comma-separated tuples containing `num`
    comma-separated placeholders each.

  """
  value = "(" + ", ".join(["%s"] * num) + ")"
  return ", ".join([value] * values)
Returns a string of placeholders for MySQL INSERTs.

  Examples:
    >>> Placeholders(3)
    u'(%s, %s, %s)'

    >>> Placeholders(num=3, values=2)
    u'(%s, %s, %s), (%s, %s, %s)'

  Args:
    num: The number of %s placeholders for each value.
    values: The number of values to be INSERTed

  Returns:
    a string with `values` comma-separated tuples containing `num`
    comma-separated placeholders each.

  
Returns a string of placeholders for MySQL INSERTs.
Returns a string of placeholders for MySQL INSERTs .
def Placeholders(num, values = 1):
  value = "(" + ", ".join(["%s"] * num) + ")"
  return ", ".join([value] * values)
def Placeholders ( num , values = 1 ) : value = "(" + ", " . join ( [ "%s" ] * num ) + ")" return ", " . join ( [ value ] * values )
Returns a string of placeholders for MySQL INSERTs.
Returns a string of placeholders for MySQL INSERTs .
"""Returns a string of placeholders for MySQL INSERTs.

  Examples:
    >>> Placeholders(3)
    u'(%s, %s, %s)'

    >>> Placeholders(num=3, values=2)
    u'(%s, %s, %s), (%s, %s, %s)'

  Args:
    num: The number of %s placeholders for each value.
    values: The number of values to be INSERTed

  Returns:
    a string with `values` comma-separated tuples containing `num`
    comma-separated placeholders each.

  """
a string with `values` comma-separated tuples containing `num`
comma-separated placeholders each.
a string with ` values ` comma - separated tuples containing ` num ` comma - separated placeholders each .
num
The number of %s placeholders for each value.
The number of %s placeholders for each value .
values
The number of values to be INSERTed
The number of values to be INSERTed
examples
None