@nocobase/database
Advanced tools
Comparing version 1.3.25-beta to 1.3.26-beta
@@ -363,5 +363,2 @@ /** | ||
if (options.underscored) { | ||
if (import_lodash.default.get(options, "sortable.scopeKey")) { | ||
options.sortable.scopeKey = (0, import_utils3.snakeCase)(options.sortable.scopeKey); | ||
} | ||
if (import_lodash.default.get(options, "indexes")) { | ||
@@ -665,3 +662,3 @@ options.indexes = options.indexes.map((index) => { | ||
async checkVersion() { | ||
return await (0, import_helpers.checkDatabaseVersion)(this); | ||
return process.env.DB_SKIP_VERSION_CHECK === "on" || await (0, import_helpers.checkDatabaseVersion)(this); | ||
} | ||
@@ -668,0 +665,0 @@ /** |
@@ -44,6 +44,12 @@ /** | ||
export declare class DecimalField extends NumberField { | ||
get dataType(): DataTypes.DecimalDataTypeConstructor; | ||
get dataType(): DataTypes.DecimalDataType; | ||
static optionsFromRawType(rawType: string): { | ||
precision: number; | ||
scale: number; | ||
}; | ||
} | ||
export interface DecimalFieldOptions extends BaseColumnFieldOptions { | ||
type: 'decimal'; | ||
precision: number; | ||
scale: number; | ||
} |
@@ -82,4 +82,13 @@ /** | ||
get dataType() { | ||
return import_sequelize.DataTypes.DECIMAL; | ||
return import_sequelize.DataTypes.DECIMAL(this.options.precision, this.options.scale); | ||
} | ||
static optionsFromRawType(rawType) { | ||
const matches = rawType.match(/DECIMAL\((\d+),\s*(\d+)\)/); | ||
if (matches) { | ||
return { | ||
precision: parseInt(matches[1]), | ||
scale: parseInt(matches[2]) | ||
}; | ||
} | ||
} | ||
}; | ||
@@ -86,0 +95,0 @@ __name(_DecimalField, "DecimalField"); |
@@ -160,5 +160,5 @@ /** | ||
if (scopeKey) { | ||
const groups = await this.collection.repository.find({ | ||
attributes: [scopeKey], | ||
group: [scopeKey], | ||
const scopeKeyColumn = this.collection.model.rawAttributes[scopeKey].field; | ||
const groups = await this.collection.model.findAll({ | ||
attributes: [[import_sequelize.Sequelize.fn("DISTINCT", import_sequelize.Sequelize.col(scopeKeyColumn)), scopeKey]], | ||
raw: true, | ||
@@ -165,0 +165,0 @@ transaction |
{ | ||
"name": "@nocobase/database", | ||
"version": "1.3.25-beta", | ||
"version": "1.3.26-beta", | ||
"description": "", | ||
@@ -9,4 +9,4 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@nocobase/logger": "1.3.25-beta", | ||
"@nocobase/utils": "1.3.25-beta", | ||
"@nocobase/logger": "1.3.26-beta", | ||
"@nocobase/utils": "1.3.26-beta", | ||
"async-mutex": "^0.3.2", | ||
@@ -42,3 +42,3 @@ "chalk": "^4.1.1", | ||
}, | ||
"gitHead": "dea17d475f5db81a93fd7c27aebd650c46bb3a45" | ||
"gitHead": "492868e32388615f75ba5af28f33420899d3b211" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
727599
18074
38
+ Added@nocobase/logger@1.3.26-beta(transitive)
+ Added@nocobase/utils@1.3.26-beta(transitive)
- Removed@nocobase/logger@1.3.25-beta(transitive)
- Removed@nocobase/utils@1.3.25-beta(transitive)
Updated@nocobase/logger@1.3.26-beta
Updated@nocobase/utils@1.3.26-beta