badmfck-api-server 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -2,6 +2,7 @@ import { FieldInfo, MysqlError, Pool, PoolConnection } from "mysql";
|
|
2
2
|
import { BaseService } from "./BaseService";
|
3
3
|
import { Req } from "badmfck-signal";
|
4
4
|
export declare const REQ_MYSQL_QUERY: Req<MySqlQuery | MySqlQuery[], MysqlResult[]>;
|
5
|
+
export declare const executeQuery: (query: MySqlQuery | MySqlQuery[]) => Promise<MysqlResult[]>;
|
5
6
|
export interface MysqlServiceOptions {
|
6
7
|
connectionLimit: number;
|
7
8
|
host: string;
|
@@ -3,11 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.MysqlService = exports.REQ_MYSQL_QUERY = void 0;
|
6
|
+
exports.MysqlService = exports.executeQuery = exports.REQ_MYSQL_QUERY = void 0;
|
7
7
|
const mysql_1 = __importDefault(require("mysql"));
|
8
8
|
const BaseService_1 = require("./BaseService");
|
9
9
|
const badmfck_signal_1 = require("badmfck-signal");
|
10
10
|
exports.REQ_MYSQL_QUERY = new badmfck_signal_1.Req();
|
11
|
+
const executeQuery = async (query) => { return await exports.REQ_MYSQL_QUERY.request(query); };
|
12
|
+
exports.executeQuery = executeQuery;
|
11
13
|
class MysqlService extends BaseService_1.BaseService {
|
12
14
|
reconnectionTimeout = 1000 * 3;
|
13
15
|
reconnecting = false;
|