Class: Google::Cloud::Datastore::V1::ReadOptions

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/datastore/v1/datastore.rb

Overview

The options shared by read requests.

Defined Under Namespace

Modules: ReadConsistency

Instance Attribute Summary collapse

Instance Attribute Details

#new_transaction::Google::Cloud::Datastore::V1::TransactionOptions

Returns Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

Note: The following fields are mutually exclusive: new_transaction, read_consistency, transaction, read_time. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:



694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
# File 'proto_docs/google/datastore/v1/datastore.rb', line 694

class ReadOptions
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The possible values for read consistencies.
  module ReadConsistency
    # Unspecified. This value must not be used.
    READ_CONSISTENCY_UNSPECIFIED = 0

    # Strong consistency.
    STRONG = 1

    # Eventual consistency.
    EVENTUAL = 2
  end
end

#read_consistency::Google::Cloud::Datastore::V1::ReadOptions::ReadConsistency

Returns The non-transactional read consistency to use.

Note: The following fields are mutually exclusive: read_consistency, transaction, new_transaction, read_time. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Cloud::Datastore::V1::ReadOptions::ReadConsistency)

    The non-transactional read consistency to use.

    Note: The following fields are mutually exclusive: read_consistency, transaction, new_transaction, read_time. If a field in that set is populated, all other fields in the set will automatically be cleared.



694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
# File 'proto_docs/google/datastore/v1/datastore.rb', line 694

class ReadOptions
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The possible values for read consistencies.
  module ReadConsistency
    # Unspecified. This value must not be used.
    READ_CONSISTENCY_UNSPECIFIED = 0

    # Strong consistency.
    STRONG = 1

    # Eventual consistency.
    EVENTUAL = 2
  end
end

#read_time::Google::Protobuf::Timestamp

Returns Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

Note: The following fields are mutually exclusive: read_time, read_consistency, transaction, new_transaction. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Protobuf::Timestamp)

    Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

    This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

    Note: The following fields are mutually exclusive: read_time, read_consistency, transaction, new_transaction. If a field in that set is populated, all other fields in the set will automatically be cleared.



694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
# File 'proto_docs/google/datastore/v1/datastore.rb', line 694

class ReadOptions
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The possible values for read consistencies.
  module ReadConsistency
    # Unspecified. This value must not be used.
    READ_CONSISTENCY_UNSPECIFIED = 0

    # Strong consistency.
    STRONG = 1

    # Eventual consistency.
    EVENTUAL = 2
  end
end

#transaction::String

Returns The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction.

Note: The following fields are mutually exclusive: transaction, read_consistency, new_transaction, read_time. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::String)

    The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction.

    Note: The following fields are mutually exclusive: transaction, read_consistency, new_transaction, read_time. If a field in that set is populated, all other fields in the set will automatically be cleared.



694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
# File 'proto_docs/google/datastore/v1/datastore.rb', line 694

class ReadOptions
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The possible values for read consistencies.
  module ReadConsistency
    # Unspecified. This value must not be used.
    READ_CONSISTENCY_UNSPECIFIED = 0

    # Strong consistency.
    STRONG = 1

    # Eventual consistency.
    EVENTUAL = 2
  end
end