# Class: Operation

## Operation

#### new Operation(name)

The operation class, used to store details about an operation being performed by the database.

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | String | The name of the operation.

Source:
  - Operation.js, line 12

### Methods

- flag(key, val) → {*}
- log(event) → {*}
- start()
- stop()
- time(section) → {*}

#### flag(key, val) → {*}

Used to set key/value flags during operation execution.

##### Parameters:

Name | Type | Description
--- | --- | ---
`key` | String |
`val` | String |

Source:
  - Operation.js, line 111

##### Returns:

Type
  *

#### log(event) → {*}

Adds an item to the operation log.

##### Parameters:

Name | Type | Description
--- | --- | ---
`event` | String | The item to log.

Source:
  - Operation.js, line 52

##### Returns:

Type
  *

#### start()

Starts the operation timer.

Source:
  - Operation.js, line 43

#### stop()

Stops the operation timer.

Source:
  - Operation.js, line 140

#### time(section) → {*}

Called when starting and ending a timed operation, used to time internal calls within an operation's execution.

##### Parameters:

Name | Type | Description
--- | --- | ---
`section` | String | An operation name.

Source:
  - Operation.js, line 79

##### Returns:

Type
  *