예제 #1
0
 def _encode_create_table(self, table_meta, table_options,
                          reserved_throughput):
     proto = pb2.CreateTableRequest()
     self._make_table_meta(proto.table_meta, table_meta)
     self._make_reserved_throughput(proto.reserved_throughput,
                                    reserved_throughput)
     self._make_table_options(proto.table_options, table_options)
     return proto
    def _encode_create_table(self, table_meta, table_options, reserved_throughput, secondary_indexes):
        proto = pb2.CreateTableRequest()
        self._make_table_meta(proto.table_meta, table_meta)
        self._make_reserved_throughput(proto.reserved_throughput, reserved_throughput)
        self._make_table_options(proto.table_options, table_options)

        for secondary_index in secondary_indexes:
            self._make_secondary_index(proto.index_metas.add(), secondary_index)
        return proto