Skip to content

Commit 08852cc

Browse files
danieljbrucegcf-owl-bot[bot]kevkim-codes
authored
docs: Add descriptions to many parameters (googleapis#1341)
* Add descriptions for some query parameters * Eliminate the extra space * Add a description to all the alias parameters * Add documentation for property parameters * Add descriptions for the aggregation argument * Add property params to these objects * Add descriptions for data types * Fix the broken links * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Kevin Kim <[email protected]>
1 parent ad2c6c0 commit 08852cc

File tree

6 files changed

+27
-20
lines changed

6 files changed

+27
-20
lines changed

src/aggregate.ts

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class AggregateQuery {
3333
/**
3434
* Build an AggregateQuery object.
3535
*
36-
* @param {Query} query
36+
* @param {Query} query A Query object
3737
*/
3838
constructor(query: Query) {
3939
this.query = query;
@@ -43,7 +43,8 @@ class AggregateQuery {
4343
/**
4444
* Add a `count` aggregate query to the list of aggregations.
4545
*
46-
* @param {string} alias
46+
* @param {string} alias The label used in the results to describe this
47+
* aggregate field when a query is run.
4748
* @returns {AggregateQuery}
4849
*/
4950
count(alias?: string): AggregateQuery {
@@ -54,8 +55,9 @@ class AggregateQuery {
5455
/**
5556
* Add a `sum` aggregate query to the list of aggregations.
5657
*
57-
* @param {string} property
58-
* @param {string} alias
58+
* @param {string} property The property to use for the sum calculation.
59+
* @param {string} alias The label used in the results to describe this
60+
* aggregate field when a query is run.
5961
* @returns {AggregateQuery}
6062
*/
6163
sum(property: string, alias?: string): AggregateQuery {
@@ -66,8 +68,9 @@ class AggregateQuery {
6668
/**
6769
* Add a `average` aggregate query to the list of aggregations.
6870
*
69-
* @param {string} property
70-
* @param {string} alias
71+
* @param {string} property The property to use for the average calculation.
72+
* @param {string} alias The label used in the results to describe this
73+
* aggregate field when a query is run.
7174
* @returns {AggregateQuery}
7275
*/
7376
average(property: string, alias?: string): AggregateQuery {
@@ -78,7 +81,8 @@ class AggregateQuery {
7881
/**
7982
* Add a custom aggregation to the list of aggregations.
8083
*
81-
* @param {AggregateField} aggregation
84+
* @param {AggregateField} aggregation The aggregate field to perform the
85+
* aggregation query over.
8286
* @returns {AggregateQuery}
8387
*/
8488
addAggregation(aggregation: AggregateField): AggregateQuery {
@@ -89,7 +93,8 @@ class AggregateQuery {
8993
/**
9094
* Add a list of custom aggregations to the list of aggregations.
9195
*
92-
* @param {AggregateField[]} aggregation
96+
* @param {AggregateField[]} aggregations The aggregate fields to perform the
97+
* aggregation query over.
9398
* @returns {AggregateQuery}
9499
*/
95100
addAggregations(aggregations: AggregateField[]): AggregateQuery {
@@ -147,6 +152,7 @@ abstract class AggregateField {
147152
/**
148153
* Gets a copy of the Sum aggregate field.
149154
*
155+
* @param {string} property The property to use for the average calculation.
150156
* @returns {Sum}
151157
*/
152158
static sum(property: string): Sum {
@@ -156,6 +162,7 @@ abstract class AggregateField {
156162
/**
157163
* Gets a copy of the Average aggregate field.
158164
*
165+
* @param {string} property The property to use for the average calculation.
159166
* @returns {Average}
160167
*/
161168
static average(property: string): Average {
@@ -209,7 +216,7 @@ abstract class PropertyAggregateField extends AggregateField {
209216
/**
210217
* Build a PropertyAggregateField object.
211218
*
212-
* @param {string} property
219+
* @param {string} property The property to aggregate over.
213220
*/
214221
constructor(public property_: string) {
215222
super();

src/entity.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export namespace entity {
8383
* Check if something is a Datastore Double object.
8484
*
8585
* @private
86-
* @param {*} value
86+
* @param {*} value The value to check if it is a datastore double.
8787
* @returns {boolean}
8888
*/
8989
export function isDsDouble(value?: {}): value is entity.Double {
@@ -94,7 +94,7 @@ export namespace entity {
9494
* Check if a value is a Datastore Double object converted from JSON.
9595
*
9696
* @private
97-
* @param {*} value
97+
* @param {*} value The value to check if it is datastore double like.
9898
* @returns {boolean}
9999
*/
100100
export function isDsDoubleLike(value: unknown) {
@@ -204,7 +204,7 @@ export namespace entity {
204204
* Check if something is a Datastore Int object.
205205
*
206206
* @private
207-
* @param {*} value
207+
* @param {*} value The value to check if it is a Datastore Int
208208
* @returns {boolean}
209209
*/
210210
export function isDsInt(value?: {}): value is entity.Int {
@@ -215,7 +215,7 @@ export namespace entity {
215215
* Check if a value is a Datastore Int object converted from JSON.
216216
*
217217
* @private
218-
* @param {*} value
218+
* @param {*} value The value to check if it is Datastore IntLike
219219
* @returns {boolean}
220220
*/
221221
export function isDsIntLike(value: unknown) {
@@ -273,7 +273,7 @@ export namespace entity {
273273
* Check if something is a Datastore Geo Point object.
274274
*
275275
* @private
276-
* @param {*} value
276+
* @param {*} value The value to check if it is a Geo point.
277277
* @returns {boolean}
278278
*/
279279
export function isDsGeoPoint(value?: {}): value is entity.GeoPoint {

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ const urlSafeKey = new entity.URLSafeKey();
134134
*
135135
* <h4>The Datastore Emulator</h4>
136136
*
137-
* Make sure you have the <a href="https://cloud.google.com/sdk/downloads">
137+
* Make sure you have the <a href="https://cloud.google.com/sdk/docs/install">
138138
* gcloud SDK installed</a>, then run:
139139
*
140140
* <pre>
@@ -1509,7 +1509,7 @@ class Datastore extends DatastoreRequest {
15091509
* @see {@link Query}
15101510
*
15111511
* @param {string} [namespace] Namespace.
1512-
* @param {string} kind The kind to query.
1512+
* @param {string} kind The kind to query.
15131513
* @returns {Query}
15141514
*
15151515
* @example

src/query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ class Query {
334334
*
335335
* Queries that select a subset of properties are called Projection Queries.
336336
*
337-
* @see {@link https://cloud.google.com/datastore/docs/concepts/projectionqueries| Projection Queries}
337+
* @see {@link https://cloud.google.com/datastore/docs/samples/datastore-projection-query| Projection Queries}
338338
*
339339
* @param {string|string[]} fieldNames Properties to return from the matched
340340
* entities.

src/request.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ class DatastoreRequest {
820820
* that uses the end cursor from the previous query as the starting cursor for
821821
* the next query. You can pass that object back to this method to see if more
822822
* results exist.
823-
* @param {Query} query Query object.
823+
* @param {Query} query A Query object
824824
* @param {object} [options] Optional configuration.
825825
* @param {string} [options.consistency] Specify either `strong` or `eventual`.
826826
* If not specified, default values are chosen by Datastore for the
@@ -949,7 +949,7 @@ class DatastoreRequest {
949949
*
950950
* See {@link Datastore#runQuery} for a list of all available options.
951951
*
952-
* @param {Query} query Query object.
952+
* @param {Query} query A Query object
953953
* @param {object} [options] Optional configuration.
954954
* @param {object} [options.gaxOptions] Request configuration options, outlined
955955
* here: https://googleapis.github.io/gax-nodejs/global.html#CallOptions.

src/transaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ class Transaction extends DatastoreRequest {
755755
* has not been started yet then the transaction is started before the
756756
* runQuery call is made.
757757
*
758-
* @param {Query} query Query object.
758+
* @param {Query} query A Query object
759759
* @param {object} [options] Optional configuration.
760760
* @param {function} [callback] The callback function. If omitted, a readable
761761
* stream instance is returned.

0 commit comments

Comments
 (0)