@flutry/sequelize 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -26
- package/dist/utils/connect.js +1 -1
- package/dist/utils/databaseWrap.js +1 -1
- package/package.json +22 -22
package/README.md
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
# @flutry/sequelize
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-
|
|
5
|
-
A fully customizable sequelize integration for Flutry projects, with automatic model loading, database connection, and support for advanced features like associations and hooks.
|
|
6
|
-
|
|
7
|
-
## 🔧 Features
|
|
8
|
-
|
|
9
|
-
- 🔌 Automatically connects to the database using Flutry configuration.
|
|
10
|
-
- 📦 Dynamically loads all sequelize models from the `models/` directory.
|
|
11
|
-
- 🛠️ Built-in support for model synchronization.
|
|
12
|
-
- 🔁 Integrates smoothly with the Flutry dynamic adapters system.
|
|
13
|
-
- 🔍 Enhanced error handling and logging for development.
|
|
14
|
-
|
|
15
|
-
## Access Database Type
|
|
16
|
-
|
|
17
|
-
- mysql
|
|
18
|
-
- mariadb
|
|
19
|
-
|
|
20
|
-
## 📄 Licenc
|
|
21
|
-
|
|
22
|
-
MIT
|
|
23
|
-
|
|
24
|
-
## 🌐 Website
|
|
25
|
-
|
|
26
|
-
The official website of the package: [https://flutry.com/docs/package/sequelize](https://flutry.com/docs/package/sequelize)
|
|
1
|
+
# @flutry/sequelize
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
A fully customizable sequelize integration for Flutry projects, with automatic model loading, database connection, and support for advanced features like associations and hooks.
|
|
6
|
+
|
|
7
|
+
## 🔧 Features
|
|
8
|
+
|
|
9
|
+
- 🔌 Automatically connects to the database using Flutry configuration.
|
|
10
|
+
- 📦 Dynamically loads all sequelize models from the `models/` directory.
|
|
11
|
+
- 🛠️ Built-in support for model synchronization.
|
|
12
|
+
- 🔁 Integrates smoothly with the Flutry dynamic adapters system.
|
|
13
|
+
- 🔍 Enhanced error handling and logging for development.
|
|
14
|
+
|
|
15
|
+
## Access Database Type
|
|
16
|
+
|
|
17
|
+
- mysql
|
|
18
|
+
- mariadb
|
|
19
|
+
|
|
20
|
+
## 📄 Licenc
|
|
21
|
+
|
|
22
|
+
MIT
|
|
23
|
+
|
|
24
|
+
## 🌐 Website
|
|
25
|
+
|
|
26
|
+
The official website of the package: [https://flutry.com/docs/package/sequelize](https://flutry.com/docs/package/sequelize)
|
package/dist/utils/connect.js
CHANGED
|
@@ -25,7 +25,7 @@ class Flutry_Connect {
|
|
|
25
25
|
});
|
|
26
26
|
try {
|
|
27
27
|
await Flutry_Connect.sequelize.authenticate();
|
|
28
|
-
|
|
28
|
+
main_1.Flutry_Sequelize.logger.info('Connection has been established successfully');
|
|
29
29
|
await new models_1.Flutry_Models();
|
|
30
30
|
this.retryCount = 0; // Reset retry count on successful connection
|
|
31
31
|
}
|
|
@@ -17,7 +17,7 @@ class FlutryDatabase {
|
|
|
17
17
|
static async update(model, values, options) {
|
|
18
18
|
const result = await model.update(values, { ...options, returning: true });
|
|
19
19
|
if (Array.isArray(result)) {
|
|
20
|
-
const [
|
|
20
|
+
const [_count, updatedRows] = result;
|
|
21
21
|
if (Array.isArray(updatedRows)) {
|
|
22
22
|
return updatedRows.map((row) => row.get({ plain: true }));
|
|
23
23
|
}
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@flutry/sequelize",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"main": "dist/index.js",
|
|
5
|
-
"types": "dist/index.d.ts",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist"
|
|
8
|
-
],
|
|
9
|
-
"scripts": {
|
|
10
|
-
"build": "tsc"
|
|
11
|
-
},
|
|
12
|
-
"license": "MIT",
|
|
13
|
-
"dependencies": {
|
|
14
|
-
"dotenv": "^17.
|
|
15
|
-
"mariadb": "^3.4.
|
|
16
|
-
"mysql2": "^3.
|
|
17
|
-
"sequelize": "^6.37.7"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"typescript": "^5.
|
|
21
|
-
}
|
|
22
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@flutry/sequelize",
|
|
3
|
+
"version": "0.0.8",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc"
|
|
11
|
+
},
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"dotenv": "^17.2.3",
|
|
15
|
+
"mariadb": "^3.4.5",
|
|
16
|
+
"mysql2": "^3.15.2",
|
|
17
|
+
"sequelize": "^6.37.7"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"typescript": "^5.9.3"
|
|
21
|
+
}
|
|
22
|
+
}
|