lib/gcloud/datastore/proto.rb in gcloud-0.3.0 vs lib/gcloud/datastore/proto.rb in gcloud-0.3.1
- old
+ new
@@ -12,10 +12,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require "gcloud/proto/datastore_v1.pb"
+require "gcloud/datastore/errors"
module Gcloud
module Datastore
# rubocop:disable all
@@ -61,9 +62,11 @@
v.timestamp_microseconds_value = self.microseconds_from_time value
elsif Gcloud::Datastore::Key === value
v.key_value = value.to_proto
elsif Gcloud::Datastore::Entity === value
v.entity_value = value.to_proto
+ elsif NilClass === value
+ # The correct behavior is to not set a value property
elsif TrueClass === value
v.boolean_value = true
elsif FalseClass === value
v.boolean_value = false
elsif Float === value