API version: 0.3.0

---

# Integer

`integer` holds whole numbers.

| Value                             | Example |
| --------------------------------- | ------- |
| whole number from -2^63 to 2^63-1 | `42`    |

## Settings

This type has no settings of its own, it supports the [settings of every property](/reference/schemas.md#properties).

## Storage

| Database      | Stored as                 | Notes                                                                                                                           |
| ------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| Neo4j         | native `INTEGER` (64 bit) | (default)                                                                                                                       |
| MongoDB       | `int` or `long`           | with `"storage": "document"` or the [placement role](/reference/schemas/placement.md#placement-roles) `scalar` moved to MongoDB |
| Elasticsearch | `long`                    | search copy, see below                                                                                                          |

The [search copy](/reference/databases/elasticsearch.md) is written unless the property or the type sets `"search": false`.
Where a property is stored is explained in [placement](/reference/schemas/placement.md).

## Indices

`exact`, see [indices](/reference/indices.md). Nested properties can be indexed as well, see
[nested properties](/reference/indices.md#nested-properties).

## Limits

Whole numbers from -9223372036854775808 to 9223372036854775807 (64 bit). JSON numbers with a fraction, e.g. `1.5`, are
rejected, `1.0` is accepted as `1`.

## Example

Schema:

```json
{
  "type": "integer",
  "index": "exact"
}
```

Input and output:

```json
{
  "data": {
    "value": 42
  }
}
```

---

Home: [Ember Nexus API docs](/index.md)

Full site map: [llms.txt](/llms.txt)

Previous: [Boolean](/reference/schemas/types/boolean.md)

Next: [Number](/reference/schemas/types/number.md)
