ds_wrapper v0.1.1 DsWrapper.Entity View Source

GoogleApi.Datastore.V1.Model.Entity wrapper

Link to this section Summary

Link to this section Functions

Link to this function

new(key, properties, exclude_from_indexes \\ [])

View Source
new(
  %GoogleApi.Datastore.V1.Model.Key{partitionId: term(), path: term()},
  %{required(String.t()) => term()},
  [String.t()]
) :: GoogleApi.Datastore.V1.Model.Entity.t()

Create a new GoogleApi.Datastore.V1.Model.Entity.

Examples

iex> key = DsWrapper.Key.new("SomeKind", "some-name")
iex> properties = %{"some_property" => "some value"}
iex> DsWrapper.Entity.new(key, properties)
%GoogleApi.Datastore.V1.Model.Entity{...}

Convert GoogleApi.Datastore.V1.Model.Entity's properties to a Map.

Examples

iex> DsWrapper.Entity.to_map(entity)
%{"some_property" => "some value"}