コード例 #1
0
    def delete(self, table, keyset):
        """Delete one or more table rows.

        :type table: str
        :param table: Name of the table to be modified.

        :type keyset: :class:`~google.cloud.spanner_v1.keyset.Keyset`
        :param keyset: Keys/ranges identifying rows to delete.
        """
        delete = Mutation.Delete(table=table, key_set=keyset._to_pb())
        self._mutations.append(Mutation(delete=delete))
コード例 #2
0
ファイル: spannerio.py プロジェクト: mszb/beam
  def delete(table, keyset):
    """Delete one or more table rows.

    Args:
      table: Name of the table to be modified.
      keyset: Keys/ranges identifying rows to delete.
    """
    delete = Mutation.Delete(table=table, key_set=keyset._to_pb())
    return _Mutator(
        mutation=Mutation(delete=delete),
        rows=0,
        cells=0,
        operation=WriteMutation._OPERATION_DELETE,
        kwargs={
            "table": table, "keyset": keyset
        })