Home Reference Source
public class | source

DatabaseHandler

Abstraction for the Database, can be easily replaced with MongoDB or other non SQL DBs.

Constructor Summary

Public Constructor
public

Initializes the database and created the available collections.

Member Summary

Public Members
public

insert(collection: string, value: number, time: number, peer: string): *

Handles insertions into the Database.

public

receive(collection: string, peer: string, limit: number): *

Handles data retrievals from the Database.

Public Constructors

public constructor() source

Initializes the database and created the available collections.

Public Members

public insert(collection: string, value: number, time: number, peer: string): * source

Handles insertions into the Database.

public receive(collection: string, peer: string, limit: number): * source

Handles data retrievals from the Database.