Thanks to visit codestin.com
Credit goes to github.com

Skip to content

datastore: determine entity size using api #6389

@mgenov

Description

@mgenov

The low level Datastore API of App Engine provides a mechanism for determining the protobuf size of an entity by using the EntityTranslator class:

val protoEntity = EntityTranslator.convertToPb(entity)
if (protoEntity.serializedSize >= 1048572) {
  // ....
}

It would be good and cloud java client library to provide such API as it will let the client code determine the size of an entity before trying to persist it.

Metadata

Metadata

Assignees

Labels

api: datastoreIssues related to the Datastore API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions