Understand the Limitation of the String Property Type of Google Cloud Datastore
Google Cloud Datastore supports a variety of data types for property values:
- Integers
- Floating-point numbers
- Strings
- Dates
- Binary data
Strings are likely the most frequently used. When working with strings, the most important question to ask is how many bytes can be inserted into the property/field. According to the table listed in properties and value types:
Up to 1500 bytes if property is indexed, up to 1MB otherwise
Let’s give a try:
|
|
Don’t ask me where 91
or 92
is coming from. Apparently, this is somewhere closer to 1 MB, but not exactly. The result of the test script: