adminforth
Advanced tools
Comparing version 1.13.0-next.3 to 1.13.0-next.4
@@ -27,3 +27,8 @@ import dayjs from 'dayjs'; | ||
try { | ||
this.client = await mysql.createConnection(url); | ||
this.client = mysql.createPool({ | ||
uri: url, | ||
waitForConnections: true, | ||
connectionLimit: 10, // Adjust based on your needs | ||
queueLimit: 0 | ||
}); | ||
} | ||
@@ -35,3 +40,3 @@ catch (e) { | ||
async discoverFields(resource) { | ||
const [results] = await this.client.query("SHOW COLUMNS FROM " + resource.table); | ||
const [results] = await this.client.execute("SHOW COLUMNS FROM " + resource.table); | ||
const fieldTypes = {}; | ||
@@ -252,3 +257,3 @@ results.forEach((row) => { | ||
} | ||
const [results] = await this.client.query(q, filterValues); | ||
const [results] = await this.client.execute(q, filterValues); | ||
return +results[0]["COUNT(*)"]; | ||
@@ -264,3 +269,3 @@ } | ||
} | ||
const [results] = await this.client.query(q); | ||
const [results] = await this.client.execute(q); | ||
const { min, max } = results[0]; | ||
@@ -267,0 +272,0 @@ result[col.name] = { |
{ | ||
"name": "adminforth", | ||
"version": "1.13.0-next.3", | ||
"version": "1.13.0-next.4", | ||
"description": "OpenSource Vue3 powered forth-generation admin panel", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1260732
18257