pgator

Contains  database using logic

License
Subject to the terms of the MIT license, as written in the included LICENSE file.
Authors
Zaramzan

class  Database;

Represent database layer

Authors
Zaramzan

shared this(shared ILogger logger, immutable AppConfig appConfig);

Construct object from ILogger and configuration file.


shared void  setupPool();

configures async pool


shared void  createCache();

allocate shared cache


shared void  loadJsonSqlTable();

Loads main table from database

Throws
on ConnTimeoutException tries to reconnect

shared void  finalize();

 finalize database resources

TODO:
docs here

shared RpcResponse  query(ref RpcRequest req);

Queries parsed request from async pool

Also caches request if needed


shared bool  needAuth(string method);

Returns
true, if authorization required in json_rpc

shared void  dropcaches(string method);

Drop caches if needed