What data types are supported by the Google App Engine datastore?

I know how to make tables in Google BigTable. I have one doubt about this. What is the data type supported by google BigTable.

+3
source share
7 answers

Citation Section and field annotations from Using JPA with App Engine :

The fields of the data class that are stored in the data warehouse must either be of the type that is saved by default or expliclty declared as persistent. You can find the detailed persistence diagram for the default JPA behavior of the DataNucleus website . To explicitly declare a field as permanent, you give it an @Basicannotation:

import java.util.Date;
import javax.persistence.Enumerated;

import com.google.appengine.api.datastore.ShortBlob;

// ...
    @Basic
    private ShortBlob data;

The field type can be any of the following:

  • one of the main types supported by the data warehouse
  • a Collection (for example java.util.List<...>) of values ​​for the type of data warehouse
  • instance or collection of class instances @Entity
  • inline class stored as object properties

To define and use Emailboth PhoneNumberas data types, create entities for them and map them as @OneToOneor make them @Embeddable.

+4

, Appengine. GAE . JPA, JDO LowLevel api .

, Objectify . , GAE. , Objectify.

: 3 , Objectify , .

+2

, Datastore,

Datastore > , >

.

+2

- , App Engine Java.

+1

Bigtable .

0

A specific way to find supported low-level property types in Java is to use DataTypeUtil

eg.

if (!DataTypeUtil.isSupportedType(value.getClass())) {
  // Convert the value to a supported type.
}
0
source

Source: https://habr.com/ru/post/1742750/


All Articles