|
5 | 5 | /* |
6 | 6 | Package datastore provides a client for App Engine's datastore service. |
7 | 7 |
|
8 | | -
|
9 | | -Basic Operations |
| 8 | +# Basic Operations |
10 | 9 |
|
11 | 10 | Entities are the unit of storage and are associated with a key. A key |
12 | 11 | consists of an optional parent key, a string application ID, a string kind |
@@ -74,8 +73,7 @@ GetMulti, PutMulti and DeleteMulti are batch versions of the Get, Put and |
74 | 73 | Delete functions. They take a []*Key instead of a *Key, and may return an |
75 | 74 | appengine.MultiError when encountering partial failure. |
76 | 75 |
|
77 | | -
|
78 | | -Properties |
| 76 | +# Properties |
79 | 77 |
|
80 | 78 | An entity's contents can be represented by a variety of types. These are |
81 | 79 | typically struct pointers, but can also be any type that implements the |
@@ -137,8 +135,7 @@ Example code: |
137 | 135 | J int `datastore:",noindex" json:"j"` |
138 | 136 | } |
139 | 137 |
|
140 | | -
|
141 | | -Structured Properties |
| 138 | +# Structured Properties |
142 | 139 |
|
143 | 140 | If the struct pointed to contains other structs, then the nested or embedded |
144 | 141 | structs are flattened. For example, given these definitions: |
@@ -179,8 +176,7 @@ equivalent field would instead be: FooDotZ bool `datastore:"Foo.Z"`. |
179 | 176 | If an outer struct is tagged "noindex" then all of its implicit flattened |
180 | 177 | fields are effectively "noindex". |
181 | 178 |
|
182 | | -
|
183 | | -The PropertyLoadSaver Interface |
| 179 | +# The PropertyLoadSaver Interface |
184 | 180 |
|
185 | 181 | An entity's contents can also be represented by any type that implements the |
186 | 182 | PropertyLoadSaver interface. This type may be a struct pointer, but it does |
@@ -230,8 +226,7 @@ Example code: |
230 | 226 | The *PropertyList type implements PropertyLoadSaver, and can therefore hold an |
231 | 227 | arbitrary entity's contents. |
232 | 228 |
|
233 | | -
|
234 | | -Queries |
| 229 | +# Queries |
235 | 230 |
|
236 | 231 | Queries retrieve entities based on their properties or key's ancestry. Running |
237 | 232 | a query yields an iterator of results: either keys or (key, entity) pairs. |
@@ -284,8 +279,7 @@ Example code: |
284 | 279 | io.Copy(w, b) |
285 | 280 | } |
286 | 281 |
|
287 | | -
|
288 | | -Transactions |
| 282 | +# Transactions |
289 | 283 |
|
290 | 284 | RunInTransaction runs a function in a transaction. |
291 | 285 |
|
@@ -323,8 +317,7 @@ Example code: |
323 | 317 | fmt.Fprintf(w, "Count=%d", count) |
324 | 318 | } |
325 | 319 |
|
326 | | -
|
327 | | -Metadata |
| 320 | +# Metadata |
328 | 321 |
|
329 | 322 | The datastore package provides access to some of App Engine's datastore |
330 | 323 | metadata. This metadata includes information about the entity groups, |
|
0 commit comments