Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="https://raw.githubusercontent.com/trust0-project/RIDB/refs/heads/main/logo.svg" alt="JavaScript Database" />
<img src="./resources/ridb-dark.svg" alt="JavaScript Database" />
<br />
<br />
<h3 align="center">A secure light-weight and dependency free database wrapper for the web.</h3>
Expand Down
6 changes: 3 additions & 3 deletions docs/@trust0/ridb-core/classes/BasePlugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Class: BasePlugin

Defined in: ridb\_core.d.ts:579
Defined in: ridb\_core.d.ts:197

## Implements

Expand All @@ -28,7 +28,7 @@ Defined in: ridb\_core.d.ts:579

> `optional` **docCreateHook**: [`Hook`](../type-aliases/Hook.md)

Defined in: ridb\_core.d.ts:580
Defined in: ridb\_core.d.ts:198

#### Implementation of

Expand All @@ -40,7 +40,7 @@ Defined in: ridb\_core.d.ts:580

> `optional` **docRecoverHook**: [`Hook`](../type-aliases/Hook.md)

Defined in: ridb\_core.d.ts:581
Defined in: ridb\_core.d.ts:199

#### Implementation of

Expand Down
34 changes: 17 additions & 17 deletions docs/@trust0/ridb-core/classes/BaseStorage.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@

# Class: BaseStorage\<Schemas\>

Defined in: ridb\_core.d.ts:343
Defined in: ridb\_core.d.ts:571

## Extends

- [`StorageInternal`](StorageInternal.md)\<`Schemas`\>

## Extended by

- [`InMemory`](InMemory.md)
- [`IndexDB`](IndexDB.md)
- [`InMemory`](InMemory.md)

## Type Parameters

Expand All @@ -29,7 +29,7 @@ Defined in: ridb\_core.d.ts:343

> **new BaseStorage**\<`Schemas`\>(`dbName`, `schemas`, `options?`): `BaseStorage`\<`Schemas`\>

Defined in: ridb\_core.d.ts:353
Defined in: ridb\_core.d.ts:581

#### Parameters

Expand Down Expand Up @@ -59,39 +59,39 @@ Defined in: ridb\_core.d.ts:353

> `readonly` **core**: [`CoreStorage`](CoreStorage.md)

Defined in: ridb\_core.d.ts:361
Defined in: ridb\_core.d.ts:589

***

### dbName

> `readonly` **dbName**: `string`

Defined in: ridb\_core.d.ts:358
Defined in: ridb\_core.d.ts:586

***

### options

> `readonly` **options**: [`BaseStorageOptions`](../type-aliases/BaseStorageOptions.md)

Defined in: ridb\_core.d.ts:360
Defined in: ridb\_core.d.ts:588

***

### schemas

> `readonly` **schemas**: `Record`\<keyof `Schemas`, [`Schema`](Schema.md)\<`Schemas`\[keyof `Schemas`\]\>\>

Defined in: ridb\_core.d.ts:359
Defined in: ridb\_core.d.ts:587

## Methods

### addIndexSchemas()

> **addIndexSchemas**(): `null`

Defined in: ridb\_core.d.ts:371
Defined in: ridb\_core.d.ts:599

#### Returns

Expand All @@ -103,7 +103,7 @@ Defined in: ridb\_core.d.ts:371

> **close**(): `Promise`\<`void`\>

Defined in: ridb\_core.d.ts:363
Defined in: ridb\_core.d.ts:591

#### Returns

Expand All @@ -119,7 +119,7 @@ Defined in: ridb\_core.d.ts:363

> **count**(`colectionName`, `query`, `options?`): `Promise`\<`number`\>

Defined in: ridb\_core.d.ts:364
Defined in: ridb\_core.d.ts:592

#### Parameters

Expand Down Expand Up @@ -149,7 +149,7 @@ keyof `Schemas`

> **find**(`collectionName`, `query`, `options?`): `Promise`\<[`Doc`](../type-aliases/Doc.md)\<`Schemas`\[keyof `Schemas`\]\>[]\>

Defined in: ridb\_core.d.ts:366
Defined in: ridb\_core.d.ts:594

#### Parameters

Expand Down Expand Up @@ -179,7 +179,7 @@ keyof `Schemas`

> **findDocumentById**(`collectionName`, `id`): `Promise`\<`null` \| [`Doc`](../type-aliases/Doc.md)\<`Schemas`\[keyof `Schemas`\]\>\>

Defined in: ridb\_core.d.ts:365
Defined in: ridb\_core.d.ts:593

#### Parameters

Expand All @@ -205,7 +205,7 @@ keyof `Schemas`

> **getOption**(`name`): `undefined` \| `string` \| `number` \| `boolean`

Defined in: ridb\_core.d.ts:368
Defined in: ridb\_core.d.ts:596

#### Parameters

Expand All @@ -223,7 +223,7 @@ Defined in: ridb\_core.d.ts:368

> **getSchema**(`name`): [`Schema`](Schema.md)\<`any`\>

Defined in: ridb\_core.d.ts:369
Defined in: ridb\_core.d.ts:597

#### Parameters

Expand All @@ -241,7 +241,7 @@ Defined in: ridb\_core.d.ts:369

> **start**(): `Promise`\<`void`\>

Defined in: ridb\_core.d.ts:362
Defined in: ridb\_core.d.ts:590

#### Returns

Expand All @@ -257,7 +257,7 @@ Defined in: ridb\_core.d.ts:362

> **write**(`op`): `Promise`\<[`Doc`](../type-aliases/Doc.md)\<`Schemas`\[keyof `Schemas`\]\>\>

Defined in: ridb\_core.d.ts:367
Defined in: ridb\_core.d.ts:595

#### Parameters

Expand All @@ -279,7 +279,7 @@ Defined in: ridb\_core.d.ts:367

> `static` **create**\<`SchemasCreate`\>(`dbName`, `schemas`, `options?`): `Promise`\<`BaseStorage`\<`SchemasCreate`\>\>

Defined in: ridb\_core.d.ts:344
Defined in: ridb\_core.d.ts:572

#### Type Parameters

Expand Down
14 changes: 7 additions & 7 deletions docs/@trust0/ridb-core/classes/Collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Class: Collection\<T\>

Defined in: ridb\_core.d.ts:293
Defined in: ridb\_core.d.ts:342

Collection is a class that represents a collection of documents in a database.

Expand Down Expand Up @@ -34,7 +34,7 @@ A schema type defining the structure of the documents in the collection.

> **count**(`query`, `options?`): `Promise`\<`number`\>

Defined in: ridb\_core.d.ts:305
Defined in: ridb\_core.d.ts:354

count all documents in the collection.

Expand All @@ -60,7 +60,7 @@ A promise that resolves to an array of documents.

> **create**(`document`): `Promise`\<[`Doc`](../type-aliases/Doc.md)\<`T`\>\>

Defined in: ridb\_core.d.ts:326
Defined in: ridb\_core.d.ts:375

Creates a new document in the collection.

Expand All @@ -84,7 +84,7 @@ A promise that resolves to the created document.

> **delete**(`id`): `Promise`\<`void`\>

Defined in: ridb\_core.d.ts:333
Defined in: ridb\_core.d.ts:382

Deletes a document in the collection by its ID.

Expand All @@ -108,7 +108,7 @@ A promise that resolves when the deletion is complete.

> **find**(`query`, `options?`): `Promise`\<[`Doc`](../type-aliases/Doc.md)\<`T`\>[]\>

Defined in: ridb\_core.d.ts:299
Defined in: ridb\_core.d.ts:348

Finds all documents in the collection.

Expand All @@ -134,7 +134,7 @@ A promise that resolves to an array of documents.

> **findById**(`id`): `Promise`\<[`Doc`](../type-aliases/Doc.md)\<`T`\>\>

Defined in: ridb\_core.d.ts:312
Defined in: ridb\_core.d.ts:361

Finds a single document in the collection by its ID.

Expand All @@ -158,7 +158,7 @@ A promise that resolves to the found document.

> **update**(`document`): `Promise`\<`void`\>

Defined in: ridb\_core.d.ts:319
Defined in: ridb\_core.d.ts:368

Updates a document in the collection by its ID.

Expand Down
8 changes: 4 additions & 4 deletions docs/@trust0/ridb-core/classes/CoreStorage.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Class: CoreStorage

Defined in: ridb\_core.d.ts:76
Defined in: ridb\_core.d.ts:388

## Constructors

Expand All @@ -24,7 +24,7 @@ Defined in: ridb\_core.d.ts:76

> **getIndexes**(`schema`, `op`): `string`[]

Defined in: ridb\_core.d.ts:84
Defined in: ridb\_core.d.ts:396

#### Parameters

Expand All @@ -46,7 +46,7 @@ Defined in: ridb\_core.d.ts:84

> **getPrimaryKeyTyped**(`value`): `string` \| `number`

Defined in: ridb\_core.d.ts:83
Defined in: ridb\_core.d.ts:395

#### Parameters

Expand All @@ -64,7 +64,7 @@ Defined in: ridb\_core.d.ts:83

> **matchesQuery**(`document`, `query`): `boolean`

Defined in: ridb\_core.d.ts:82
Defined in: ridb\_core.d.ts:394

#### Parameters

Expand Down
14 changes: 7 additions & 7 deletions docs/@trust0/ridb-core/classes/Database.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Class: Database\<T\>

Defined in: ridb\_core.d.ts:118
Defined in: ridb\_core.d.ts:457

Represents a database containing collections of documents.
RIDB extends from this class and is used to expose collections.
Expand Down Expand Up @@ -58,7 +58,7 @@ A record of schema types.

> `readonly` **collections**: \{ \[name in string \| number \| symbol\]: Collection\<Schema\<T\[name\]\>\> \}

Defined in: ridb\_core.d.ts:148
Defined in: ridb\_core.d.ts:487

The collections in the database.

Expand All @@ -70,15 +70,15 @@ This is a read-only property where the key is the name of the collection and the

> `readonly` **started**: `boolean`

Defined in: ridb\_core.d.ts:152
Defined in: ridb\_core.d.ts:491

## Methods

### authenticate()

> **authenticate**(`password`): `Promise`\<`boolean`\>

Defined in: ridb\_core.d.ts:141
Defined in: ridb\_core.d.ts:480

#### Parameters

Expand All @@ -96,7 +96,7 @@ Defined in: ridb\_core.d.ts:141

> **close**(): `Promise`\<`void`\>

Defined in: ridb\_core.d.ts:166
Defined in: ridb\_core.d.ts:505

Closes the database.

Expand All @@ -112,7 +112,7 @@ A promise that resolves when the database is closed.

> **start**(): `Promise`\<`void`\>

Defined in: ridb\_core.d.ts:159
Defined in: ridb\_core.d.ts:498

Starts the database.

Expand All @@ -128,7 +128,7 @@ A promise that resolves when the database is started.

> `static` **create**\<`TS`\>(`db_name`, `schemas`, `migrations`, `plugins`, `options`, `password?`, `storage?`): `Promise`\<`Database`\<`TS`\>\>

Defined in: ridb\_core.d.ts:131
Defined in: ridb\_core.d.ts:470

Creates a new `Database` instance with the provided schemas and storage module.

Expand Down
Loading
Loading