Skip to content

Commit

Permalink
Small readme changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lostpebble authored Aug 6, 2017
1 parent 3839ce7 commit 3f34e2d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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
Expand All @@ -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`)
Expand Down Expand Up @@ -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.
above.

0 comments on commit 3f34e2d

Please sign in to comment.