14.2.2.3 APIs for Accessing Datetime Data
The in-memory graph server (PGX) uses the new Java 8 temporal data types for accessing datetime data through the Java API:
date
in PGX maps toLocalDate
in Javatime
in PGX maps toLocalTime
in Javatimestamp
in PGX maps toLocalDateTime
in Javatime with time zone
in PGX maps toOffsetTime
in Javatimestamp with time zone
in PGX maps toOffsetDateTime
in Java
You can retrieve a date as shown in the following code:
opg4j> var dateOfBirthProperty = graph.getVertexProperty("date_of_birth")
opg4j> var birthdayOfJudy = dateOfBirthProperty.get(1)
import java.time.LocalDate;
import oracle.pgx.api.*;
...
VertexProperty<LocalDate> dateOfBirthProperty = graph.getVertexProperty("date_of_birth");
LocalDate birthdayOfJudy = dateOfBirthProperty.get(1);
date_of_birth_property = graph.get_vertex_property("date_of_birth")
birthday_of_judy = date_of_birth_property.get(1)
Parent topic: Using Datetime Data Types