[API reference](https://evolu.dev/docs/api-reference) › [@evolu/sqlite-wasm](https://evolu.dev/docs/api-reference/sqlite-wasm) › SahPool

Defined in: [packages/sqlite-wasm/src/SahPool.ts:388](https://github.com/evoluhq/evolu/blob/bc4578a260dd15d5bbf94b83765ca05984d194cb/packages/sqlite-wasm/src/SahPool.ts#L388)

A pool of sync access handles, and the VFS SQLite opens its files with, on
which File and EncryptedFile databases open.

## Extends

- [`Disposable`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-2.html#using-declarations-and-explicit-resource-management)

## Properties

<a id="clearfailure"></a>

### clearFailure

```ts
readonly clearFailure: () => void;
```

Defined in: [packages/sqlite-wasm/src/SahPool.ts:406](https://github.com/evoluhq/evolu/blob/bc4578a260dd15d5bbf94b83765ca05984d194cb/packages/sqlite-wasm/src/SahPool.ts#L406)

Forgets the recorded failure; a database calls it before each operation
that does not run inside another operation on the pool.

---

<a id="getfailure"></a>

### getFailure

```ts
readonly getFailure: () =>
  | SqliteVfsFailure
  | null;
```

Defined in: [packages/sqlite-wasm/src/SahPool.ts:400](https://github.com/evoluhq/evolu/blob/bc4578a260dd15d5bbf94b83765ca05984d194cb/packages/sqlite-wasm/src/SahPool.ts#L400)

Returns the first failure a method of the pool recorded since the last
[SahPool.clearFailure](https://evolu.dev/docs/api-reference/sqlite-wasm/interfaces/SahPool#clearfailure), which a [SqliteError](https://evolu.dev/docs/api-reference/sqlite-wasm/interfaces/SqliteError) carries as its
cause.

---

<a id="getpaths"></a>

### getPaths

```ts
readonly getPaths: () => readonly string[];
```

Defined in: [packages/sqlite-wasm/src/SahPool.ts:414](https://github.com/evoluhq/evolu/blob/bc4578a260dd15d5bbf94b83765ca05984d194cb/packages/sqlite-wasm/src/SahPool.ts#L414)

Returns the canonical paths of the files the pool has, databases and their
journals, such as `/evolu1.db`, so a database opened at a
[SqliteVfsPath](https://evolu.dev/docs/api-reference/sqlite-wasm/variables/SqliteVfsPath) is listed by that path. A file SQLite's opfs-sahpool
opened as `evolu1.db` is listed as `/evolu1.db`.

---

<a id="read"></a>

### read

```ts
readonly read: (path: string, offset: number & Brand<"NonNaN"> & Brand<"Finite"> & Brand<"Int"> & Brand<"NonNegative">, byteLength: number & Brand<"NonNaN"> & Brand<"Finite"> & Brand<"Int"> & Brand<"NonNegative">) => Result<Uint8Array<ArrayBuffer>,
  | SqliteVfsIoError
| SahPoolFileNotFoundError>;
```

Defined in: [packages/sqlite-wasm/src/SahPool.ts:433](https://github.com/evoluhq/evolu/blob/bc4578a260dd15d5bbf94b83765ca05984d194cb/packages/sqlite-wasm/src/SahPool.ts#L433)

Reads bytes of a file without SQLite, such as the first 16 bytes of an
encrypted database, which are its cipher salt. The path is one
[SahPool.getPaths](https://evolu.dev/docs/api-reference/sqlite-wasm/interfaces/SahPool#getpaths) returns, and the offset counts from the start of
the file's data, after the header. Fewer bytes come back at the end of the
file.

---

<a id="unlink"></a>

### unlink

```ts
readonly unlink: (path: string) => Result<boolean, SqliteVfsIoError>;
```

Defined in: [packages/sqlite-wasm/src/SahPool.ts:424](https://github.com/evoluhq/evolu/blob/bc4578a260dd15d5bbf94b83765ca05984d194cb/packages/sqlite-wasm/src/SahPool.ts#L424)

Deletes the file with a canonical path, as [SahPool.getPaths](https://evolu.dev/docs/api-reference/sqlite-wasm/interfaces/SahPool#getpaths) returns
it, and the files SQLite keeps beside it, such as its `-journal`. The file
goes first, so a failure never leaves a database without the journal that
would roll it back. Returns false when the pool has no file with the path,
as for a path that is not canonical, and throws when a connection has one
of the files open.

---

<a id="vfsname"></a>

### vfsName

```ts
readonly vfsName: string;
```

Defined in: [packages/sqlite-wasm/src/SahPool.ts:393](https://github.com/evoluhq/evolu/blob/bc4578a260dd15d5bbf94b83765ca05984d194cb/packages/sqlite-wasm/src/SahPool.ts#L393)

The name of the pool's VFS, which a database opens its path with, such as
`opfs-sahpool:.evolu`. It names Evolu's codec over the pool.

## Methods

<a id="dispose"></a>

### \[dispose\]()

```ts
[dispose](): void;
```

Defined in: node\_modules/@typescript/old/lib/lib.esnext.disposable.d.ts:34

#### Inherited from

```ts
Disposable.[dispose]
```