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

@sqb/connect

Package Overview
Dependencies
Maintainers
1
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sqb/connect - npm Package Compare versions

Comparing version 4.5.5 to 4.5.6

22

esm/client/types.d.ts

@@ -9,12 +9,12 @@ import type { PoolConfiguration } from 'lightning-pool';

export { DataType } from '@sqb/builder';
export declare type ExecuteHookFunction = (connection: SqbConnection, request: QueryRequest) => Promise<void>;
export declare type FetchFunction = (row: any, request: QueryRequest) => void;
export declare type ValueTransformFunction = (value: any, fieldInfo?: FieldInfo) => any;
export declare type TransactionFunction = (connection: SqbConnection) => Promise<any>;
export declare type RowType = 'array' | 'object';
export declare type FieldNaming = 'original' | 'lowercase' | 'uppercase' | 'camelcase' | 'pascalcase' | ((fieldName: string) => Maybe<string>);
export declare type ObjectRow = Record<string, any>;
export declare type ArrayRow = any[];
export declare type ObjectRowset = ObjectRow[];
export declare type ArrayRowset = ArrayRow[];
export type ExecuteHookFunction = (connection: SqbConnection, request: QueryRequest) => Promise<void>;
export type FetchFunction = (row: any, request: QueryRequest) => void;
export type ValueTransformFunction = (value: any, fieldInfo?: FieldInfo) => any;
export type TransactionFunction = (connection: SqbConnection) => Promise<any>;
export type RowType = 'array' | 'object';
export type FieldNaming = 'original' | 'lowercase' | 'uppercase' | 'camelcase' | 'pascalcase' | ((fieldName: string) => Maybe<string>);
export type ObjectRow = Record<string, any>;
export type ArrayRow = any[];
export type ObjectRowset = ObjectRow[];
export type ArrayRowset = ArrayRow[];
export interface ClientConfiguration {

@@ -155,3 +155,3 @@ /**

}
export declare type FieldInfo = {
export type FieldInfo = {
index: number;

@@ -158,0 +158,0 @@ name: string;

import 'reflect-metadata';
export { Type, Maybe, DeepPartial, DeepPickWritable, DeepBuildable } from 'ts-gems';
import { DeepBuildable, DeepPartial, DeepPickWritable, Maybe, Type } from 'ts-gems';
export { Type, Maybe, DeepPartial, DeepPickWritable, DeepBuildable };
export * from './types.js';

@@ -4,0 +5,0 @@ export * from './client/types.js';

import { SqbConnection } from '../../client/sqb-connection.js';
import { EntityMetadata } from '../model/entity-metadata.js';
import { Repository } from '../repository.class.js';
export declare type CountCommandArgs = {
export type CountCommandArgs = {
entity: EntityMetadata;

@@ -6,0 +6,0 @@ connection: SqbConnection;

import { SqbConnection } from '../../client/sqb-connection.js';
import { EntityMetadata } from '../model/entity-metadata.js';
export declare type CreateCommandArgs = {
export type CreateCommandArgs = {
entity: EntityMetadata;

@@ -9,3 +9,3 @@ connection: SqbConnection;

};
declare type CreateCommandContext = {
type CreateCommandContext = {
entity: EntityMetadata;

@@ -12,0 +12,0 @@ queryParams: any;

import { SqbConnection } from '../../client/sqb-connection.js';
import { EntityMetadata } from '../model/entity-metadata.js';
import { Repository } from '../repository.class.js';
export declare type DestroyCommandArgs = {
export type DestroyCommandArgs = {
entity: EntityMetadata;

@@ -6,0 +6,0 @@ connection: SqbConnection;

@@ -6,3 +6,3 @@ import { SqbConnection } from '../../client/sqb-connection.js';

import { RowConverter } from './row-converter.js';
export declare type FindCommandArgs = {
export type FindCommandArgs = {
entity: EntityMetadata;

@@ -9,0 +9,0 @@ connection: SqbConnection;

import { SqbConnection } from '../../client/sqb-connection.js';
import { EntityMetadata } from '../model/entity-metadata.js';
import { Repository } from '../repository.class.js';
export declare type UpdateCommandArgs = {
export type UpdateCommandArgs = {
entity: EntityMetadata;

@@ -9,3 +9,3 @@ connection: SqbConnection;

} & Repository.UpdateAllOptions;
declare type UpdateCommandContext = {
type UpdateCommandContext = {
entity: EntityMetadata;

@@ -12,0 +12,0 @@ queryParams: any;

import { AssociationFieldOptions } from '../model/association-field-metadata.js';
import { TypeThunk } from '../orm.type.js';
declare type LinkArgs<T> = {
type LinkArgs<T> = {
sourceKey?: string;

@@ -8,3 +8,3 @@ targetKey?: keyof T;

};
declare type LinkPropertyDecorator = PropertyDecorator & {
type LinkPropertyDecorator = PropertyDecorator & {
toOne<T>(type: TypeThunk<T>, args?: LinkArgs<T>): LinkPropertyDecorator;

@@ -11,0 +11,0 @@ toMany<T>(type: TypeThunk<T>, args?: LinkArgs<T>): LinkPropertyDecorator;

import { AssociationNode } from './association-node.js';
import { EntityMetadata } from './entity-metadata.js';
import { FieldMetadata } from './field-metadata.js';
export declare type AssociationFieldOptions = Partial<Omit<AssociationFieldMetadata, 'entity' | 'name' | 'kind' | 'association'>>;
export type AssociationFieldOptions = Partial<Omit<AssociationFieldMetadata, 'entity' | 'name' | 'kind' | 'association'>>;
export interface AssociationFieldMetadata extends FieldMetadata {

@@ -6,0 +6,0 @@ readonly kind: 'association';

@@ -5,3 +5,3 @@ import { DataType } from '@sqb/builder';

import { FieldMetadata } from './field-metadata.js';
export declare type ColumnFieldOptions = Partial<Omit<ColumnFieldMetadata, 'entity' | 'name' | 'kind'>>;
export type ColumnFieldOptions = Partial<Omit<ColumnFieldMetadata, 'entity' | 'name' | 'kind'>>;
export interface ColumnFieldMetadata extends FieldMetadata {

@@ -8,0 +8,0 @@ readonly kind: 'column';

import { TypeThunk } from '../orm.type.js';
import type { EntityMetadata } from './entity-metadata.js';
import { FieldMetadata } from './field-metadata.js';
export declare type EmbeddedFieldOptions = Partial<Omit<EmbeddedFieldMetadata, 'entity' | 'name' | 'kind' | 'type'>>;
export type EmbeddedFieldOptions = Partial<Omit<EmbeddedFieldMetadata, 'entity' | 'name' | 'kind' | 'type'>>;
export interface EmbeddedFieldMetadata extends FieldMetadata {

@@ -6,0 +6,0 @@ readonly kind: 'object';

@@ -9,4 +9,4 @@ import { Maybe, Type } from 'ts-gems';

import { IndexMetadata } from './index-metadata.js';
export declare type AnyFieldMetadata = ColumnFieldMetadata | EmbeddedFieldMetadata | AssociationFieldMetadata;
export declare type EntityOptions = Partial<Pick<EntityMetadata, 'name' | 'schema' | 'comment' | 'tableName'>>;
export type AnyFieldMetadata = ColumnFieldMetadata | EmbeddedFieldMetadata | AssociationFieldMetadata;
export type EntityOptions = Partial<Pick<EntityMetadata, 'name' | 'schema' | 'comment' | 'tableName'>>;
export interface EntityMetadata {

@@ -13,0 +13,0 @@ readonly ctor: Type;

import { Type } from 'ts-gems';
export declare type Ctor = Type | Function;
export declare type FieldKind = 'column' | 'object' | 'association';
export type Ctor = Type | Function;
export type FieldKind = 'column' | 'object' | 'association';
/**
* Indicates auto generation strategy
*/
export declare type ColumnAutoGenerationStrategy = 'increment' | 'uuid' | 'rowid' | 'timestamp' | 'custom';
export declare type ColumnTransformFunction = (value: any, name: string) => any;
export declare type TypeResolver<T> = () => Type<T> | Promise<Type<T>>;
export declare type TypeThunk<T = any> = Type<T> | TypeResolver<T>;
export declare type EnumValue = (FieldValue)[] | Object;
export declare type FieldValue = string | number | boolean | Date | null;
export declare type DefaultValueGetter = (obj?: any) => FieldValue | undefined;
export type ColumnAutoGenerationStrategy = 'increment' | 'uuid' | 'rowid' | 'timestamp' | 'custom';
export type ColumnTransformFunction = (value: any, name: string) => any;
export type TypeResolver<T> = () => Type<T> | Promise<Type<T>>;
export type TypeThunk<T = any> = Type<T> | TypeResolver<T>;
export type EnumValue = (FieldValue)[] | Object;
export type FieldValue = string | number | boolean | Date | null;
export type DefaultValueGetter = (obj?: any) => FieldValue | undefined;
export interface AssociationSettings {

@@ -15,0 +15,0 @@ source: TypeThunk;

import { Builtin, DeepPickWritable } from 'ts-gems';
export declare type EntityInput<T> = DeepNullableIfPartial<DeepPickWritable<T>>;
export declare type EntityOutput<T> = DeepNullableIfPartial<T>;
export declare type DeepNullableIfPartial<T> = _DeepNullableIfPartial<T>;
declare type _DeepNullableIfPartial<T> = T extends Builtin ? T : T extends Promise<infer U> ? Promise<DeepNullableIfPartial<U>> : T extends (infer U)[] ? DeepNullableIfPartial<U>[] : {
export type EntityInput<T> = DeepNullableIfPartial<DeepPickWritable<T>>;
export type EntityOutput<T> = DeepNullableIfPartial<T>;
export type DeepNullableIfPartial<T> = _DeepNullableIfPartial<T>;
type _DeepNullableIfPartial<T> = T extends Builtin ? T : T extends Promise<infer U> ? Promise<DeepNullableIfPartial<U>> : T extends (infer U)[] ? DeepNullableIfPartial<U>[] : {
[P in keyof T]?: DeepNullableIfPartial<Exclude<T[P], undefined>> | null;
};
export {};
{
"name": "@sqb/connect",
"description": "Multi-dialect database connection framework written with TypeScript",
"version": "4.5.5",
"version": "4.5.6",
"author": "Panates",

@@ -33,19 +33,19 @@ "contributors": [

"debug": "^4.3.4",
"lightning-pool": "^4.2.0",
"lightning-pool": "^4.2.1",
"lodash": "^4.17.21",
"putil-isplainobject": "^1.1.4",
"putil-merge": "^3.9.0",
"putil-promisify": "^1.8.5",
"putil-taskqueue": "^2.5.4",
"putil-varhelpers": "^1.6.4",
"putil-isplainobject": "^1.1.5",
"putil-merge": "^3.10.1",
"putil-promisify": "^1.10.0",
"putil-taskqueue": "^2.5.5",
"putil-varhelpers": "^1.6.5",
"reflect-metadata": "^0.1.13",
"strict-typed-events": "^2.3.1",
"ts-gems": "^2.2.1"
"ts-gems": "^2.3.0"
},
"devDependencies": {
"@types/debug": "^4.1.7",
"@types/lodash": "^4.14.186"
"@types/lodash": "^4.14.191"
},
"peerDependencies": {
"@sqb/builder": "^4.5.5"
"@sqb/builder": "^4.5.6"
},

@@ -52,0 +52,0 @@ "type": "module",

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