diff --git a/lib/mapping/index.d.ts b/lib/mapping/index.d.ts index 694e789c..bd42e72c 100644 --- a/lib/mapping/index.d.ts +++ b/lib/mapping/index.d.ts @@ -59,7 +59,7 @@ export namespace mapping { logged?: boolean; timestamp?: number | Long; fetchSize?: number; - pageState?: number; + pageState?: string | Buffer; } interface ModelTables { diff --git a/lib/mapping/model-mapper.js b/lib/mapping/model-mapper.js index 8a4d0419..24f51d29 100644 --- a/lib/mapping/model-mapper.js +++ b/lib/mapping/model-mapper.js @@ -81,7 +81,7 @@ class ModelMapper { * execution or a string representing the name of the execution profile. * @param {String} [executionOptions.executionProfile] The name of the execution profile. * @param {Number} [executionOptions.fetchSize] The amount of rows to retrieve per page. - * @param {Number} [executionOptions.pageState] A Buffer instance or a string token representing the paging state. + * @param {String|Buffer} [executionOptions.pageState] A Buffer instance or a string token representing the paging state. *

When provided, the query will be executed starting from a given paging state.

* @return {Promise} A Promise that resolves to a [Result]{@link module:mapping~Result} instance. * @example Get user's videos @@ -121,7 +121,7 @@ class ModelMapper { * execution or a string representing the name of the execution profile. * @param {String} [executionOptions.executionProfile] The name of the execution profile. * @param {Number} [executionOptions.fetchSize] The mount of rows to retrieve per page. - * @param {Number} [executionOptions.pageState] A Buffer instance or a string token representing the paging state. + * @param {String|Buffer} [executionOptions.pageState] A Buffer instance or a string token representing the paging state. *

When provided, the query will be executed starting from a given paging state.

* @return {Promise} A Promise that resolves to a [Result]{@link module:mapping~Result} instance. */ @@ -290,7 +290,7 @@ class ModelMapper { * @param {Number} [executionOptions.fetchSize] Amount of rows to retrieve per page. * @param {Boolean} [executionOptions.isIdempotent] Defines whether the query can be applied multiple times * without changing the result beyond the initial application. - * @param {Number} [executionOptions.pageState] Buffer or string token representing the paging state. + * @param {String|Buffer} [executionOptions.pageState] Buffer or string token representing the paging state. *

When provided, the query will be executed starting from a given paging state.

* @param {Number|Long} [executionOptions.timestamp] The default timestamp for the query in microseconds from the * unix epoch (00:00:00, January 1st, 1970).