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

drizzle-orm

Package Overview
Dependencies
Maintainers
4
Versions
976
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drizzle-orm - npm Package Compare versions

Comparing version 0.36.4 to 0.37.0-3f3eb73

durable-sqlite/driver.cjs

7

column-builder.d.ts

@@ -5,2 +5,3 @@ import { entityKind } from "./entity.js";

import type { ExtraConfigColumn, PgColumn, PgSequenceOptions } from "./pg-core/index.js";
import type { SingleStoreColumn } from "./singlestore-core/index.js";
import type { SQL } from "./sql/sql.js";

@@ -10,3 +11,3 @@ import type { SQLiteColumn } from "./sqlite-core/index.js";

export type ColumnDataType = 'string' | 'number' | 'boolean' | 'array' | 'json' | 'date' | 'bigint' | 'custom' | 'buffer';
export type Dialect = 'pg' | 'mysql' | 'sqlite' | 'common';
export type Dialect = 'pg' | 'mysql' | 'sqlite' | 'singlestore' | 'common';
export type GeneratedStorageMode = 'virtual' | 'stored';

@@ -230,3 +231,3 @@ export type GeneratedType = 'always' | 'byDefault';

}
export type BuildColumn<TTableName extends string, TBuilder extends ColumnBuilderBase, TDialect extends Dialect> = TDialect extends 'pg' ? PgColumn<MakeColumnConfig<TBuilder['_'], TTableName>> : TDialect extends 'mysql' ? MySqlColumn<MakeColumnConfig<TBuilder['_'], TTableName>> : TDialect extends 'sqlite' ? SQLiteColumn<MakeColumnConfig<TBuilder['_'], TTableName>> : TDialect extends 'common' ? Column<MakeColumnConfig<TBuilder['_'], TTableName>> : never;
export type BuildColumn<TTableName extends string, TBuilder extends ColumnBuilderBase, TDialect extends Dialect> = TDialect extends 'pg' ? PgColumn<MakeColumnConfig<TBuilder['_'], TTableName>> : TDialect extends 'mysql' ? MySqlColumn<MakeColumnConfig<TBuilder['_'], TTableName>> : TDialect extends 'singlestore' ? SingleStoreColumn<MakeColumnConfig<TBuilder['_'], TTableName>> : TDialect extends 'sqlite' ? SQLiteColumn<MakeColumnConfig<TBuilder['_'], TTableName>> : TDialect extends 'common' ? Column<MakeColumnConfig<TBuilder['_'], TTableName>> : never;
export type BuildIndexColumn<TDialect extends Dialect> = TDialect extends 'pg' ? ExtraConfigColumn : never;

@@ -243,2 +244,2 @@ export type BuildColumns<TTableName extends string, TConfigMap extends Record<string, ColumnBuilderBase>, TDialect extends Dialect> = {

} & {};
export type ChangeColumnTableName<TColumn extends Column, TAlias extends string, TDialect extends Dialect> = TDialect extends 'pg' ? PgColumn<MakeColumnConfig<TColumn['_'], TAlias>> : TDialect extends 'mysql' ? MySqlColumn<MakeColumnConfig<TColumn['_'], TAlias>> : TDialect extends 'sqlite' ? SQLiteColumn<MakeColumnConfig<TColumn['_'], TAlias>> : never;
export type ChangeColumnTableName<TColumn extends Column, TAlias extends string, TDialect extends Dialect> = TDialect extends 'pg' ? PgColumn<MakeColumnConfig<TColumn['_'], TAlias>> : TDialect extends 'mysql' ? MySqlColumn<MakeColumnConfig<TColumn['_'], TAlias>> : TDialect extends 'singlestore' ? SingleStoreColumn<MakeColumnConfig<TColumn['_'], TAlias>> : TDialect extends 'sqlite' ? SQLiteColumn<MakeColumnConfig<TColumn['_'], TAlias>> : never;

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

import { Table } from "../table.js";
import type { Check } from "./checks.js";

@@ -27,3 +26,3 @@ import type { ForeignKey } from "./foreign-keys.js";

schema: string | undefined;
selectedFields: import("../operations.js").SelectedFields<import("../column.js").AnyColumn, Table>;
selectedFields: import("../index.js").ColumnsSelection;
isExisting: TExisting;

@@ -30,0 +29,0 @@ query: TExisting extends true ? undefined : import("../index.js").SQL<unknown>;

@@ -8,3 +8,2 @@ import type { BuildColumns } from "../column-builder.js";

import { QueryBuilder } from "./query-builders/query-builder.js";
import type { SelectedFields } from "./query-builders/select.types.js";
import { MySqlViewBase } from "./view-base.js";

@@ -38,3 +37,3 @@ import { MySqlViewConfig } from "./view-common.js";

static readonly [entityKind]: string;
as<TSelectedFields extends SelectedFields>(qb: TypedQueryBuilder<TSelectedFields> | ((qb: QueryBuilder) => TypedQueryBuilder<TSelectedFields>)): MySqlViewWithSelection<TName, false, AddAliasToSelection<TSelectedFields, TName, 'mysql'>>;
as<TSelectedFields extends ColumnsSelection>(qb: TypedQueryBuilder<TSelectedFields> | ((qb: QueryBuilder) => TypedQueryBuilder<TSelectedFields>)): MySqlViewWithSelection<TName, false, AddAliasToSelection<TSelectedFields, TName, 'mysql'>>;
}

@@ -60,3 +59,3 @@ export declare class ManualViewBuilder<TName extends string = string, TColumns extends Record<string, MySqlColumnBuilderBase> = Record<string, MySqlColumnBuilderBase>> extends ViewBuilderCore<{

schema: string | undefined;
selectedFields: SelectedFields;
selectedFields: ColumnsSelection;
query: SQL | undefined;

@@ -63,0 +62,0 @@ };

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

import type { HTTPTransactionOptions, NeonQueryFunction } from '@neondatabase/serverless';
import type { HTTPQueryOptions, HTTPTransactionOptions, NeonQueryFunction } from '@neondatabase/serverless';
import type { BatchItem, BatchResponse } from "../batch.js";

@@ -24,3 +24,3 @@ import { entityKind } from "../entity.js";

static readonly [entityKind]: string;
$withAuth(token: string): Omit<this, Exclude<keyof this, '$count' | 'delete' | 'select' | 'selectDistinct' | 'selectDistinctOn' | 'update' | 'insert' | 'with' | 'query' | 'execute' | 'refreshMaterializedView'>>;
$withAuth(token: Exclude<HTTPQueryOptions<true, true>['authToken'], undefined>): Omit<this, Exclude<keyof this, '$count' | 'delete' | 'select' | 'selectDistinct' | 'selectDistinctOn' | 'update' | 'insert' | 'with' | 'query' | 'execute' | 'refreshMaterializedView'>>;
batch<U extends BatchItem<'pg'>, T extends Readonly<[U, ...U[]]>>(batch: T): Promise<BatchResponse<T>>;

@@ -27,0 +27,0 @@ }

@@ -40,3 +40,3 @@ import { neon, types } from "@neondatabase/serverless";

const res = target3.call(thisArg, ...argArray);
if ("setToken" in res && typeof res.setToken === "function") {
if (typeof res === "object" && res !== null && "setToken" in res && typeof res.setToken === "function") {
res.setToken(token);

@@ -43,0 +43,0 @@ }

@@ -10,3 +10,3 @@ import { entityKind } from "../entity.js";

import { WithSubquery } from "../subquery.js";
import type { DrizzleTypeError } from "../utils.js";
import type { DrizzleTypeError, NeonAuthToken } from "../utils.js";
import type { PgColumn } from "./columns/index.js";

@@ -279,3 +279,3 @@ import { PgCountBuilder } from "./query-builders/count.js";

refreshMaterializedView<TView extends PgMaterializedView>(view: TView): PgRefreshMaterializedView<TQueryResult>;
protected authToken?: string;
protected authToken?: NeonAuthToken;
execute<TRow extends Record<string, unknown> = Record<string, unknown>>(query: SQLWrapper | string): PgRaw<PgQueryResultKind<TQueryResult, TRow>>;

@@ -282,0 +282,0 @@ transaction<T>(transaction: (tx: PgTransaction<TQueryResult, TFullSchema, TSchema>) => Promise<T>, config?: PgTransactionConfig): Promise<T>;

@@ -290,3 +290,4 @@ import { entityKind } from "../entity.js";

const selectDistinctOn = (...args) => getReplica(replicas).selectDistinctOn(...args);
const $with = (...args) => getReplica(replicas).with(...args);
const _with = (...args) => getReplica(replicas).with(...args);
const $with = (arg) => getReplica(replicas).$with(arg);
const update = (...args) => primary.update(...args);

@@ -310,3 +311,4 @@ const insert = (...args) => primary.insert(...args);

selectDistinctOn,
with: $with,
$with,
with: _with,
get query() {

@@ -313,0 +315,0 @@ return getReplica(replicas).query;

import { entityKind } from "../../entity.js";
import { SQL, type SQLWrapper } from "../../sql/sql.js";
import type { NeonAuthToken } from "../../utils.js";
import type { PgSession } from "../session.js";

@@ -24,3 +25,3 @@ import type { PgTable } from "../table.js";

/** @intrnal */
setToken(token: string): void;
setToken(token?: NeonAuthToken): this;
then<TResult1 = number, TResult2 = never>(onfulfilled?: ((value: number) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;

@@ -27,0 +28,0 @@ catch(onRejected?: ((reason: any) => any) | null | undefined): Promise<number>;

@@ -28,2 +28,3 @@ import { entityKind } from "../../entity.js";

this.token = token;
return this;
}

@@ -30,0 +31,0 @@ then(onfulfilled, onrejected) {

@@ -41,3 +41,3 @@ import { entityKind, is } from "../../entity.js";

});
return this.authToken === void 0 ? new PgInsertBase(
return new PgInsertBase(
this.table,

@@ -50,10 +50,2 @@ mappedValues,

this.overridingSystemValue_
) : new PgInsertBase(
this.table,
mappedValues,
this.session,
this.dialect,
this.withList,
false,
this.overridingSystemValue_
).setToken(this.authToken);

@@ -60,0 +52,0 @@ }

@@ -10,3 +10,8 @@ import { entityKind, is } from "../../entity.js";

import { tracer } from "../../tracing.js";
import { applyMixins, getTableColumns, getTableLikeName, haveSameKeys } from "../../utils.js";
import {
applyMixins,
getTableColumns,
getTableLikeName,
haveSameKeys
} from "../../utils.js";
import { orderSelectedFields } from "../../utils.js";

@@ -58,3 +63,3 @@ import { ViewBaseConfig } from "../../view-common.js";

}
return this.authToken === void 0 ? new PgSelectBase({
return new PgSelectBase({
table: source,

@@ -67,10 +72,2 @@ fields,

distinct: this.distinct
}) : new PgSelectBase({
table: source,
fields,
isPartialSelect,
session: this.session,
dialect: this.dialect,
withList: this.withList,
distinct: this.distinct
}).setToken(this.authToken);

@@ -692,3 +689,3 @@ }

query.joinsNotNullableMap = joinsNotNullableMap;
return authToken === void 0 ? query : query.setToken(authToken);
return query.setToken(authToken);
});

@@ -695,0 +692,0 @@ }

@@ -12,3 +12,3 @@ import type { GetColumnData } from "../../column.js";

import { Table } from "../../table.js";
import { type Assume, type UpdateSet } from "../../utils.js";
import { type Assume, type NeonAuthToken, type UpdateSet } from "../../utils.js";
import type { PgColumn } from "../columns/common.js";

@@ -40,3 +40,3 @@ import type { PgViewBase } from "../view-base.js";

private authToken?;
setToken(token: string): this;
setToken(token: NeonAuthToken): this;
set(values: PgUpdateSetSource<TTable>): PgUpdateWithout<PgUpdateBase<TTable, TQueryResult>, false, 'leftJoin' | 'rightJoin' | 'innerJoin' | 'fullJoin'>;

@@ -43,0 +43,0 @@ }

@@ -8,3 +8,7 @@ import { entityKind, is } from "../../entity.js";

import { Table } from "../../table.js";
import { getTableLikeName, mapUpdateSet, orderSelectedFields } from "../../utils.js";
import {
getTableLikeName,
mapUpdateSet,
orderSelectedFields
} from "../../utils.js";
import { ViewBaseConfig } from "../../view-common.js";

@@ -25,3 +29,3 @@ class PgUpdateBuilder {

set(values) {
return this.authToken === void 0 ? new PgUpdateBase(
return new PgUpdateBase(
this.table,

@@ -32,8 +36,2 @@ mapUpdateSet(this.table, values),

this.withList
) : new PgUpdateBase(
this.table,
mapUpdateSet(this.table, values),
this.session,
this.dialect,
this.withList
).setToken(this.authToken);

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

@@ -5,2 +5,3 @@ import { entityKind } from "../entity.js";

import { type Query, type SQL } from "../sql/index.js";
import type { NeonAuthToken } from "../utils.js";
import { PgDatabase } from "./db.js";

@@ -17,3 +18,3 @@ import type { PgDialect } from "./dialect.js";

constructor(query: Query);
protected authToken?: string;
protected authToken?: NeonAuthToken;
getQuery(): Query;

@@ -20,0 +21,0 @@ mapResult(response: unknown, _isFromBatch?: boolean): unknown;

import { PgTable } from "./table.js";
import { Table } from "../table.js";
import { type Check } from "./checks.js";

@@ -28,3 +27,3 @@ import type { AnyPgColumn } from "./columns/index.js";

schema: string | undefined;
selectedFields: import("../operations.js").SelectedFields<import("../column.js").AnyColumn, Table>;
selectedFields: import("../index.js").ColumnsSelection;
isExisting: TExisting;

@@ -42,3 +41,3 @@ query: TExisting extends true ? undefined : import("../index.js").SQL<unknown>;

schema: string | undefined;
selectedFields: import("../operations.js").SelectedFields<import("../column.js").AnyColumn, Table>;
selectedFields: import("../index.js").ColumnsSelection;
isExisting: TExisting;

@@ -45,0 +44,0 @@ query: TExisting extends true ? undefined : import("../index.js").SQL<unknown>;

@@ -9,3 +9,2 @@ import type { BuildColumns } from "../column-builder.js";

import { QueryBuilder } from "./query-builders/query-builder.js";
import type { SelectedFields } from "./query-builders/select.types.js";
import { PgViewBase } from "./view-base.js";

@@ -39,3 +38,3 @@ import { PgViewConfig } from "./view-common.js";

static readonly [entityKind]: string;
as<TSelectedFields extends SelectedFields>(qb: TypedQueryBuilder<TSelectedFields> | ((qb: QueryBuilder) => TypedQueryBuilder<TSelectedFields>)): PgViewWithSelection<TName, false, AddAliasToSelection<TSelectedFields, TName, 'pg'>>;
as<TSelectedFields extends ColumnsSelection>(qb: TypedQueryBuilder<TSelectedFields> | ((qb: QueryBuilder) => TypedQueryBuilder<TSelectedFields>)): PgViewWithSelection<TName, false, AddAliasToSelection<TSelectedFields, TName, 'pg'>>;
}

@@ -99,3 +98,3 @@ export declare class ManualViewBuilder<TName extends string = string, TColumns extends Record<string, PgColumnBuilderBase> = Record<string, PgColumnBuilderBase>> extends DefaultViewBuilderCore<{

static readonly [entityKind]: string;
as<TSelectedFields extends SelectedFields>(qb: TypedQueryBuilder<TSelectedFields> | ((qb: QueryBuilder) => TypedQueryBuilder<TSelectedFields>)): PgMaterializedViewWithSelection<TName, false, AddAliasToSelection<TSelectedFields, TName, 'pg'>>;
as<TSelectedFields extends ColumnsSelection>(qb: TypedQueryBuilder<TSelectedFields> | ((qb: QueryBuilder) => TypedQueryBuilder<TSelectedFields>)): PgMaterializedViewWithSelection<TName, false, AddAliasToSelection<TSelectedFields, TName, 'pg'>>;
}

@@ -124,3 +123,3 @@ export declare class ManualMaterializedViewBuilder<TName extends string = string, TColumns extends Record<string, PgColumnBuilderBase> = Record<string, PgColumnBuilderBase>> extends MaterializedViewBuilderCore<{

schema: string | undefined;
selectedFields: SelectedFields;
selectedFields: ColumnsSelection;
query: SQL | undefined;

@@ -150,3 +149,3 @@ };

schema: string | undefined;
selectedFields: SelectedFields;
selectedFields: ColumnsSelection;
query: SQL | undefined;

@@ -153,0 +152,0 @@ };

@@ -30,7 +30,7 @@ import type { ChangeColumnTableName, ColumnDataType, Dialect } from "../column-builder.js";

export type AddAliasToSelection<TSelection extends ColumnsSelection, TAlias extends string, TDialect extends Dialect> = Simplify<IsAny<TSelection> extends true ? any : {
[Key in keyof TSelection]: TSelection[Key] extends Column ? ChangeColumnTableName<TSelection[Key], TAlias, TDialect> : TSelection[Key] extends SQL | SQL.Aliased ? TSelection[Key] : TSelection[Key] extends ColumnsSelection ? MapColumnsToTableAlias<TSelection[Key], TAlias, TDialect> : never;
[Key in keyof TSelection]: TSelection[Key] extends Column ? ChangeColumnTableName<TSelection[Key], TAlias, TDialect> : TSelection[Key] extends Table ? AddAliasToSelection<TSelection[Key]['_']['columns'], TAlias, TDialect> : TSelection[Key] extends SQL | SQL.Aliased ? TSelection[Key] : TSelection[Key] extends ColumnsSelection ? MapColumnsToTableAlias<TSelection[Key], TAlias, TDialect> : never;
}>;
export type AppendToResult<TTableName extends string | undefined, TResult, TJoinedName extends string | undefined, TSelectedFields extends SelectedFields<Column, Table>, TOldSelectMode extends SelectMode> = TOldSelectMode extends 'partial' ? TResult : TOldSelectMode extends 'single' ? (TTableName extends string ? Record<TTableName, TResult> : TResult) & (TJoinedName extends string ? Record<TJoinedName, TSelectedFields> : TSelectedFields) : TResult & (TJoinedName extends string ? Record<TJoinedName, TSelectedFields> : TSelectedFields);
export type BuildSubquerySelection<TSelection extends ColumnsSelection, TNullability extends Record<string, JoinNullability>> = TSelection extends never ? any : {
[Key in keyof TSelection]: TSelection[Key] extends SQL ? DrizzleTypeError<'You cannot reference this field without assigning it an alias first - use `.as(<alias>)`'> : TSelection[Key] extends SQL.Aliased ? TSelection[Key] : TSelection[Key] extends Column ? ApplyNullabilityToColumn<TSelection[Key], TNullability[TSelection[Key]['_']['tableName']]> : TSelection[Key] extends ColumnsSelection ? BuildSubquerySelection<TSelection[Key], TNullability> : never;
[Key in keyof TSelection]: TSelection[Key] extends SQL ? DrizzleTypeError<'You cannot reference this field without assigning it an alias first - use `.as(<alias>)`'> : TSelection[Key] extends SQL.Aliased ? TSelection[Key] : TSelection[Key] extends Table ? BuildSubquerySelection<TSelection[Key]['_']['columns'], TNullability> : TSelection[Key] extends Column ? ApplyNullabilityToColumn<TSelection[Key], TNullability[TSelection[Key]['_']['tableName']]> : TSelection[Key] extends ColumnsSelection ? BuildSubquerySelection<TSelection[Key], TNullability> : never;
} & {};

@@ -37,0 +37,0 @@ type SetJoinsNullability<TNullabilityMap extends Record<string, JoinNullability>, TValue extends JoinNullability> = {

import type { CasingCache } from "../casing.js";
import { entityKind } from "../entity.js";
import type { SelectedFields } from "../operations.js";
import type { SelectResult } from "../query-builders/select.types.js";
import { Subquery } from "../subquery.js";
import type { Assume, Equal } from "../utils.js";
import type { AnyColumn } from "../column.js";

@@ -214,6 +215,7 @@ import { Column } from "../column.js";

};
readonly $inferSelect: InferSelectViewModel<View<Assume<TName, string>, TExisting, TSelection>>;
constructor({ name, schema, selectedFields, query }: {
name: TName;
schema: string | undefined;
selectedFields: SelectedFields<AnyColumn, Table>;
selectedFields: ColumnsSelection;
query: SQL | undefined;

@@ -223,1 +225,7 @@ });

}
export declare function isView(view: unknown): view is View;
export type InferSelectViewModel<TView extends View> = Equal<TView['_']['selectedFields'], {
[x: string]: unknown;
}> extends true ? {
[x: string]: unknown;
} : SelectResult<TView['_']['selectedFields'], 'single', Record<TView['_']['name'], 'not-null'>>;

@@ -368,2 +368,3 @@ import { entityKind, is } from "../entity.js";

}
const IsDrizzleView = Symbol.for("drizzle:IsDrizzleView");
class View {

@@ -373,2 +374,4 @@ static [entityKind] = "View";

[ViewBaseConfig];
/** @internal */
[IsDrizzleView] = true;
constructor({ name: name2, schema, selectedFields, query }) {

@@ -389,2 +392,5 @@ this[ViewBaseConfig] = {

}
function isView(view) {
return typeof view === "object" && view !== null && IsDrizzleView in view;
}
Column.prototype.getSQL = function() {

@@ -410,2 +416,3 @@ return new SQL([this]);

isSQLWrapper,
isView,
name,

@@ -412,0 +419,0 @@ noopDecoder,

@@ -22,3 +22,3 @@ import type { ColumnBuilderBaseConfig } from "../../column-builder.js";

getSQLType(): string;
mapFromDriverValue(value: Buffer | Uint8Array): bigint;
mapFromDriverValue(value: Buffer | Uint8Array | ArrayBuffer): bigint;
mapToDriverValue(value: bigint): Buffer;

@@ -41,3 +41,3 @@ }

getSQLType(): string;
mapFromDriverValue(value: Buffer | Uint8Array): T['data'];
mapFromDriverValue(value: Buffer | Uint8Array | ArrayBuffer): T['data'];
mapToDriverValue(value: T['data']): Buffer;

@@ -44,0 +44,0 @@ }

@@ -20,3 +20,10 @@ import { entityKind } from "../../entity.js";

mapFromDriverValue(value) {
return BigInt(Buffer.isBuffer(value) ? value.toString() : String.fromCodePoint(...value));
if (Buffer.isBuffer(value)) {
return BigInt(value.toString());
}
if (value instanceof ArrayBuffer) {
const decoder = new TextDecoder();
return BigInt(decoder.decode(value));
}
return BigInt(String.fromCodePoint(...value));
}

@@ -46,3 +53,10 @@ mapToDriverValue(value) {

mapFromDriverValue(value) {
return JSON.parse(Buffer.isBuffer(value) ? value.toString() : String.fromCodePoint(...value));
if (Buffer.isBuffer(value)) {
return JSON.parse(value.toString());
}
if (value instanceof ArrayBuffer) {
const decoder = new TextDecoder();
return JSON.parse(decoder.decode(value));
}
return JSON.parse(String.fromCodePoint(...value));
}

@@ -49,0 +63,0 @@ mapToDriverValue(value) {

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

import { Table } from "../table.js";
import type { Check } from "./checks.js";

@@ -23,3 +22,3 @@ import type { ForeignKey } from "./foreign-keys.js";

schema: string | undefined;
selectedFields: import("../operations.js").SelectedFields<import("../column.js").AnyColumn, Table>;
selectedFields: import("../index.js").ColumnsSelection;
isExisting: TExisting;

@@ -26,0 +25,0 @@ query: TExisting extends true ? undefined : import("../index.js").SQL<unknown>;

@@ -8,3 +8,2 @@ import type { BuildColumns } from "../column-builder.js";

import { QueryBuilder } from "./query-builders/query-builder.js";
import type { SelectedFields } from "./query-builders/select.types.js";
import { SQLiteViewBase } from "./view-base.js";

@@ -34,3 +33,3 @@ export interface ViewBuilderConfig {

static readonly [entityKind]: string;
as<TSelection extends SelectedFields>(qb: TypedQueryBuilder<TSelection> | ((qb: QueryBuilder) => TypedQueryBuilder<TSelection>)): SQLiteViewWithSelection<TName, false, AddAliasToSelection<TSelection, TName, 'sqlite'>>;
as<TSelection extends ColumnsSelection>(qb: TypedQueryBuilder<TSelection> | ((qb: QueryBuilder) => TypedQueryBuilder<TSelection>)): SQLiteViewWithSelection<TName, false, AddAliasToSelection<TSelection, TName, 'sqlite'>>;
}

@@ -53,3 +52,3 @@ export declare class ManualViewBuilder<TName extends string = string, TColumns extends Record<string, SQLiteColumnBuilderBase> = Record<string, SQLiteColumnBuilderBase>> extends ViewBuilderCore<{

schema: string | undefined;
selectedFields: SelectedFields;
selectedFields: ColumnsSelection;
query: SQL | undefined;

@@ -56,0 +55,0 @@ };

import type { AnyColumn } from "./column.js";
import type { Logger } from "./logger.js";
import { Param, SQL } from "./sql/sql.js";
import { Param, SQL, View } from "./sql/sql.js";
import { Table } from "./table.js";

@@ -31,2 +31,3 @@ export declare function haveSameKeys(left: Record<string, unknown>, right: Record<string, unknown>): boolean;

export declare function getTableColumns<T extends Table>(table: T): T['_']['columns'];
export declare function getViewSelectedFields<T extends View>(view: T): T['_']['selectedFields'];
export type ColumnsWithTable<TTableName extends string, TForeignTableName extends string, TColumns extends AnyColumn<{

@@ -54,1 +55,2 @@ tableName: TTableName;

export declare function isConfig(data: any): boolean;
export type NeonAuthToken = string | (() => string | Promise<string>);

@@ -110,2 +110,5 @@ import { Column } from "./column.js";

}
function getViewSelectedFields(view) {
return view[ViewBaseConfig].selectedFields;
}
function getTableLikeName(table) {

@@ -171,2 +174,3 @@ return is(table, Subquery) ? table._.alias : is(table, View) ? table[ViewBaseConfig].name : is(table, SQL) ? void 0 : table[Table.Symbol.IsAlias] ? table[Table.Symbol.Name] : table[Table.Symbol.BaseName];

getTableLikeName,
getViewSelectedFields,
haveSameKeys,

@@ -173,0 +177,0 @@ isConfig,

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

var version = "0.36.4";
var version = "0.37.0-3f3eb73";

@@ -3,0 +3,0 @@ declare const compatibilityVersion = 10;

// package.json
var version = "0.36.4";
var version = "0.37.0-3f3eb73";

@@ -4,0 +4,0 @@ // src/version.ts

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 too big to display

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

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