Int

Int

Build a Datastore Int object. For long integers, a string can be provided.

Constructor

new Int(value, typeCastOptionsopt)

Parameters:
Name Type Attributes Description
value number | string

The integer value.

typeCastOptions object <optional>

Configuration to convert values of integerValue type to a custom value. Must provide an integerTypeCastFunction to handle integerValue conversion.

Properties
Name Type Attributes Description
integerTypeCastFunction function

A custom user provided function to convert integerValue.

properties string | Array.<string> <optional>

Entity property names to be converted using integerTypeCastFunction.

Example
```
const {Datastore} = require('@google-cloud/datastore');
const datastore = new Datastore();
const anInt = datastore.int(7);
```

Members

type

value