mrepo-sql 1.0.4 → 1.0.5

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/dist/db/repo.js CHANGED
@@ -41,7 +41,7 @@ export class BaseRepository {
41
41
  try {
42
42
  conn = await this.pool.getConnection();
43
43
  const declareOutVars = out.length
44
- ? out.map(({ name, type }) => `SET @${name} = CAST(NULL AS ${type ?? 'VARCHAR(255)'});`).join('\n')
44
+ ? out.map(({ name }) => `SET @${name} = NULL;`).join('\n')
45
45
  : '';
46
46
  const selectOuts = out.length
47
47
  ? 'SELECT ' + out
@@ -4,8 +4,6 @@
4
4
  export interface OutVariable {
5
5
  /** The name of the variable (without the @ symbol). */
6
6
  name: string;
7
- /** The SQL type of the variable (e.g., 'VARCHAR(255)', 'INT'). Defaults to 'VARCHAR(255)'. */
8
- type?: string;
9
7
  }
10
8
  /**
11
9
  * Options for executing a stored procedure.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mrepo-sql",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "With mrepo-sql, the ability to create repositories with features that improve code readability and project scalability is added.",
5
5
  "license": "MIT",
6
6
  "author": "daniel_hz",
package/src/db/repo.ts CHANGED
@@ -62,7 +62,7 @@ export class BaseRepository {
62
62
  conn = await this.pool.getConnection();
63
63
 
64
64
  const declareOutVars = out.length
65
- ? out.map(({ name, type }) => `SET @${name} = CAST(NULL AS ${type ?? 'VARCHAR(255)'});`).join('\n')
65
+ ? out.map(({ name }) => `SET @${name} = NULL;`).join('\n')
66
66
  : '';
67
67
 
68
68
  const selectOuts = out.length
@@ -4,8 +4,6 @@
4
4
  export interface OutVariable {
5
5
  /** The name of the variable (without the @ symbol). */
6
6
  name: string;
7
- /** The SQL type of the variable (e.g., 'VARCHAR(255)', 'INT'). Defaults to 'VARCHAR(255)'. */
8
- type?: string;
9
7
  }
10
8
 
11
9
  /**