Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nocobase/database

Package Overview
Dependencies
Maintainers
0
Versions
450
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nocobase/database - npm Package Compare versions

Comparing version 1.4.0-alpha.20240923152933 to 1.4.0-alpha.20240928155737

6

lib/database.js

@@ -67,2 +67,3 @@ /**

var FieldTypes = __toESM(require("./fields"));
var import_helpers = require("./helpers");
var import_inherited_collection = require("./inherited-collection");

@@ -364,5 +365,2 @@ var import_inherited_map = __toESM(require("./inherited-map"));

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")) {

@@ -666,3 +664,3 @@ options.indexes = options.indexes.map((index) => {

async checkVersion() {
return true;
return process.env.DB_SKIP_VERSION_CHECK === "on" || await (0, import_helpers.checkDatabaseVersion)(this);
}

@@ -669,0 +667,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.4.0-alpha.20240923152933",
"version": "1.4.0-alpha.20240928155737",
"description": "",

@@ -9,4 +9,4 @@ "main": "./lib/index.js",

"dependencies": {
"@nocobase/logger": "1.4.0-alpha.20240923152933",
"@nocobase/utils": "1.4.0-alpha.20240923152933",
"@nocobase/logger": "1.4.0-alpha.20240928155737",
"@nocobase/utils": "1.4.0-alpha.20240928155737",
"async-mutex": "^0.3.2",

@@ -42,3 +42,3 @@ "chalk": "^4.1.1",

},
"gitHead": "bd1a83a7040a63619a3d39c5b67048fa97a49f5a"
"gitHead": "f2765665126f5e9b5ae01f9ca6e8a151916554b4"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc