@@ -7,92 +7,92 @@ export = DbHelper;
77 */
88declare class DbHelper {
99
10- /**
11- * Constructor
12- *
13- * @param {object } config CodeceptJS configuration.
14- */
15- constructor ( config : object ) ;
10+ /**
11+ * Constructor
12+ *
13+ * @param {object } config CodeceptJS configuration.
14+ */
15+ constructor ( config : object ) ;
1616
17- /**
18- * Connects to the database described by the given connection string.
19- *
20- * @param {string|number } key Identification for using in other commands.
21- * @param {string|object } conn JDBC-like connection string or a connection object accepted by `database-js`.
22- * @param {object|undefined } driver [OPTIONAL] Driver object, used by `database-js`.
17+ /**
18+ * Connects to the database described by the given connection string.
2319 *
24- * @returns {Connection } DatabaseJS' connection
25- */
26- connect ( key : string | number , conn : string | object , driver ?: object ) : any ;
20+ * @param {string|number } key Identification for using in other commands.
21+ * @param {string|object } conn JDBC-like connection string or a connection object accepted by `database-js`.
22+ * @param {object|undefined } [driver] [OPTIONAL] Driver object, used by `database-js`.
23+ *
24+ * @returns {Connection } DatabaseJS' connection
25+ */
26+ connect ( key : string | number , conn : string | object , driver ?: object ) : any ;
2727
2828
29- /**
30- * Disconnects and removes the database connection identified by the given key.
31- *
32- * @param {string|number } key Database identification key set in connect().
29+ /**
30+ * Disconnects and removes the database connection identified by the given key.
3331 *
34- * @returns {Promise<boolean> } If it was successful.
35- */
36- disconnect ( key : string | number ) : Promise < boolean > ;
32+ * @param {string|number } key Database identification key set in connect().
33+ *
34+ * @returns {Promise<boolean> } If it was successful.
35+ */
36+ disconnect ( key : string | number ) : Promise < boolean > ;
3737
38- /**
39- * Disconnects and removes the database connection identified by the given key.
40- *
41- * @param {string|number } key Database identification key set in connect().
38+ /**
39+ * Disconnects and removes the database connection identified by the given key.
40+ *
41+ * @param {string|number } key Database identification key set in connect().
4242 *
4343 * @returns {Promise<boolean> } If it was successful.
44- */
45- removeConnection ( key : string | number ) : Promise < boolean > ;
46-
47- /**
48- * Performs a query.
49- *
50- * @param {string|number } key Database identification key set in connect().
51- * @param {string } command Query to run.
52- * @param {...any[]|undefined } params [OPTIONAL] Query parameters.
53- *
54- * @returns {Promise<any[]> } Query results.
55- */
56- query ( key : string | number , command : string , ...params : any [ ] ) : Promise < any [ ] > ;
44+ */
45+ removeConnection ( key : string | number ) : Promise < boolean > ;
5746
47+ /**
48+ * Performs a query.
49+ *
50+ * @param {string|number } key Database identification key set in connect().
51+ * @param {string } command Query to run.
52+ * @param {...any[]|undefined } [params] [OPTIONAL] Query parameters.
53+ *
54+ * @returns {Promise<any[]> } Query results.
55+ */
56+ query ( key : string | number , command : string , ...params : any [ ] ) : Promise < any [ ] > ;
5857
59- /**
60- * Executes a command.
61- *
62- * @param {string|number } key Database identification key set in connect().
63- * @param {string } command Command to run.
64- * @param {any[] } params [OPTIONAL] Command parameters.
65- *
66- * @returns {Promise<any[]> } Command results.
67- */
68- run ( key : string | number , command : string , ...params : any [ ] ) : Promise < any [ ] > ;
6958
70- /**
71- * Creates a database connection.
72- *
73- * @param {string|object } conn JDBC-like connection string or a connection object accepted by `database-js`.
74- * @param {object|undefined } driver [OPTIONAL] Driver object, used by `database-js`.
59+ /**
60+ * Executes a command.
61+ *
62+ * @param {string|number } key Database identification key set in connect().
63+ * @param {string } command Command to run.
64+ * @param {any[] } [params] [OPTIONAL] Command parameters.
7565 *
76- * @returns {Connection } DatabaseJS' connection
77- */
78- createConnection ( conn : string | object , driver ?: object ) : any ;
66+ * @returns {Promise<any[]> } Command results.
67+ */
68+ run ( key : string | number , command : string , ... params : any [ ] ) : Promise < any [ ] > ;
7969
8070 /**
81- * Checks if there is a database connection with the given key.
82- *
83- * @param {string|number } key Database identification key set in connect().
71+ * Creates a database connection.
8472 *
85- * @returns {boolean }
86- */
87- hasConnection ( key : string | number ) : boolean ;
73+ * @param {string|object } conn JDBC-like connection string or a connection object accepted by `database-js`.
74+ * @param {object|undefined } [driver] [OPTIONAL] Driver object, used by `database-js`.
75+ *
76+ * @returns {Connection } DatabaseJS' connection
77+ */
78+ createConnection ( conn : string | object , driver ?: object ) : any ;
8879
89- /**
90- * Gets the database connection with the given key.
91- *
92- * @param {string|number } key Database identification key set in connect().
80+ /**
81+ * Checks if there is a database connection with the given key.
82+ *
83+ * @param {string|number } key Database identification key set in connect().
84+ *
85+ * @returns {boolean }
86+ */
87+ hasConnection ( key : string | number ) : boolean ;
88+
89+ /**
90+ * Gets the database connection with the given key.
91+ *
92+ * @param {string|number } key Database identification key set in connect().
9393 *
9494 * @returns {Connection } DatabaseJS' connection.
95- */
96- getConnection ( key : string | number ) : any ;
95+ */
96+ getConnection ( key : string | number ) : any ;
9797
9898}
0 commit comments