1.2.3 • Published 3 years ago

@amnesia-js/core v1.2.3

Weekly downloads
-
License
AGPL-3.0-or-later
Repository
github
Last release
3 years ago

Amnesia JS

AmnesiaDB Official Client

Example

Connect to locally hosted Amnesia DB

import { AmnesiaClient } from 'amnesia-client';

const am = new AmnesiaClient();
await am.connect({ port: 4224 });

Run a Query

let res = await am.query('SET a AS b WHERE TTL=10s NFETCH=2');
console.log(res) // OK

Alternatively

let res = await am.get('key');  // null
await am.set('key', 'value', { ttl: '20s', nfetch: 2 });
let res = await am.get('key');  // value
1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.0.0

3 years ago