Skip to content

LokiInMemoryAdapter

In-memory data adapter using LokiJS

  • Usage: const dataAdapter = new LokiInMemoryAdapter();
  • Requires: bun add lokijs and bun add -D @types/lokijs

See

LokiJS

Extends

  • BaseLokiAdapter

Constructors

new LokiInMemoryAdapter()

new LokiInMemoryAdapter(options?): LokiInMemoryAdapter

Parameters

options?: Partial<LokiInMemoryAdapterOptions>

Returns

LokiInMemoryAdapter

Overrides

BaseLokiAdapter.constructor

Defined in

src/dataAdapters/LokiInMemoryAdapter.ts:28

Properties

db

db: LokiConstructor

Database

  • Initialized at async constructor

Inherited from

BaseLokiAdapter.db

Defined in

src/dataAdapters/BaseLokiAdapter.ts:10


options

options: LokiInMemoryAdapterOptions

Options

Defined in

src/dataAdapters/LokiInMemoryAdapter.ts:26


sessions

sessions: Collection<OIDCClientSession>

Sessions collection

  • Initialized at async constructor

Inherited from

BaseLokiAdapter.sessions

Defined in

src/dataAdapters/BaseLokiAdapter.ts:15

Methods

close()

readonly close(): void

Close database

Returns

void

Inherited from

BaseLokiAdapter.close

Defined in

src/dataAdapters/BaseLokiAdapter.ts:71


delete()

readonly delete(sessionId): void

Delete session

Parameters

sessionId: string

Session ID

Returns

void

Inherited from

BaseLokiAdapter.delete

Defined in

src/dataAdapters/BaseLokiAdapter.ts:58


fetch()

readonly fetch(sessionId): null | OIDCClientSession

Fetch session

Parameters

sessionId: string

Session ID

Returns

null | OIDCClientSession

Inherited from

BaseLokiAdapter.fetch

Defined in

src/dataAdapters/BaseLokiAdapter.ts:21


insert()

readonly insert(session): void

Insert session

Parameters

session: OIDCClientSession

Session

Returns

void

Inherited from

BaseLokiAdapter.insert

Defined in

src/dataAdapters/BaseLokiAdapter.ts:33


prune()

prune(): void

Prune expired sessions

Returns

void

Inherited from

BaseLokiAdapter.prune

Defined in

src/dataAdapters/BaseLokiAdapter.ts:63


update()

readonly update(session): void

Update session

Parameters

session: OIDCClientSession

Session

Returns

void

Inherited from

BaseLokiAdapter.update

Defined in

src/dataAdapters/BaseLokiAdapter.ts:41