From 3f34e2dcd820bb20a6c4974fe4963a3ddb045aec Mon Sep 17 00:00:00 2001 From: Paul Myburgh Date: Sun, 6 Aug 2017 21:10:10 +0200 Subject: [PATCH] Small readme changes --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index af6056f..7874658 100644 --- a/README.md +++ b/README.md @@ -191,9 +191,7 @@ interface SchemaPropertyDefinition { } ``` -Schemas are contracts between your JavaScript objects and the eventual stored objects in the datastore. In that sense, you need to pay close attention to how you define each property in the schema. Let's go over the options for each property on the schema: - -### `__excludeFromIndexes` +### The `__excludeFromIndexes` schema property This is a string array which contains the names of the properties that you would like to not be indexed. Example: @@ -209,6 +207,10 @@ By default all properties on your entities will be indexed. This can become cost Limitations in the way the Datastore library currently works means that you need to set each property that you don't want indexed in an embedded object. See this issue: https://github.com/GoogleCloudPlatform/google-cloud-node/issues/2510 +--- + +Schemas are contracts between your JavaScript objects and the eventual stored objects in the datastore. In that sense, you need to pay close attention to how you define each property in the schema. Let's go over the options for each property on the schema: + ### Entity Property Definition #### `type`: string @@ -234,7 +236,7 @@ If this property is required to be set in the entity (not `null`), then mark thi ~~By default all properties on your entities will be indexed. This can become costly depending on the amount of indexed properties on an entity. To prevent this for certain properties set this to true~~ -_This property has be deprecated in favour of setting the `__excludeFromIndexes` property in the root of your schema object._ +_As of version 0.4.0 This property has be deprecated in favour of setting the `__excludeFromIndexes` property in the root of your schema object._ #### `optional`: boolean ###### (default `false`) @@ -848,4 +850,4 @@ const query = await TestModel.query("testing-ground-two").filter("testTags", "=" All datastore operations can set a namespace in this way and will override the namespaces set by either the client (when you created your Datastore client), or by the global module -above. \ No newline at end of file +above.