@mlagie/sql-connector 2.0.10 → 2.0.12
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/index.d.ts +2 -4
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -12,12 +12,11 @@ export type SqlType =
|
|
|
12
12
|
| "Text"
|
|
13
13
|
| "DateTime"
|
|
14
14
|
| "Timestamp";
|
|
15
|
-
|
|
16
15
|
export interface SchemaField {
|
|
17
16
|
type: SqlType | { name: SqlType };
|
|
18
17
|
length?: number;
|
|
19
18
|
required?: boolean;
|
|
20
|
-
default?: any;
|
|
19
|
+
default?: any | SqlType | "CurrentTimestamp";
|
|
21
20
|
unique?: boolean;
|
|
22
21
|
auto_increment?: boolean;
|
|
23
22
|
foreignKey?: string;
|
|
@@ -115,7 +114,7 @@ export class Model {
|
|
|
115
114
|
* @param {number} [options.limit] - Result limit.
|
|
116
115
|
* @returns {Promise<Array<Object>>}
|
|
117
116
|
*/
|
|
118
|
-
|
|
117
|
+
find(options?: {
|
|
119
118
|
select?: string[];
|
|
120
119
|
where?: Record<string, any>;
|
|
121
120
|
order?: [string, string][];
|
|
@@ -218,4 +217,3 @@ export class ModelInstance {
|
|
|
218
217
|
}
|
|
219
218
|
|
|
220
219
|
export const client: Record<string, any>;
|
|
221
|
-
export const sqlTypeMap: Record<SqlType, 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.12",
|
|
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",
|