@mlagie/sql-connector 2.0.11 → 2.0.13
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 +2 -3
- package/docs/fr/README.md +4 -0
- package/index.d.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -117,10 +117,9 @@ const userSchema = new Schema({
|
|
|
117
117
|
type: Date,
|
|
118
118
|
default: sqlTypeMap.CurrentTimestamp
|
|
119
119
|
}
|
|
120
|
-
|
|
121
|
-
module.exports = new Model("User", userSchema);
|
|
122
|
-
|
|
123
120
|
});
|
|
121
|
+
|
|
122
|
+
module.exports = new Model("User", userSchema);
|
|
124
123
|
```
|
|
125
124
|
|
|
126
125
|
## Table synchronization
|
package/docs/fr/README.md
CHANGED
|
@@ -53,6 +53,8 @@ await logout();
|
|
|
53
53
|
| customize | `string` | Options SQL additionnelles |
|
|
54
54
|
|
|
55
55
|
```javascript
|
|
56
|
+
const { Schema, Model, sqlTypeMap } = require("@mlagie/sql-connector");
|
|
57
|
+
|
|
56
58
|
const userSchema = new Schema({
|
|
57
59
|
id: {
|
|
58
60
|
type: Number,
|
|
@@ -86,6 +88,8 @@ const userSchema = new Schema({
|
|
|
86
88
|
default: sqlTypeMap.CurrentTimestamp
|
|
87
89
|
}
|
|
88
90
|
});
|
|
91
|
+
|
|
92
|
+
module.exports = new Model("User", userSchema);
|
|
89
93
|
```
|
|
90
94
|
|
|
91
95
|
## Synchronisation des tables
|
package/index.d.ts
CHANGED
|
@@ -114,7 +114,7 @@ export class Model {
|
|
|
114
114
|
* @param {number} [options.limit] - Result limit.
|
|
115
115
|
* @returns {Promise<Array<Object>>}
|
|
116
116
|
*/
|
|
117
|
-
|
|
117
|
+
find(options?: {
|
|
118
118
|
select?: string[];
|
|
119
119
|
where?: Record<string, any>;
|
|
120
120
|
order?: [string, string][];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mlagie/sql-connector",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.13",
|
|
4
|
+
"description": "The sql-connector module allows you to manage connections to a MySQL database, define table schemas, and interact with data in a simple and efficient way.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"src",
|