Kind class

Annotation used to mark dart classes which can be stored into datastore.

The Kind annotation on a class as well as other Property annotations on fields or getters of the class itself (and any of it's superclasses) up to the Model class describe the mapping of dart objects to datastore entities.

An "entity" is an object which can be stored into Google Cloud Datastore. It contains a number of named "properties", some of them might get indexed, others are not. A "property" value can be of a limited set of supported types (such as int and String).

Here is an example of a dart model class which can be stored into datastore: @Kind() class Person extends db.Model { @StringProperty() String name;

  @IntProperty()
  int age;

  @DateTimeProperty()
  DateTime dateOfBirth;
}

Constructors

Kind({String? name, IdType idType = IdType.Integer})
Annotation specifying the name of this kind and whether to use integer or string ids.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
idType IdType
The type, either ID_TYPE_INTEGER or ID_TYPE_STRING.
final
name String?
The kind name used when saving objects to datastore.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited