---
title: "SQL.ResultSet"
description: "Abstract SQL result set prototype."
canonical_url: "https://www.zeyos.com/zymba/ref/sql/sql-resultset"
markdown_url: "https://www.zeyos.com/ai/guide/zymba/ref/sql/sql-resultset.md"
section: "zymba-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/zymbaref.json"
source_sha256: "05a361c6ddc32e74f4a6dc16fd06f218210ff1b7ce57f26ca1994bfffc407915"
---

# SQL.ResultSet

## SQL.ResultSet

```
object @SQL.ResultSet(@Base) {
	close() {}
	countFields(): int {}
	countRows(): int {}
	exit() {}
	fetch(bool $indexed): object {}
	fetchAll(bool $indexed): object {}
	fetchAllOfField(int $index): object {}
	fetchTail(bool $indexed): object {}
	fetchTailOfField(int $index): object {}
	getFieldName(int $index): string {}
	getFieldTable(int $index): string {}
	getFieldType(int $index): int {}
	getPosition(): int {}
	hasMore(): bool {}
	listFieldNames(): object {}
	next(): object {}
	reset(): $this {}
	seek(int $position): $this {}
	skip(int $offset): $this {}
}
```

**Abstract SQL result set prototype.**

### Prototype

**[Base](#)**

## Methods


### `$this.close()`


Closes this result set and frees its associated resources.

```code
$this.close(): void
```




### `$this.countFields()`


```code
$this.countFields(): int
```

##### Returns

| Type | Value |
| --- | ---  |
| `int` |  |




### `$this.countRows()`


```code
$this.countRows(): int
```

##### Returns

| Type | Value |
| --- | ---  |
| `int` |  |




### `$this.exit()`


Closes this result set and frees its associated resources for the purpose of contextualization.

```code
$this.exit(): void
```




### `$this.fetch()`


```code
$this.fetch(bool $indexed): object
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| indexed | `bool`  |  | false |

##### Returns

| Type | Value |
| --- | ---  |
| `object` |  |
| `null` |  |




### `$this.fetchAll()`


```code
$this.fetchAll(bool $indexed): object
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| indexed | `bool`  |  | false |

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [row, ...] |




### `$this.fetchAllOfField()`


```code
$this.fetchAllOfField(int $index): object
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| index | `int`  |  | 0 |

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [value, ...] |




### `$this.fetchTail()`


```code
$this.fetchTail(bool $indexed): object
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| indexed | `bool`  |  | false |

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [row, ...] |




### `$this.fetchTailOfField()`


```code
$this.fetchTailOfField(int $index): object
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| index | `int`  |  | 0 |

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [value, ...] |




### `$this.getFieldName()`


```code
$this.getFieldName(int $index): string
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| index | `int`  |  | 0 |

##### Returns

| Type | Value |
| --- | ---  |
| `string` |  |




### `$this.getFieldTable()`


```code
$this.getFieldTable(int $index): string
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| index | `int`  |  | 0 |

##### Returns

| Type | Value |
| --- | ---  |
| `string` |  |




### `$this.getFieldType()`


```code
$this.getFieldType(int $index): int
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| index | `int`  |  | 0 |

##### Returns

| Type | Value |
| --- | ---  |
| `int` |  |
| `string` |  |




### `$this.getPosition()`


```code
$this.getPosition(): int
```

##### Returns

| Type | Value |
| --- | ---  |
| `int` |  |




### `$this.hasMore()`


```code
$this.hasMore(): bool
```

##### Returns

| Type | Value |
| --- | ---  |
| `bool` |  |




### `$this.listFieldNames()`


```code
$this.listFieldNames(): object
```

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [field, ...] |




### `$this.next()`


```code
$this.next(): object
```

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [position: row] |
| `null` |  |




### `$this.reset()`


```code
$this.reset(): this
```

##### Returns

| Type | Value |
| --- | ---  |
| `$this` |  |




### `$this.seek()`


```code
$this.seek(int $position): this
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| position | `int`  |  | 0 |

##### Returns

| Type | Value |
| --- | ---  |
| `$this` |  |




### `$this.skip()`


```code
$this.skip(int $offset): this
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| offset | `int`  |  | 1 |

##### Returns

| Type | Value |
| --- | ---  |
| `$this` |  |
