class Query

August 13, 2019 ยท View on GitHub

Member values

Member nameData typeDescription
start_timestampTimestampStart timestamp (set to zero to specify it)
end_timestampTimestampEnd timestamp (set to zero to not specify it)
usernamestringQueried username (set to "" to not specify it)

Member functions

Function nameReturn typeInput typeDescription
has_start_timestamp() constboolvoidReturns true if start_timestamp is set.
start_timestamp()const Timestamp&voidReturns the current value of start_timestamp. If start_timestamp is not set, returns a Timestamp with none of its fields set (possibly start_timestamp::default_instance()).
mutable_start_timestamp()Timestamp *voidReturns a pointer to the mutable Timestamp object that stores the field's value. If the field was not set prior to the call, then the returned Timestamp will have none of its fields set (i.e. it will be identical to a newly-allocated Timestamp). After calling this, has_start_timestamp() will return true and start_timestamp() will return a reference to the same instance of Timestamp.
clear_start_timestamp()voidvoidClears the value of the field. After calling this, has_start_timestamp() will return false and start_timestamp() will return the default value.
set_allocated_start_timestamp()voidTimestamp *Sets the Timestamp object to the field and frees the previous field value if it exists. If the Timestamp pointer is not NULL, the message takes ownership of the allocated Timestamp object and has_ Timestamp() will return true. Otherwise, if the start_timestamp is NULL, the behavior is the same as calling clear_start_timestamp().
release_start_timestamp()Timestamp *voidReleases the ownership of the field and returns the pointer of the Timestamp object. After calling this, caller takes the ownership of the allocated Timestamp object, has_start_timestamp() will return false, and start_timestamp() will return the default value.
has_end_timestamp() constboolvoidReturns true if end_timestamp is set.
end_timestamp()const Timestamp&voidReturns the current value of end_timestamp. If end_timestamp is not set, returns a Timestamp with none of its fields set (possibly end_timestamp::default_instance()).
mutable_end_timestamp()Timestamp *voidReturns a pointer to the mutable Timestamp object that stores the field's value. If the field was not set prior to the call, then the returned Timestamp will have none of its fields set (i.e. it will be identical to a newly-allocated Timestamp). After calling this, has_end_timestamp() will return true and end_timestamp() will return a reference to the same instance of Timestamp.
clear_end_timestamp()voidvoidClears the value of the field. After calling this, has_end_timestamp() will return false and end_timestamp() will return the default value.
set_allocated_end_timestamp()voidTimestamp *Sets the Timestamp object to the field and frees the previous field value if it exists. If the Timestamp pointer is not NULL, the message takes ownership of the allocated Timestamp object and has_ Timestamp() will return true. Otherwise, if the end_timestamp is NULL, the behavior is the same as calling clear_end_timestamp().
release_end_timestamp()Timestamp *voidReleases the ownership of the field and returns the pointer of the Timestamp object. After calling this, caller takes the ownership of the allocated Timestamp object, has_end_timestamp() will return false, and end_timestamp() will return the default value.
username()const string&voidReturns the current value of username. If username is not set, returns the empty string/empty bytes.
set_username()voidconst string&Sets the value of username. After calling this, username() will return a copy of value.
set_username()voidstring&&(C++11 and beyond): Sets the value of username, moving from the passed string. After calling this, username() will return a copy of value.
set_username()voidconst char*Sets the value of username using a C-style null-terminated string. After calling this, username() will return a copy of value.
mutable_username()string *voidReturns a pointer to the mutable string object that stores username's value. If the field was not set prior to the call, then the returned string will be empty. After calling this, username() will return whatever value is written into the given string.
clear_username()voidvoidClears the value of username. After calling this, username() will return the empty string/empty bytes.
set_allocated_username()voidstring*Sets the string object to the field and frees the previous field value if it exists. If the string pointer is not NULL, the message takes ownership of the allocated string object. The message is free to delete the allocated string object at any time, so references to the object may be invalidated. Otherwise, if the value is NULL, the behavior is the same as calling clear_username().
release_username()string *voidReleases the ownership of username and returns the pointer of the string object. After calling this, caller takes the ownership of the allocated string object and username() will return the empty string/empty bytes.

Parent topic: Base (C++)