mongo-portable
Version:
Portable Pure JS MongoDB - Based on Monglodb (https://github.com/euforic/monglodb.git) by Christian Sullivan (http://RogueSynaptics.com)
301 lines (175 loc) • 7.24 kB
Markdown
[Mongo Portable](../README.md) > [BaseStore](../classes/basestore.md)
# Class: BaseStore
## Hierarchy
**BaseStore**
## Implements
* [IAbstractStore](../interfaces/iabstractstore.md)
## Index
### Constructors
* [constructor](basestore.md#constructor)
### Methods
* [all](basestore.md#all)
* [backup](basestore.md#backup)
* [backups](basestore.md#backups)
* [createCollection](basestore.md#createcollection)
* [ensureIndex](basestore.md#ensureindex)
* [find](basestore.md#find)
* [findOne](basestore.md#findone)
* [insert](basestore.md#insert)
* [remove](basestore.md#remove)
* [removeBackup](basestore.md#removebackup)
* [restore](basestore.md#restore)
* [save](basestore.md#save)
* [update](basestore.md#update)
---
## Constructors
<a id="constructor"></a>
### constructor
⊕ **new BaseStore**(): [BaseStore](basestore.md)
*Defined in [store/BaseStore.ts:5](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/store/BaseStore.ts#L5)*
**Returns:** [BaseStore](basestore.md)
___
## Methods
<a id="all"></a>
### all
▸ **all**(event: *`any`*): `any` | `Promise`<`any`>
*Implementation of [IAbstractStore](../interfaces/iabstractstore.md).[all](../interfaces/iabstractstore.md#all)*
*Defined in [store/BaseStore.ts:20](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/store/BaseStore.ts#L20)*
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `any` |
**Returns:** `any` | `Promise`<`any`>
___
<a id="backup"></a>
### backup
▸ **backup**(event: *`any`*): `any` | `Promise`<`any`>
*Implementation of [IAbstractStore](../interfaces/iabstractstore.md).[backup](../interfaces/iabstractstore.md#backup)*
*Defined in [store/BaseStore.ts:44](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/store/BaseStore.ts#L44)*
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `any` |
**Returns:** `any` | `Promise`<`any`>
___
<a id="backups"></a>
### backups
▸ **backups**(event: *`any`*): `any` | `Promise`<`any`>
*Implementation of [IAbstractStore](../interfaces/iabstractstore.md).[backups](../interfaces/iabstractstore.md#backups)*
*Defined in [store/BaseStore.ts:48](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/store/BaseStore.ts#L48)*
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `any` |
**Returns:** `any` | `Promise`<`any`>
___
<a id="createcollection"></a>
### createCollection
▸ **createCollection**(event: *`any`*): `boolean` | `Promise`<`boolean`>
*Implementation of [IAbstractStore](../interfaces/iabstractstore.md).[createCollection](../interfaces/iabstractstore.md#createcollection)*
*Defined in [store/BaseStore.ts:8](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/store/BaseStore.ts#L8)*
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `any` |
**Returns:** `boolean` | `Promise`<`boolean`>
___
<a id="ensureindex"></a>
### ensureIndex
▸ **ensureIndex**(event: *`any`*): `any` | `Promise`<`any`>
*Implementation of [IAbstractStore](../interfaces/iabstractstore.md).[ensureIndex](../interfaces/iabstractstore.md#ensureindex)*
*Defined in [store/BaseStore.ts:40](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/store/BaseStore.ts#L40)*
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `any` |
**Returns:** `any` | `Promise`<`any`>
___
<a id="find"></a>
### find
▸ **find**(event: *`any`*): `any` | `Promise`<`any`>
*Implementation of [IAbstractStore](../interfaces/iabstractstore.md).[find](../interfaces/iabstractstore.md#find)*
*Defined in [store/BaseStore.ts:24](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/store/BaseStore.ts#L24)*
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `any` |
**Returns:** `any` | `Promise`<`any`>
___
<a id="findone"></a>
### findOne
▸ **findOne**(event: *`any`*): `any` | `Promise`<`any`>
*Implementation of [IAbstractStore](../interfaces/iabstractstore.md).[findOne](../interfaces/iabstractstore.md#findone)*
*Defined in [store/BaseStore.ts:28](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/store/BaseStore.ts#L28)*
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `any` |
**Returns:** `any` | `Promise`<`any`>
___
<a id="insert"></a>
### insert
▸ **insert**(event: *`any`*): `boolean` | `Promise`<`boolean`>
*Implementation of [IAbstractStore](../interfaces/iabstractstore.md).[insert](../interfaces/iabstractstore.md#insert)*
*Defined in [store/BaseStore.ts:12](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/store/BaseStore.ts#L12)*
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `any` |
**Returns:** `boolean` | `Promise`<`boolean`>
___
<a id="remove"></a>
### remove
▸ **remove**(event: *`any`*): `boolean` | `Promise`<`boolean`>
*Implementation of [IAbstractStore](../interfaces/iabstractstore.md).[remove](../interfaces/iabstractstore.md#remove)*
*Defined in [store/BaseStore.ts:36](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/store/BaseStore.ts#L36)*
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `any` |
**Returns:** `boolean` | `Promise`<`boolean`>
___
<a id="removebackup"></a>
### removeBackup
▸ **removeBackup**(event: *`any`*): `any` | `Promise`<`any`>
*Implementation of [IAbstractStore](../interfaces/iabstractstore.md).[removeBackup](../interfaces/iabstractstore.md#removebackup)*
*Defined in [store/BaseStore.ts:52](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/store/BaseStore.ts#L52)*
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `any` |
**Returns:** `any` | `Promise`<`any`>
___
<a id="restore"></a>
### restore
▸ **restore**(event: *`any`*): `any` | `Promise`<`any`>
*Implementation of [IAbstractStore](../interfaces/iabstractstore.md).[restore](../interfaces/iabstractstore.md#restore)*
*Defined in [store/BaseStore.ts:56](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/store/BaseStore.ts#L56)*
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `any` |
**Returns:** `any` | `Promise`<`any`>
___
<a id="save"></a>
### save
▸ **save**(event: *`any`*): `any` | `Promise`<`any`>
*Implementation of [IAbstractStore](../interfaces/iabstractstore.md).[save](../interfaces/iabstractstore.md#save)*
*Defined in [store/BaseStore.ts:16](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/store/BaseStore.ts#L16)*
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `any` |
**Returns:** `any` | `Promise`<`any`>
___
<a id="update"></a>
### update
▸ **update**(event: *`any`*): `boolean` | `Promise`<`boolean`>
*Implementation of [IAbstractStore](../interfaces/iabstractstore.md).[update](../interfaces/iabstractstore.md#update)*
*Defined in [store/BaseStore.ts:32](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/store/BaseStore.ts#L32)*
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `any` |
**Returns:** `boolean` | `Promise`<`boolean`>
___