Skip to content

Commit 19414ae

Browse files
authored
docs(datastore): replace deprecated func in docs (#8989)
1 parent aa385f9 commit 19414ae

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

datastore/doc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ Example code:
220220
}
221221
222222
var entities []MyEntity
223-
q := datastore.NewQuery("Entity").Filter("A =", 12).Limit(1)
223+
q := datastore.NewQuery("Entity").FilterField("A", "=", 12).Limit(1)
224224
if _, err := dsClient.GetAll(ctx, q, &entities); err != nil {
225225
// Handle error
226226
}

datastore/example_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ func ExampleClient_Run() {
271271
}
272272
// List the posts published since yesterday.
273273
yesterday := time.Now().Add(-24 * time.Hour)
274-
q := datastore.NewQuery("Post").Filter("PublishedAt >", yesterday)
274+
q := datastore.NewQuery("Post").FilterField("PublishedAt", ">", yesterday)
275275
it := client.Run(ctx, q)
276276
_ = it // TODO: iterate using Next.
277277
}

0 commit comments

Comments
 (0)