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

sedentary

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sedentary - npm Package Compare versions

Comparing version 0.0.53 to 0.0.54

13

dist/cjs/index.js

@@ -60,4 +60,11 @@ "use strict";

}
Float(_size) {
const message = "Sedentary.Float: 'size' argument: Wrong value, expected 4 or 8";
_size = _size ? this.checkSize(_size, message) : 8;
if (_size !== 4 && _size !== 8)
throw new Error(message);
return new db_1.Type({ [db_1.base]: Number, [db_1.size]: _size, type: "FLOAT" });
}
Int(_size) {
const message = "Sedentary.INT: 'size' argument: Wrong value, expected 2 or 4";
const message = "Sedentary.Int: 'size' argument: Wrong value, expected 2 or 4";
_size = _size ? this.checkSize(_size, message) : 4;

@@ -81,3 +88,3 @@ if (_size !== 2 && _size !== 4)

VarChar(_size) {
const message = "Sedentary.VARCHAR: 'size' argument: Wrong value, expected positive integer";
const message = "Sedentary.VarChar: 'size' argument: Wrong value, expected positive integer";
_size = _size ? this.checkSize(_size, message) : undefined;

@@ -277,3 +284,3 @@ return new db_1.Type({ [db_1.base]: String, [db_1.size]: _size, type: "VARCHAR" });

throw new Error(`${message1} 'this.FKey' can't be used directly`);
if (![this.Boolean, this.DateTime, this.Int, this.JSON, this.Int8, this.None, this.Number, this.VarChar].includes(func))
if (![this.Boolean, this.DateTime, this.Float, this.Int, this.JSON, this.Int8, this.None, this.Number, this.VarChar].includes(func))
throw new Error(`${message1} ${message2}`);

@@ -280,0 +287,0 @@ return new db_1.Attribute({ attributeName, defaultValue, fieldName, modelName, notNull, tableName, unique, ...func() });

@@ -48,4 +48,11 @@ import { actions, Attribute, base, EntryBase, loaded, size, Table, Transaction, transaction, Type } from "./db";

}
Float(_size) {
const message = "Sedentary.Float: 'size' argument: Wrong value, expected 4 or 8";
_size = _size ? this.checkSize(_size, message) : 8;
if (_size !== 4 && _size !== 8)
throw new Error(message);
return new Type({ [base]: Number, [size]: _size, type: "FLOAT" });
}
Int(_size) {
const message = "Sedentary.INT: 'size' argument: Wrong value, expected 2 or 4";
const message = "Sedentary.Int: 'size' argument: Wrong value, expected 2 or 4";
_size = _size ? this.checkSize(_size, message) : 4;

@@ -69,3 +76,3 @@ if (_size !== 2 && _size !== 4)

VarChar(_size) {
const message = "Sedentary.VARCHAR: 'size' argument: Wrong value, expected positive integer";
const message = "Sedentary.VarChar: 'size' argument: Wrong value, expected positive integer";
_size = _size ? this.checkSize(_size, message) : undefined;

@@ -265,3 +272,3 @@ return new Type({ [base]: String, [size]: _size, type: "VARCHAR" });

throw new Error(`${message1} 'this.FKey' can't be used directly`);
if (![this.Boolean, this.DateTime, this.Int, this.JSON, this.Int8, this.None, this.Number, this.VarChar].includes(func))
if (![this.Boolean, this.DateTime, this.Float, this.Int, this.JSON, this.Int8, this.None, this.Number, this.VarChar].includes(func))
throw new Error(`${message1} ${message2}`);

@@ -268,0 +275,0 @@ return new Attribute({ attributeName, defaultValue, fieldName, modelName, notNull, tableName, unique, ...func() });

@@ -121,2 +121,3 @@ import { Attribute, DB, EntryBase, ForeignKeyOptions, Transaction, Type } from "./db";

FKey<T, E extends EntryBase>(attribute: Attribute<T, E>, options?: ForeignKeyOptions): Type<T, E>;
Float(_size?: number): Type<number, unknown>;
Int(_size?: number): Type<number, unknown>;

@@ -123,0 +124,0 @@ Int8(): Type<bigint, unknown>;

@@ -10,3 +10,3 @@ {

"engines": {
"node": ">=14.0"
"node": ">=18.0"
},

@@ -31,6 +31,9 @@ "funding": {

"optionalDependencies": {
"fsevents": "2.3.2"
"fsevents": "^2.3.3"
},
"readmeFilename": "README.md",
"repository": "https://github.com/iccicci/sedentary",
"repository": {
"type": "git",
"url": "git+https://github.com/iccicci/sedentary.git"
},
"scripts": {

@@ -63,3 +66,3 @@ "build": "make build",

"types": "./dist/types/index.d.ts",
"version": "0.0.53"
"version": "0.0.54"
}
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