Returns a placeholder for the specified name, by applying the instance's format strings.

    :name: if None an unamed placeholder is returned, otherwise a named placeholder is returned.
    :db_type: if not None the placeholder is typecast.

def to_placeholder(self, name=None, db_type=None):
    """Returns a placeholder for the specified name, by applying the instance's format strings.

    :name: if None an unamed placeholder is returned, otherwise a named placeholder is returned.
    :db_type: if not None the placeholder is typecast.
    """
    if name is None:
      placeholder = self.unnamed_placeholder
    else:
      placeholder = self.named_placeholder.format(name)

    if db_type:
      return self.typecast(placeholder, db_type)
    else:
      return placeholder