1.13.0 • Published 5 years ago

webiny-entity-memory v1.13.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

webiny-entity-memory

A memory storage driver for entity layer.

Installation

yarn add webiny-entity-memory

Usage

The following code shows how to configure and assign Memory driver.

import { MemoryDriver } from "webiny-entity-memory";
import { Entity as BaseEntity } from "webiny-entity";

class Entity extends BaseEntity {}
Entity.driver = new MemoryDriver();

export default Entity;

After the driver has been set, you can start defining your entities, for example:

import Entity from "./memoryEntity.js";

class User extends Entity {
    constructor() {
        super();
        this.attr('firstName').char();
        this.attr('lastName').char();
    }
}
1.13.0

5 years ago

1.12.7

5 years ago

1.12.6

5 years ago

1.12.5

5 years ago

1.12.4

5 years ago

1.12.3

5 years ago

1.12.2

5 years ago

1.12.1

5 years ago

1.12.0

5 years ago

1.11.0

5 years ago

1.10.5

5 years ago

1.10.4

5 years ago

1.10.3

5 years ago

1.10.2

5 years ago

1.10.1

5 years ago

1.10.0

5 years ago

1.9.0

5 years ago

1.8.1

5 years ago

1.8.0

5 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago