Die mit einer Entität verknüpften Datenwerte bestehen aus einem oder mehreren Attributen. Jedes Attribut hat einen Namen und einen oder mehrere Werte. Ein Attribut kann Werte mit mehr als einem Typ haben und zwei Entitäten können Werte unterschiedlichen Typs für dasselbe Attribut haben. Attribute können indexiert oder nicht indexiert sein. Abfragen, die nach einem Attribut A sortieren oder filtern, ignorieren Entitäten, bei denen A nicht indexiert ist. Eine Entität kann höchstens 20.000 indexierte Attribute haben.
Sie können auch struct oder slice verwenden, um Attribute zusammenzufassen. Weitere Informationen finden Sie in der Referenz zu Datastore.
Wenn eine Abfrage ein Attribut mit Werten verschiedener Typen enthält, verwendet Datastore eine deterministische Sortierung anhand der internen Darstellungen:
Nullwerte
Festkommazahlen
Ganzzahlen
Datums- und Uhrzeitwerte
Boolesche Werte
Bytesequenzen
Bytesegmente (kurz)
Unicode-String
Blobstore-Schlüssel
Gleitkommazahlen
Geografische Punkte
Datastore-Schlüssel
Da lange Bytesegmente und lange Strings nicht indexiert werden, wird für sie keine Reihenfolge definiert.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-08 (UTC)."],[[["\u003cp\u003eThis API supports first-generation runtimes and is applicable when upgrading to corresponding second-generation runtimes, with a migration guide available for those updating to App Engine Go 1.12+.\u003c/p\u003e\n"],["\u003cp\u003eFirestore in Datastore mode supports various data types for property values, including integers, floating-point numbers, strings, dates, and binary data.\u003c/p\u003e\n"],["\u003cp\u003eEach entity in Datastore has one or more properties, each with a name and one or more values, and these properties can be indexed or unindexed.\u003c/p\u003e\n"],["\u003cp\u003eDatastore supports a variety of value types, including integers, floating-point numbers, booleans, short and long strings, short and long byte slices, dates and times, geographical points, Datastore keys, and Blobstore keys.\u003c/p\u003e\n"],["\u003cp\u003eWhen querying properties with mixed value types, Datastore uses a specific ordering: null values, fixed-point numbers, booleans, byte sequences, floating-point numbers, geographical points, and Datastore keys.\u003c/p\u003e\n"]]],[],null,["# Entity Property Reference\n\n| This API is supported for first-generation runtimes and can be used when [upgrading to corresponding second-generation runtimes](/appengine/docs/standard/\n| go\n| /services/access). If you are updating to the App Engine Go 1.12+ runtime, refer to the [migration guide](/appengine/migration-center/standard/migrate-to-second-gen/go-differences) to learn about your migration options for legacy bundled services.\n\n\u003cbr /\u003e\n\nFirestore in Datastore mode (Datastore) supports a variety of\n[data types for property values](#Properties_and_value_types). These include,\namong others:\n\n- Integers\n- Floating-point numbers\n- Strings\n- Dates\n- Binary data\n\nFor a full list of types, see\n\n[Properties and value types](#properties_and_value_types).\n\n\nProperties and value types\n--------------------------\n\nThe data values associated with an entity consist of one or more *properties.* Each property has a name and one or more values. A property can have values of more than one type, and two entities can have values of different types for the same property. Properties can be indexed or unindexed (queries that order or filter on a property *P* will ignore entities where *P* is unindexed). An entity can have at most 20,000 indexed properties.\n| **Note:** Properties with multiple values can be useful, for instance, when performing queries with equality filters: an entity satisfies the query if any of its values for a property matches the value specified in the filter. For more details on multiple-valued properties, including issues you should be aware of, see the [Datastore Queries](/appengine/docs/legacy/standard/go111/datastore/queries) page.\n\nThe following value types are supported:\n\nYou can also use a `struct` or `slice` to aggregate properties. See [the Datastore reference](/appengine/docs/legacy/standard/go/datastore/reference) for more details.\n\nWhen a query involves a property with values of mixed types, Datastore uses a deterministic ordering based on the internal representations:\n\n1. Null values\n2. Fixed-point numbers\n - Integers\n - Dates and times\n3. Boolean values\n4. Byte sequences\n - Byte slices (short)\n - Unicode string\n - Blobstore keys\n5. Floating-point numbers\n6. Geographical points\n7. Datastore keys\n\n\u003cbr /\u003e\n\nBecause long byte slices and long strings are not indexed, they have no ordering defined.\n| **Note:** Integers and floating-point numbers are considered separate types in Datastore. If an entity uses a mix of integers and floats for the same property, all integers will be sorted before all floats: for example, \n|\n| `7` \\\u003c `3.2`"]]