metal-orm 1.0.38 → 1.0.39

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "metal-orm",
3
- "version": "1.0.38",
3
+ "version": "1.0.39",
4
4
  "type": "module",
5
5
  "types": "./dist/index.d.ts",
6
6
  "engines": {
@@ -172,8 +172,8 @@ const parseColumnType = colTypeRaw => {
172
172
  if (base.includes('bigint')) return { factory: 'col.bigint()', ts: 'number' };
173
173
  if (base.includes('int')) return { factory: 'col.int()', ts: 'number' };
174
174
  if (base.includes('uuid') || base.includes('uniqueidentifier')) return { factory: 'col.uuid()', ts: 'string' };
175
- if (base === 'date') return { factory: 'col.date()', ts: 'Date' };
176
- if (base.includes('datetime') || base === 'time') return { factory: 'col.datetime()', ts: 'Date' };
175
+ if (base === 'date') return { factory: 'col.date<Date>()', ts: 'Date' };
176
+ if (base.includes('datetime') || base === 'time') return { factory: 'col.datetime<Date>()', ts: 'Date' };
177
177
  if (base.includes('char') || base.includes('text')) {
178
178
  const lenArg = length ? `${length}` : '255';
179
179
  return { factory: `col.varchar(${lenArg})`, ts: 'string' };
@@ -182,7 +182,7 @@ const parseColumnType = colTypeRaw => {
182
182
  if (base.includes('bool') || (base.includes('tinyint') && length === 1)) {
183
183
  return { factory: 'col.boolean()', ts: 'boolean' };
184
184
  }
185
- if (base.includes('date') || base.includes('time')) return { factory: 'col.datetime()', ts: 'Date' };
185
+ if (base.includes('date') || base.includes('time')) return { factory: 'col.datetime<Date>()', ts: 'Date' };
186
186
  if (base.includes('decimal') || base.includes('numeric')) {
187
187
  const precision = length ?? 10;
188
188
  const scaleVal = scale ?? 0;