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

kysely-mapper

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kysely-mapper - npm Package Compare versions

Comparing version 0.4.13 to 0.4.14

dist/cjs/package.json

12

dist/cjs/index.d.ts

@@ -1,7 +0,7 @@

export * from './mappers/abstract-table-mapper';
export * from './mappers/table-mapper';
export * from './mappers/table-mapper-settings';
export * from './mappers/table-mapper-transforms';
export * from './mappers/entire-row-transforms';
export * from './lib/query-filter';
export * from './mappers/abstract-table-mapper.js';
export * from './mappers/table-mapper.js';
export * from './mappers/table-mapper-settings.js';
export * from './mappers/table-mapper-transforms.js';
export * from './mappers/entire-row-transforms.js';
export * from './lib/query-filter.js';
//# sourceMappingURL=index.d.ts.map

@@ -17,8 +17,8 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./mappers/abstract-table-mapper"), exports);
__exportStar(require("./mappers/table-mapper"), exports);
__exportStar(require("./mappers/table-mapper-settings"), exports);
__exportStar(require("./mappers/table-mapper-transforms"), exports);
__exportStar(require("./mappers/entire-row-transforms"), exports);
__exportStar(require("./lib/query-filter"), exports);
__exportStar(require("./mappers/abstract-table-mapper.js"), exports);
__exportStar(require("./mappers/table-mapper.js"), exports);
__exportStar(require("./mappers/table-mapper-settings.js"), exports);
__exportStar(require("./mappers/table-mapper-transforms.js"), exports);
__exportStar(require("./mappers/entire-row-transforms.js"), exports);
__exportStar(require("./lib/query-filter.js"), exports);
//# sourceMappingURL=index.js.map
import { ComparisonOperatorExpression, Kysely, OperandValueExpressionOrList, ReferenceExpression, WhereInterface } from 'kysely';
import { SelectableColumnTuple } from './type-utils';
import { QueryFilter } from './query-filter';
import { SelectableColumnTuple } from './type-utils.js';
import { QueryFilter } from './query-filter.js';
type AnyWhereInterface = WhereInterface<any, any>;

@@ -5,0 +5,0 @@ /**

import { ParametersObject, QueryParameterMaker } from 'kysely-params';
import { AbstractTableMapper } from '../mappers/abstract-table-mapper';
import { SelectableColumnTuple, SelectionColumn } from './type-utils';
import { ParameterizableMappingQuery } from '../queries/parameterizable-query';
import { AbstractTableMapper } from '../mappers/abstract-table-mapper.js';
import { SelectableColumnTuple, SelectionColumn } from './type-utils.js';
import { ParameterizableMappingQuery } from '../queries/parameterizable-query.js';
/**

@@ -6,0 +6,0 @@ * Definition of the function that a caller provides to parameterize a

@@ -6,3 +6,3 @@ /**

import { Expression, ExtractTypeFromStringReference, ReferenceExpression, SelectType, Selectable, WhereExpressionFactory } from 'kysely';
import { KeyTuple, SelectableColumnTuple } from './type-utils';
import { KeyTuple, SelectableColumnTuple } from './type-utils.js';
/**

@@ -9,0 +9,0 @@ * Type of the query filter object, which can be passed as an argument

import { Kysely, Insertable, ReferenceExpression, Selectable, InsertQueryBuilder, InsertResult, SelectQueryBuilder, Selection, DeleteQueryBuilder, DeleteResult, UpdateResult, UpdateQueryBuilder, ComparisonOperatorExpression, OperandValueExpressionOrList, Updateable } from 'kysely';
import { QueryFilter } from '../lib/query-filter';
import { SelectableColumnTuple, SelectedRow, SelectionColumn } from '../lib/type-utils';
import { MappingDeleteQuery } from '../queries/delete-query';
import { MappingSelectQuery } from '../queries/select-query';
import { AnyColumnsMappingInsertQuery } from '../queries/any-insert-query';
import { AnyColumnsMappingUpdateQuery } from '../queries/any-update-query';
import { ParametersObject } from 'kysely-params';
import { ParameterizableMappingQueryFactory } from '../lib/parameterizable-query-factory';
import { CompilingMappingSelectQuery } from '../queries/compiling-select-query';
import { CompilingMappingDeleteQuery } from '../queries/compiling-delete-query';
import { SubsettingMappingUpdateQuery } from '../queries/subsetting-update-query';
import { CompilingMappingUpdateQuery } from '../queries/compiling-update-query';
import { TableMapperSettings } from './table-mapper-settings';
import { TableMapperTransforms } from './table-mapper-transforms';
import { QueryFilter } from '../lib/query-filter.js';
import { SelectableColumnTuple, SelectedRow, SelectionColumn } from '../lib/type-utils.js';
import { MappingDeleteQuery } from '../queries/delete-query.js';
import { MappingSelectQuery } from '../queries/select-query.js';
import { AnyColumnsMappingInsertQuery } from '../queries/any-insert-query.js';
import { AnyColumnsMappingUpdateQuery } from '../queries/any-update-query.js';
import { ParameterizableMappingQueryFactory } from '../lib/parameterizable-query-factory.js';
import { CompilingMappingSelectQuery } from '../queries/compiling-select-query.js';
import { CompilingMappingDeleteQuery } from '../queries/compiling-delete-query.js';
import { SubsettingMappingUpdateQuery } from '../queries/subsetting-update-query.js';
import { CompilingMappingUpdateQuery } from '../queries/compiling-update-query.js';
import { TableMapperSettings } from './table-mapper-settings.js';
import { TableMapperTransforms } from './table-mapper-transforms.js';
/**

@@ -102,3 +102,3 @@ * Abstract base class for table mappers. It is abstract because it does not

*/
ref(column: string): import("kysely/dist/cjs/dynamic/dynamic-reference-builder").DynamicReferenceBuilder<never>;
ref(column: string): import("kysely/dist/cjs/dynamic/dynamic-reference-builder.js").DynamicReferenceBuilder<never>;
/**

@@ -105,0 +105,0 @@ * Returns a mapping query for selecting rows of the table that match

@@ -16,8 +16,8 @@ "use strict";

exports.AbstractTableMapper = void 0;
const apply_query_filter_1 = require("../lib/apply-query-filter");
const delete_query_1 = require("../queries/delete-query");
const select_query_1 = require("../queries/select-query");
const any_insert_query_1 = require("../queries/any-insert-query");
const any_update_query_1 = require("../queries/any-update-query");
const kysely_params_1 = require("kysely-params");
const apply_query_filter_js_1 = require("../lib/apply-query-filter.js");
const delete_query_js_1 = require("../queries/delete-query.js");
const select_query_js_1 = require("../queries/select-query.js");
const any_insert_query_js_1 = require("../queries/any-insert-query.js");
const any_update_query_js_1 = require("../queries/any-update-query.js");
/**

@@ -79,5 +79,5 @@ * Abstract base class for table mappers. It is abstract because it does not

delete(filterOrLHS, op, rhs) {
return new delete_query_1.MappingDeleteQuery(this.db, filterOrLHS === undefined
return new delete_query_js_1.MappingDeleteQuery(this.db, filterOrLHS === undefined
? this.getDeleteQB()
: (0, apply_query_filter_1.applyQueryFilter)(this.db, this.getDeleteQB(), this.keyColumns, filterOrLHS, op, rhs), this.transforms);
: (0, apply_query_filter_js_1.applyQueryFilter)(this.db, this.getDeleteQB(), this.keyColumns, filterOrLHS, op, rhs), this.transforms);
}

@@ -89,3 +89,3 @@ /**

insert() {
return new any_insert_query_1.AnyColumnsMappingInsertQuery(this.db, this.getInsertQB(), this.transforms, this.insertReturnColumns);
return new any_insert_query_js_1.AnyColumnsMappingInsertQuery(this.db, this.getInsertQB(), this.transforms, this.insertReturnColumns);
}

@@ -109,10 +109,10 @@ parameterize(factory) {

select(filterOrLHS, op, rhs) {
return new select_query_1.MappingSelectQuery(this.db, filterOrLHS === undefined
return new select_query_js_1.MappingSelectQuery(this.db, filterOrLHS === undefined
? this.getSelectQB()
: (0, apply_query_filter_1.applyQueryFilter)(this.db, this.getSelectQB(), this.keyColumns, filterOrLHS, op, rhs), this.transforms);
: (0, apply_query_filter_js_1.applyQueryFilter)(this.db, this.getSelectQB(), this.keyColumns, filterOrLHS, op, rhs), this.transforms);
}
update(filterOrLHS, op, rhs) {
return new any_update_query_1.AnyColumnsMappingUpdateQuery(this.db, filterOrLHS === undefined
return new any_update_query_js_1.AnyColumnsMappingUpdateQuery(this.db, filterOrLHS === undefined
? this.getUpdateQB()
: (0, apply_query_filter_1.applyQueryFilter)(this.db, this.getUpdateQB(), this.keyColumns, filterOrLHS, op, rhs), this.transforms, this.updateReturnColumns);
: (0, apply_query_filter_js_1.applyQueryFilter)(this.db, this.getUpdateQB(), this.keyColumns, filterOrLHS, op, rhs), this.transforms, this.updateReturnColumns);
}

@@ -119,0 +119,0 @@ /**

import { Insertable, Selectable, Updateable } from 'kysely';
import { SelectableColumnTuple, SelectedRow, SelectionColumn } from '../lib/type-utils';
import { TableMapperTransforms } from './table-mapper-transforms';
import { SelectableColumnTuple, SelectedRow, SelectionColumn } from '../lib/type-utils.js';
import { TableMapperTransforms } from './table-mapper-transforms.js';
/**

@@ -5,0 +5,0 @@ * Transforms for a table mapper that only receives and returns

@@ -1,2 +0,2 @@

import { SelectableColumnTuple, SelectionColumn } from '../lib/type-utils';
import { SelectableColumnTuple, SelectionColumn } from '../lib/type-utils.js';
/**

@@ -3,0 +3,0 @@ * Settings governing table mapper behavior, excluding transformations.

import { Insertable, Selectable, Selection, Updateable } from 'kysely';
import { SelectableColumnTuple, SelectedRow, SelectionColumn } from '../lib/type-utils';
import { SelectableColumnTuple, SelectedRow, SelectionColumn } from '../lib/type-utils.js';
/**

@@ -4,0 +4,0 @@ * Transformations to apply to values provided to and received from queries.

import { Insertable, Selectable, Selection, Updateable } from 'kysely';
import { SelectableColumnTuple, SelectedRow, SelectionColumn } from '../lib/type-utils';
import { TableMapperTransforms } from './table-mapper-transforms';
import { AbstractTableMapper } from './abstract-table-mapper';
import { SelectableColumnTuple, SelectedRow, SelectionColumn } from '../lib/type-utils.js';
import { TableMapperTransforms } from './table-mapper-transforms.js';
import { AbstractTableMapper } from './abstract-table-mapper.js';
/**

@@ -6,0 +6,0 @@ * Table mapper that defaults to passing through all query inputs and output

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TableMapper = void 0;
const abstract_table_mapper_1 = require("./abstract-table-mapper");
const abstract_table_mapper_js_1 = require("./abstract-table-mapper.js");
/**

@@ -29,3 +29,3 @@ * Table mapper that defaults to passing through all query inputs and output

*/
class TableMapper extends abstract_table_mapper_1.AbstractTableMapper {
class TableMapper extends abstract_table_mapper_js_1.AbstractTableMapper {
/**

@@ -32,0 +32,0 @@ * Returns a new table mapper that uses the provided transformations, along

import { Kysely, InsertQueryBuilder, InsertResult, Insertable } from 'kysely';
import { SelectionColumn } from '../lib/type-utils';
import { SubsettingMappingInsertQuery } from './subsetting-insert-query';
import { MappingInsertQuery } from './insert-query';
import { InsertTransforms } from '../mappers/table-mapper-transforms';
import { SelectionColumn } from '../lib/type-utils.js';
import { SubsettingMappingInsertQuery } from './subsetting-insert-query.js';
import { MappingInsertQuery } from './insert-query.js';
import { InsertTransforms } from '../mappers/table-mapper-transforms.js';
/**

@@ -7,0 +7,0 @@ * Mapping query for inserting rows into a database table, where the

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AnyColumnsMappingInsertQuery = void 0;
const subsetting_insert_query_1 = require("./subsetting-insert-query");
const insert_query_1 = require("./insert-query");
const subsetting_insert_query_js_1 = require("./subsetting-insert-query.js");
const insert_query_js_1 = require("./insert-query.js");
/**

@@ -10,3 +10,3 @@ * Mapping query for inserting rows into a database table, where the

*/
class AnyColumnsMappingInsertQuery extends insert_query_1.MappingInsertQuery {
class AnyColumnsMappingInsertQuery extends insert_query_js_1.MappingInsertQuery {
constructor(db, qb, transforms, returnColumns) {

@@ -22,3 +22,3 @@ super(db, qb, transforms, returnColumns);

columns(columnsToInsert) {
return new subsetting_insert_query_1.SubsettingMappingInsertQuery(this.db, this.qb, columnsToInsert, this.transforms, this.returnColumns);
return new subsetting_insert_query_js_1.SubsettingMappingInsertQuery(this.db, this.qb, columnsToInsert, this.transforms, this.returnColumns);
}

@@ -25,0 +25,0 @@ }

import { Kysely, UpdateQueryBuilder, UpdateResult, Updateable } from 'kysely';
import { SelectionColumn } from '../lib/type-utils';
import { MappingUpdateQuery } from './update-query';
import { SubsettingMappingUpdateQuery } from './subsetting-update-query';
import { CountTransform, UpdateTransforms } from '../mappers/table-mapper-transforms';
import { SelectionColumn } from '../lib/type-utils.js';
import { MappingUpdateQuery } from './update-query.js';
import { SubsettingMappingUpdateQuery } from './subsetting-update-query.js';
import { CountTransform, UpdateTransforms } from '../mappers/table-mapper-transforms.js';
/**

@@ -7,0 +7,0 @@ * Mapping query for updating rows from a database table, where the

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AnyColumnsMappingUpdateQuery = void 0;
const update_query_1 = require("./update-query");
const subsetting_update_query_1 = require("./subsetting-update-query");
const update_query_js_1 = require("./update-query.js");
const subsetting_update_query_js_1 = require("./subsetting-update-query.js");
/**

@@ -10,3 +10,3 @@ * Mapping query for updating rows from a database table, where the

*/
class AnyColumnsMappingUpdateQuery extends update_query_1.MappingUpdateQuery {
class AnyColumnsMappingUpdateQuery extends update_query_js_1.MappingUpdateQuery {
constructor(db, qb, transforms, returnColumns) {

@@ -22,3 +22,3 @@ super(db, qb, transforms, returnColumns);

columns(columnsToUpdate) {
return new subsetting_update_query_1.SubsettingMappingUpdateQuery(this.db, this.qb, columnsToUpdate, this.transforms, this.returnColumns);
return new subsetting_update_query_js_1.SubsettingMappingUpdateQuery(this.db, this.qb, columnsToUpdate, this.transforms, this.returnColumns);
}

@@ -25,0 +25,0 @@ }

import { DeleteQueryBuilder, Kysely } from 'kysely';
import { ParametersObject } from 'kysely-params';
import { CountTransform } from '../mappers/table-mapper-transforms';
import { ParameterizableMappingQuery } from './parameterizable-query';
import { type ParametersObject } from 'kysely-params';
import { CountTransform } from '../mappers/table-mapper-transforms.js';
import { ParameterizableMappingQuery } from './parameterizable-query.js';
/**

@@ -6,0 +6,0 @@ * Compiling mapping query for deleting rows from a database table.

import { Kysely, InsertQueryBuilder, Insertable } from 'kysely';
import { SelectionColumn } from '../lib/type-utils';
import { CompilingValuesQuery } from './compiling-values-query';
import { InsertTransforms } from '../mappers/table-mapper-transforms';
import { SelectionColumn } from '../lib/type-utils.js';
import { CompilingValuesQuery } from './compiling-values-query.js';
import { InsertTransforms } from '../mappers/table-mapper-transforms.js';
/**

@@ -6,0 +6,0 @@ * Compiling mapping query for inserting rows into a database table.

@@ -13,7 +13,7 @@ "use strict";

exports.CompilingMappingInsertQuery = void 0;
const compiling_values_query_1 = require("./compiling-values-query");
const compiling_values_query_js_1 = require("./compiling-values-query.js");
/**
* Compiling mapping query for inserting rows into a database table.
*/
class CompilingMappingInsertQuery extends compiling_values_query_1.CompilingValuesQuery {
class CompilingMappingInsertQuery extends compiling_values_query_js_1.CompilingValuesQuery {
constructor(db, qb, columnsToInsert, transforms, returnColumns) {

@@ -20,0 +20,0 @@ super(db, returnColumns);

import { Kysely, SelectQueryBuilder } from 'kysely';
import { SelectionColumn } from '../lib/type-utils';
import { ParameterizableMappingQuery } from './parameterizable-query';
import { ParametersObject } from 'kysely-params';
import { SelectTransform } from '../mappers/table-mapper-transforms';
import { SelectionColumn } from '../lib/type-utils.js';
import { ParameterizableMappingQuery } from './parameterizable-query.js';
import { SelectTransform } from '../mappers/table-mapper-transforms.js';
/**

@@ -7,0 +7,0 @@ * Compiling mapping query for selecting rows from a database table.

import { Kysely, UpdateQueryBuilder, UpdateResult, Updateable } from 'kysely';
import { SelectionColumn } from '../lib/type-utils';
import { CompilingValuesQuery } from './compiling-values-query';
import { ParametersObject } from 'kysely-params';
import { CountTransform, UpdateTransforms } from '../mappers/table-mapper-transforms';
import { SelectionColumn } from '../lib/type-utils.js';
import { CompilingValuesQuery } from './compiling-values-query.js';
import { CountTransform, UpdateTransforms } from '../mappers/table-mapper-transforms.js';
/**

@@ -7,0 +7,0 @@ * Compiling mapping query for updating rows in a database table.

@@ -13,7 +13,7 @@ "use strict";

exports.CompilingMappingUpdateQuery = void 0;
const compiling_values_query_1 = require("./compiling-values-query");
const compiling_values_query_js_1 = require("./compiling-values-query.js");
/**
* Compiling mapping query for updating rows in a database table.
*/
class CompilingMappingUpdateQuery extends compiling_values_query_1.CompilingValuesQuery {
class CompilingMappingUpdateQuery extends compiling_values_query_js_1.CompilingValuesQuery {
constructor(db, qb, columnsToUpdate, transforms, returnColumns) {

@@ -20,0 +20,0 @@ super(db, returnColumns);

import { Kysely, CompiledQuery, Compilable, ReturningInterface } from 'kysely';
import { SelectionColumn } from '../lib/type-utils';
import { ParametersObject } from 'kysely-params';
import { SelectionColumn } from '../lib/type-utils.js';
/**

@@ -5,0 +5,0 @@ * Base class for compilable inserting and updating mapping queriees.

import { DeleteQueryBuilder, DeleteResult, Kysely } from 'kysely';
import { ParameterizableMappingQuery } from './parameterizable-query';
import { ParametersObject } from 'kysely-params';
import { CompilingMappingDeleteQuery } from './compiling-delete-query';
import { CountTransform } from '../mappers/table-mapper-transforms';
import { ParameterizableMappingQuery } from './parameterizable-query.js';
import { CompilingMappingDeleteQuery } from './compiling-delete-query.js';
import { CountTransform } from '../mappers/table-mapper-transforms.js';
/**

@@ -7,0 +7,0 @@ * Mapping query for deleting rows from a database table.

@@ -13,3 +13,3 @@ "use strict";

exports.MappingDeleteQuery = void 0;
const compiling_delete_query_1 = require("./compiling-delete-query");
const compiling_delete_query_js_1 = require("./compiling-delete-query.js");
/**

@@ -34,3 +34,3 @@ * Mapping query for deleting rows from a database table.

compile() {
return new compiling_delete_query_1.CompilingMappingDeleteQuery(this.db, this.qb, this.transforms);
return new compiling_delete_query_js_1.CompilingMappingDeleteQuery(this.db, this.qb, this.transforms);
}

@@ -37,0 +37,0 @@ /**

import { Kysely, InsertQueryBuilder, InsertResult, Insertable } from 'kysely';
import { SelectionColumn } from '../lib/type-utils';
import { InsertTransforms } from '../mappers/table-mapper-transforms';
import { SelectionColumn } from '../lib/type-utils.js';
import { InsertTransforms } from '../mappers/table-mapper-transforms.js';
/**

@@ -5,0 +5,0 @@ * Mapping query for inserting rows into a database table.

import { Kysely, SelectQueryBuilder } from 'kysely';
import { SelectionColumn } from '../lib/type-utils';
import { ParameterizableMappingQuery } from './parameterizable-query';
import { ParametersObject } from 'kysely-params';
import { CompilingMappingSelectQuery } from './compiling-select-query';
import { SelectTransform } from '../mappers/table-mapper-transforms';
import { SelectionColumn } from '../lib/type-utils.js';
import { ParameterizableMappingQuery } from './parameterizable-query.js';
import { CompilingMappingSelectQuery } from './compiling-select-query.js';
import { SelectTransform } from '../mappers/table-mapper-transforms.js';
/**

@@ -8,0 +8,0 @@ * Mapping query for selecting rows from a database table.

@@ -13,3 +13,3 @@ "use strict";

exports.MappingSelectQuery = void 0;
const compiling_select_query_1 = require("./compiling-select-query");
const compiling_select_query_js_1 = require("./compiling-select-query.js");
/**

@@ -34,3 +34,3 @@ * Mapping query for selecting rows from a database table.

compile() {
return new compiling_select_query_1.CompilingMappingSelectQuery(this.db, this.qb, this.transforms);
return new compiling_select_query_js_1.CompilingMappingSelectQuery(this.db, this.qb, this.transforms);
}

@@ -37,0 +37,0 @@ /**

import { Kysely, InsertQueryBuilder, InsertResult, Insertable } from 'kysely';
import { SelectionColumn } from '../lib/type-utils';
import { MappingInsertQuery } from './insert-query';
import { CompilingMappingInsertQuery } from './compiling-insert-query';
import { InsertTransforms } from '../mappers/table-mapper-transforms';
import { SelectionColumn } from '../lib/type-utils.js';
import { MappingInsertQuery } from './insert-query.js';
import { CompilingMappingInsertQuery } from './compiling-insert-query.js';
import { InsertTransforms } from '../mappers/table-mapper-transforms.js';
/**

@@ -7,0 +7,0 @@ * Mapping query for inserting rows into a database table,

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SubsettingMappingInsertQuery = void 0;
const insert_query_1 = require("./insert-query");
const compiling_insert_query_1 = require("./compiling-insert-query");
const restrict_values_1 = require("../lib/restrict-values");
const insert_query_js_1 = require("./insert-query.js");
const compiling_insert_query_js_1 = require("./compiling-insert-query.js");
const restrict_values_js_1 = require("../lib/restrict-values.js");
/**

@@ -11,3 +11,3 @@ * Mapping query for inserting rows into a database table,

*/
class SubsettingMappingInsertQuery extends insert_query_1.MappingInsertQuery {
class SubsettingMappingInsertQuery extends insert_query_js_1.MappingInsertQuery {
constructor(db, qb, columnsToInsert, transforms, returnColumns) {

@@ -27,3 +27,3 @@ super(db, qb, transforms, returnColumns);

compile() {
return new compiling_insert_query_1.CompilingMappingInsertQuery(this.db, this.qb, this.columnsToInsert, this.transforms, this.returnColumns);
return new compiling_insert_query_js_1.CompilingMappingInsertQuery(this.db, this.qb, this.columnsToInsert, this.transforms, this.returnColumns);
}

@@ -35,5 +35,5 @@ getInsertColumns() {

if (Array.isArray(objOrObjs)) {
return qb.values(objOrObjs.map((obj) => (0, restrict_values_1.restrictValues)(obj, this.columnsToInsert)));
return qb.values(objOrObjs.map((obj) => (0, restrict_values_js_1.restrictValues)(obj, this.columnsToInsert)));
}
return qb.values((0, restrict_values_1.restrictValues)(objOrObjs, this.columnsToInsert));
return qb.values((0, restrict_values_js_1.restrictValues)(objOrObjs, this.columnsToInsert));
}

@@ -40,0 +40,0 @@ }

import { Kysely, UpdateQueryBuilder, UpdateResult, Updateable } from 'kysely';
import { SelectionColumn } from '../lib/type-utils';
import { MappingUpdateQuery } from './update-query';
import { ParameterizableMappingQuery } from './parameterizable-query';
import { ParametersObject } from 'kysely-params';
import { CompilingMappingUpdateQuery } from './compiling-update-query';
import { CountTransform, UpdateTransforms } from '../mappers/table-mapper-transforms';
import { SelectionColumn } from '../lib/type-utils.js';
import { MappingUpdateQuery } from './update-query.js';
import { ParameterizableMappingQuery } from './parameterizable-query.js';
import { CompilingMappingUpdateQuery } from './compiling-update-query.js';
import { CountTransform, UpdateTransforms } from '../mappers/table-mapper-transforms.js';
/**

@@ -9,0 +9,0 @@ * Mapping query for updating rows into a database table,

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SubsettingMappingUpdateQuery = void 0;
const update_query_1 = require("./update-query");
const compiling_update_query_1 = require("./compiling-update-query");
const restrict_values_1 = require("../lib/restrict-values");
const update_query_js_1 = require("./update-query.js");
const compiling_update_query_js_1 = require("./compiling-update-query.js");
const restrict_values_js_1 = require("../lib/restrict-values.js");
/**

@@ -11,3 +11,3 @@ * Mapping query for updating rows into a database table,

*/
class SubsettingMappingUpdateQuery extends update_query_1.MappingUpdateQuery {
class SubsettingMappingUpdateQuery extends update_query_js_1.MappingUpdateQuery {
constructor(db, qb, columnsToUpdate, transforms, returnColumns) {

@@ -27,3 +27,3 @@ super(db, qb, transforms, returnColumns);

compile() {
return new compiling_update_query_1.CompilingMappingUpdateQuery(this.db, this.qb, this.columnsToUpdate, this.transforms, this.returnColumns);
return new compiling_update_query_js_1.CompilingMappingUpdateQuery(this.db, this.qb, this.columnsToUpdate, this.transforms, this.returnColumns);
}

@@ -34,3 +34,3 @@ getUpdateColumns() {

setColumnValues(qb, obj) {
return qb.set((0, restrict_values_1.restrictValues)(obj, this.columnsToUpdate));
return qb.set((0, restrict_values_js_1.restrictValues)(obj, this.columnsToUpdate));
}

@@ -37,0 +37,0 @@ }

import { Kysely, UpdateQueryBuilder, UpdateResult, Updateable } from 'kysely';
import { SelectionColumn } from '../lib/type-utils';
import { CountTransform, UpdateTransforms } from '../mappers/table-mapper-transforms';
import { SelectionColumn } from '../lib/type-utils.js';
import { CountTransform, UpdateTransforms } from '../mappers/table-mapper-transforms.js';
/**

@@ -5,0 +5,0 @@ * Mapping query for updating rows from a database table.

{
"name": "kysely-mapper",
"version": "0.4.13",
"version": "0.4.14",
"author": "Joseph T. Lapp <arachnojoe@gmail.com>",

@@ -21,4 +21,5 @@ "license": "MIT",

],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"main": "dist/cjs/index.js",
"types": "dist/cjs/index.d.ts",
"source": "/index.ts",

@@ -30,5 +31,4 @@ "files": [

".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/cjs/index.js"
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js"
}

@@ -38,20 +38,20 @@ },

"clean": "rm -rf node_modules && rm -rf dist",
"build": "rm -rdf dist && tsc && tsc -p tsconfig.cjs.json",
"build": "rm -rdf dist && tsc && tsc -p tsconfig.cjs.json && pnpm write-packages",
"write-packages": "echo '{\"type\":\"module\"}' > dist/esm/package.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json",
"build-docs": "typedoc --options ./typedoc.js ./src/index.ts",
"build-all": "pnpm build && pnpm build-docs",
"test": "jest"
"test": "vitest --run"
},
"dependencies": {
"kysely": "^0.24.2",
"kysely-params": "^0.3.10"
"kysely-params": "^0.3.14"
},
"devDependencies": {
"@types/better-sqlite3": "^7.6.3",
"@types/jest": "^29.4.0",
"better-sqlite3": "^8.1.0",
"jest": "^29.4.3",
"ts-jest": "^29.0.5",
"better-sqlite3": "^8.2.0",
"typedoc": "^0.24.5",
"typescript": "^4.9.5"
"typescript": "5.1.3",
"vite": "^4.3.6",
"vitest": "^0.32.2"
}
}

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

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

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

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

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

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

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

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

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

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