@sqb/connect
Advanced tools
Comparing version 4.0.1-alpha.20 to 4.0.1-alpha.21
import { REPOSITORY_KEY } from './consts'; | ||
export declare abstract class BaseEntity<T extends BaseEntity<any>> { | ||
export declare abstract class BaseEntity<T> { | ||
private [REPOSITORY_KEY]; | ||
@@ -4,0 +4,0 @@ constructor(partial: Partial<T>); |
@@ -61,4 +61,4 @@ "use strict"; | ||
if (v == null) { | ||
if (col.notNull) | ||
throw new Error(`${entity.name}.${col.name} is required an can't be null`); | ||
if (col.notNull && !col.autoGenerated) | ||
throw new Error(`${entity.name}.${col.name} is required and can't be null`); | ||
continue; | ||
@@ -65,0 +65,0 @@ } |
@@ -58,3 +58,3 @@ "use strict"; | ||
if (v === null && col.notNull) | ||
throw new Error(`${entity.name}.${col.name} is required an can't be null`); | ||
throw new Error(`${entity.name}.${col.name} is required and can't be null`); | ||
if (v === undefined) | ||
@@ -61,0 +61,0 @@ continue; |
@@ -1,2 +0,2 @@ | ||
import { NestedOptions, ConstructorThunk } from '../types'; | ||
export declare function Embedded(type: ConstructorThunk, options?: NestedOptions): PropertyDecorator; | ||
import { EmbeddedTypeOptions, ConstructorThunk } from '../types'; | ||
export declare function Embedded(type: ConstructorThunk, options?: EmbeddedTypeOptions): PropertyDecorator; |
@@ -19,3 +19,3 @@ "use strict"; | ||
const entity = entity_meta_1.EntityMeta.attachTo(target.constructor); | ||
entity.setDataColumn(propertyKey); | ||
entity.setDataColumn(propertyKey, { notNull: true }); | ||
entity.setPrimaryIndex(propertyKey, arg0); | ||
@@ -22,0 +22,0 @@ }; |
@@ -110,3 +110,3 @@ import type { EntityElementMeta } from './metadata/entity-element-meta'; | ||
} | ||
export interface NestedOptions { | ||
export interface EmbeddedTypeOptions { | ||
fieldNamePrefix?: string; | ||
@@ -113,0 +113,0 @@ fieldNameSuffix?: string; |
{ | ||
"name": "@sqb/connect", | ||
"description": "Multi-dialect database connection framework written with TypeScript", | ||
"version": "4.0.1-alpha.20", | ||
"version": "4.0.1-alpha.21", | ||
"author": "Panates Ltd.", | ||
@@ -47,3 +47,3 @@ "contributors": [ | ||
"peerDependencies": { | ||
"@sqb/builder": "^4.0.1-alpha.20" | ||
"@sqb/builder": "^4.0.1-alpha.21" | ||
}, | ||
@@ -50,0 +50,0 @@ "main": "dist/index.js", |
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
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
175327