Skip to content

Commit 67116cd

Browse files
Progress --> fixing the TinySqlQuery jsDoc.
1 parent 91d7f9a commit 67116cd

File tree

4 files changed

+142
-73
lines changed

4 files changed

+142
-73
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"pg": "^8.14.1",
2222
"sqlite": "^5.1.1",
2323
"sqlite3": "^5.1.7",
24-
"tiny-essentials": "^1.8.4"
24+
"tiny-essentials": "^1.8.5"
2525
},
2626
"keywords": [],
2727
"scripts": {

src/TinySQL.mjs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -816,35 +816,38 @@ class PuddySqlInstance {
816816
* @async
817817
* @param {string} query - The SQL query to execute.
818818
* @param {any[*]} [params] - The parameters to bind to the query.
819+
* @param {string} [debugName] - Optional label or context name for the debug log.
819820
* @returns {Promise<any[*]>} A promise that resolves to an array of rows.
820821
* @throws {Error} Throws an error if the query fails.
821822
*/
822823
// @ts-ignore
823-
all = (query, params) => new Promise((resolve) => resolve(null));
824+
all = (query, params, debugName = '') => new Promise((resolve) => resolve(null));
824825

825826
/**
826827
* Executes a query to get a single row from a database table.
827828
* @function
828829
* @async
829830
* @param {string} query - The SQL query to execute.
830831
* @param {any[*]} [params] - The parameters to bind to the query.
832+
* @param {string} [debugName] - Optional label or context name for the debug log.
831833
* @returns {Promise<Record<any, any>|null>} A promise that resolves to a single row object.
832834
* @throws {Error} Throws an error if the query fails.
833835
*/
834836
// @ts-ignore
835-
get = (query, params) => new Promise((resolve) => resolve(null));
837+
get = (query, params, debugName = '') => new Promise((resolve) => resolve(null));
836838

837839
/**
838840
* Executes an SQL statement to modify the database (e.g., INSERT, UPDATE).
839841
* @function
840842
* @async
841843
* @param {string} query - The SQL query to execute.
842844
* @param {any[*]} params - The parameters to bind to the query.
845+
* @param {string} [debugName] - Optional label or context name for the debug log.
843846
* @returns {Promise<Record<any, any>|null>} A promise that resolves to the result of the query execution.
844847
* @throws {Error} Throws an error if the query fails.
845848
*/
846849
// @ts-ignore
847-
run = (query, params) => new Promise((resolve) => resolve(null));
850+
run = (query, params, debugName = '') => new Promise((resolve) => resolve(null));
848851
}
849852

850853
export default PuddySqlInstance;

0 commit comments

Comments
 (0)