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

kmore

Package Overview
Dependencies
Maintainers
1
Versions
272
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kmore - npm Package Compare versions

Comparing version 33.1.1 to 33.2.0

6

dist/lib/kmore.d.ts

@@ -50,2 +50,8 @@ import type { DbDict } from 'kmore-types';

constructor(options: KmoreFactoryOpts<D, Context>);
/**
* Start a transaction.
*/
transaction(id?: PropertyKey): Promise<Knex.Transaction & {
kmoreTrxId: symbol;
}>;
protected createRefTables<P extends string>(prefix: P, caseConvert: CaseType): DbQueryBuilder<Context, D, P, CaseType>;

@@ -52,0 +58,0 @@ protected extRefTableFnProperty(refName: string, caseConvert: CaseType, ctx: Context | undefined): Knex.QueryBuilder;

@@ -97,2 +97,17 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

}
/**
* Start a transaction.
*/
async transaction(id) {
const kmoreTrxId = typeof id === 'symbol'
? id
: id ? Symbol(id) : Symbol(Date.now().toString());
const trx = await this.dbh.transaction();
Object.defineProperty(trx, 'kmoreTrxId', {
...defaultPropDescriptor,
enumerable: false,
value: kmoreTrxId,
});
return trx;
}
createRefTables(prefix, caseConvert) {

@@ -99,0 +114,0 @@ const rb = {};

4

package.json
{
"name": "kmore",
"author": "waiting",
"version": "33.1.1",
"version": "33.2.0",
"description": "A SQL query builder based on knex with powerful TypeScript type support",

@@ -76,3 +76,3 @@ "keywords": [

},
"gitHead": "0f6b852cb9b3e4413a829ec4e6164bae046d7260"
"gitHead": "f35ed527c92e95627ff13e47c273bb5b6da6bc84"
}

@@ -137,3 +137,21 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

/**
* Start a transaction.
*/
async transaction(id?: PropertyKey): Promise<Knex.Transaction & { kmoreTrxId: symbol }> {
const kmoreTrxId = typeof id === 'symbol'
? id
: id ? Symbol(id) : Symbol(Date.now().toString())
const trx = await this.dbh.transaction()
Object.defineProperty(trx, 'kmoreTrxId', {
...defaultPropDescriptor,
enumerable: false,
value: kmoreTrxId,
})
return trx as Knex.Transaction & { kmoreTrxId: symbol }
}
protected createRefTables<P extends string>(

@@ -140,0 +158,0 @@ prefix: P,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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