Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: service/datastore/raw_interface.go

Issue 1367003002: Add missing Count api (Closed) Base URL: https://github.com/luci/gae.git@move_serialization_helpers
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package datastore 5 package datastore
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 9
10 "golang.org/x/net/context" 10 "golang.org/x/net/context"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // be decoded by the implementation. 122 // be decoded by the implementation.
123 DecodeCursor(s string) (Cursor, error) 123 DecodeCursor(s string) (Cursor, error)
124 124
125 // Run executes the given query, and calls `cb` for each successfully it em. 125 // Run executes the given query, and calls `cb` for each successfully it em.
126 // 126 //
127 // NOTE: Implementations and filters are guaranteed that: 127 // NOTE: Implementations and filters are guaranteed that:
128 // - query is not nil 128 // - query is not nil
129 // - cb is not nil 129 // - cb is not nil
130 Run(q *FinalizedQuery, cb RawRunCB) error 130 Run(q *FinalizedQuery, cb RawRunCB) error
131 131
132 // Count executes the given query and returns the number of entries whic h
133 // match it.
134 Count(q *FinalizedQuery) (int64, error)
135
132 // GetMulti retrieves items from the datastore. 136 // GetMulti retrieves items from the datastore.
133 // 137 //
134 // Callback execues once per key, in the order of keys. Callback may not 138 // Callback execues once per key, in the order of keys. Callback may not
135 // execute at all if there's a server error. If callback is nil, this 139 // execute at all if there's a server error. If callback is nil, this
136 // method does nothing. 140 // method does nothing.
137 // 141 //
138 // meta is used to propagate metadata from higher levels. 142 // meta is used to propagate metadata from higher levels.
139 // 143 //
140 // NOTE: Implementations and filters are guaranteed that: 144 // NOTE: Implementations and filters are guaranteed that:
141 // - len(keys) > 0 145 // - len(keys) > 0
(...skipping 22 matching lines...) Expand all
164 // - len(keys) > 0 168 // - len(keys) > 0
165 // - all keys are Valid, !Incomplete, and in the current namespace 169 // - all keys are Valid, !Incomplete, and in the current namespace
166 // - none keys of the keys are 'special' (use a kind prefixed with '__ ') 170 // - none keys of the keys are 'special' (use a kind prefixed with '__ ')
167 // - cb is not nil 171 // - cb is not nil
168 DeleteMulti(keys []*Key, cb DeleteMultiCB) error 172 DeleteMulti(keys []*Key, cb DeleteMultiCB) error
169 173
170 // Testable returns the Testable interface for the implementation, or ni l if 174 // Testable returns the Testable interface for the implementation, or ni l if
171 // there is none. 175 // there is none.
172 Testable() Testable 176 Testable() Testable
173 } 177 }
OLDNEW
« impl/prod/raw_datastore_type_converter_test.go ('K') | « service/datastore/interface.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698