Comparing version 1.3.2 to 1.3.3
{ | ||
"name": "highsql", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "High level MySQL utility", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -59,3 +59,4 @@ /** | ||
} | ||
return this.query(sql, params); | ||
const [res, _] = await this.query(sql, params || []); | ||
return res; | ||
} | ||
@@ -62,0 +63,0 @@ async insert(table, values) { |
@@ -72,3 +72,3 @@ /** | ||
// Convenience methods for common operations | ||
async select(table: string, columns: string = '*', where?: string, params?: any[]): Promise<RowDataPacket[]> { | ||
async select(table: string, columns: string = '*', where?: string, params?: any[]): Promise<RowDataPacket> { | ||
let sql = `SELECT ${columns} FROM ${table}`; | ||
@@ -78,3 +78,4 @@ if (where) { | ||
} | ||
return this.query<RowDataPacket[]>(sql, params); | ||
const [res, _] = await this.query<RowDataPacket[]>(sql, params || []); | ||
return res; | ||
} | ||
@@ -81,0 +82,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16948
293