# Get

## Get Record From Tag <a href="#from-tag" id="from-tag"></a>

{% code lineNumbers="true" %}

```javascript
db.get('tag')
```

{% endcode %}

<table><thead><tr><th>Parameter</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>tag</td><td>The Record's tag</td><td>String</td><td>true</td></tr></tbody></table>

## Get Record information <a href="#info" id="info"></a>

### Content <a href="#content" id="content"></a>

{% hint style="info" %}
Data was renamed to content in [v2.3.0](https://db.coolstone.dev/2/log#v2.3.0-09-03-2022)
{% endhint %}

{% code lineNumbers="true" %}

```javascript
db.get('tag').content
```

{% endcode %}

### Path <a href="#path" id="path"></a>

{% tabs %}
{% tab title="Path property" %}
{% code lineNumbers="true" %}

```javascript
db.get('tag').path
```

{% endcode %}

<pre class="language-javascript" data-line-numbers><code class="lang-javascript"><strong>db.get('tag').realpath
</strong></code></pre>

{% endtab %}

{% tab title="Find method" %}
{% code lineNumbers="true" %}

```javascript
db.find('tag', realpath)
```

{% endcode %}

<table><thead><tr><th>Parameter</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>tag</td><td>Record's tag</td><td>string</td><td>true</td></tr><tr><td>realpath</td><td>Return realpath</td><td>bool</td><td>false</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

### Tag <a href="#tag" id="tag"></a>

{% code lineNumbers="true" %}

```javascript
db.get('tag').tag
```

{% endcode %}

## Get Database name <a href="#all" id="all"></a>

{% code lineNumbers="true" %}

```javascript
db.name
```

{% endcode %}

## Get all Records <a href="#all" id="all"></a>

{% code lineNumbers="true" %}

```javascript
db.getAll(returnType)
```

{% endcode %}

<table><thead><tr><th>Parameter</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>returnType</td><td>Read about it <a href="../miscellaneous#returntype">here</a></td><td>Number</td><td>true</td></tr></tbody></table>

## Search Tags

{% code lineNumbers="true" %}

```javascript
db.searchTags('term',returnType)
```

{% endcode %}

<table><thead><tr><th>Parameter</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>term</td><td>The search term</td><td>String</td><td>true</td></tr><tr><td>returnType</td><td>Read about it <a href="../miscellaneous#returntype">here</a></td><td>Number</td><td>true</td></tr></tbody></table>

## Search Record Content <a href="#search-content" id="search-content"></a>

{% code lineNumbers="true" %}

```javascript
db.get("tag").search('query','splitBy')
```

{% endcode %}

### Search Object Keys (JSON Only) <a href="#search-keys" id="search-keys"></a>

{% code lineNumbers="true" %}

```javascript
db.searchKeys('query') // splitBy is not a param for the searchKeys method
```

{% endcode %}

<table><thead><tr><th>Parameter</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>query</td><td>Search query</td><td>String</td><td>true</td></tr><tr><td>splitBy</td><td>String to split the Record's content by. For example, \n for lines or " " for spaces. If not present, Dubnium will default to space.</td><td>String</td><td>true</td></tr></tbody></table>

## Get Record from Value (JSON Only) <a href="#from-value" id="from-value"></a>

{% code lineNumbers="true" %}

```javascript
db.getFromValue('key','value',returnType)
```

{% endcode %}

<table><thead><tr><th>Parameter</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>key</td><td>The key to get from</td><td>String</td><td>true</td></tr><tr><td>value</td><td>The value to get from</td><td>String</td><td>true</td></tr><tr><td>returnType</td><td>Read about it <a href="../miscellaneous#returntype">here</a></td><td>Number</td><td>true</td></tr></tbody></table>

## Check if a Record exists <a href="#exists" id="exists"></a>

{% hint style="info" %}
This will only return `true` or `false`.
{% endhint %}

{% code lineNumbers="true" %}

```javascript
db.has('tag')
```

{% endcode %}

<table><thead><tr><th>Parameter</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>tag</td><td>The tag to check for</td><td>String</td><td>true</td></tr></tbody></table>
