@minatojs/driver-mysql
Advanced tools
Comparing version 2.0.4 to 2.1.0
@@ -34,3 +34,3 @@ import type { Pool, PoolConfig } from 'mysql'; | ||
_select<T extends {}>(table: string, fields: readonly (string & keyof T)[], conditional?: string, values?: readonly any[]): Promise<T[]>; | ||
drop(): Promise<void>; | ||
drop(table?: string): Promise<any>; | ||
stats(): Promise<Partial<Driver.Stats>>; | ||
@@ -37,0 +37,0 @@ get(sel: Selection.Immutable): Promise<any>; |
@@ -265,3 +265,2 @@ "use strict"; | ||
logger.info("auto updating table %c", name); | ||
console.log(operations); | ||
await this.queue(`ALTER TABLE ?? ${operations.join(", ")}`, [name]); | ||
@@ -318,3 +317,5 @@ } | ||
} | ||
async drop() { | ||
async drop(table) { | ||
if (table) | ||
return this.query(`DROP TABLE ${(0, import_sql_utils.escapeId)(table)}`); | ||
const data = await this._select("information_schema.tables", ["TABLE_NAME"], "TABLE_SCHEMA = ?", [this.config.database]); | ||
@@ -321,0 +322,0 @@ if (!data.length) |
{ | ||
"name": "@minatojs/driver-mysql", | ||
"version": "2.0.4", | ||
"version": "2.1.0", | ||
"description": "MySQL Driver for Minato", | ||
@@ -28,3 +28,3 @@ "main": "lib/index.js", | ||
"peerDependencies": { | ||
"@minatojs/core": "^2.0.3" | ||
"@minatojs/core": "^2.1.0" | ||
}, | ||
@@ -38,5 +38,5 @@ "devDependencies": { | ||
"@vlasky/mysql": "^2.18.5", | ||
"cosmokit": "^1.3.4", | ||
"reggol": "^1.3.2" | ||
"cosmokit": "^1.4.0", | ||
"reggol": "^1.3.4" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
47887
508
Updatedcosmokit@^1.4.0
Updatedreggol@^1.3.4