Home / File/ neon-http-batch.test.ts — drizzle-orm Source File

neon-http-batch.test.ts — drizzle-orm Source File

Architecture documentation for neon-http-batch.test.ts, a typescript file in the drizzle-orm codebase. 14 imports, 1 dependents.

File typescript DrizzleORM 14 imports 1 dependents

Entity Profile

Dependency Diagram

graph LR
  6e2e482d_9a2a_072f_6dfa_c6293c2f4648["neon-http-batch.test.ts"]
  c7bc55e0_0d9e_c4da_8367_225284280736["neon-http-batch.ts"]
  6e2e482d_9a2a_072f_6dfa_c6293c2f4648 --> c7bc55e0_0d9e_c4da_8367_225284280736
  2f13f474_fa3b_3e63_a071_f434cc963790["commentLikesConfig"]
  6e2e482d_9a2a_072f_6dfa_c6293c2f4648 --> 2f13f474_fa3b_3e63_a071_f434cc963790
  eca8f47e_d07c_3ffb_b2bb_019cc4ad4ecd["commentsConfig"]
  6e2e482d_9a2a_072f_6dfa_c6293c2f4648 --> eca8f47e_d07c_3ffb_b2bb_019cc4ad4ecd
  7f0c1733_54aa_91b2_8434_ba698e234bc1["groupsConfig"]
  6e2e482d_9a2a_072f_6dfa_c6293c2f4648 --> 7f0c1733_54aa_91b2_8434_ba698e234bc1
  8c0f6cc6_8d47_c5b4_4693_bb5fa7ffe1e5["postsConfig"]
  6e2e482d_9a2a_072f_6dfa_c6293c2f4648 --> 8c0f6cc6_8d47_c5b4_4693_bb5fa7ffe1e5
  1164bd35_4423_05e2_1c43_a52ce545860e["usersConfig"]
  6e2e482d_9a2a_072f_6dfa_c6293c2f4648 --> 1164bd35_4423_05e2_1c43_a52ce545860e
  fd5c2f80_fbc1_1307_f469_749de47f6b36["usersToGroupsConfig"]
  6e2e482d_9a2a_072f_6dfa_c6293c2f4648 --> fd5c2f80_fbc1_1307_f469_749de47f6b36
  4a3e841e_0e7b_548f_8b98_2ad5d9fcc5ea["usersToGroupsTable"]
  6e2e482d_9a2a_072f_6dfa_c6293c2f4648 --> 4a3e841e_0e7b_548f_8b98_2ad5d9fcc5ea
  7b6fdfe3_d9a8_26c3_430d_2261b1d7aadb["pg-common-cache.ts"]
  6e2e482d_9a2a_072f_6dfa_c6293c2f4648 --> 7b6fdfe3_d9a8_26c3_430d_2261b1d7aadb
  76da0078_4d8f_9615_8689_c44d597d58dc["TestCache"]
  6e2e482d_9a2a_072f_6dfa_c6293c2f4648 --> 76da0078_4d8f_9615_8689_c44d597d58dc
  d43d88d6_c6b6_386d_d59b_76b8db53bf29["TestGlobalCache"]
  6e2e482d_9a2a_072f_6dfa_c6293c2f4648 --> d43d88d6_c6b6_386d_d59b_76b8db53bf29
  e9867962_df5d_03c5_8e49_973b2b1a930a["serverless"]
  6e2e482d_9a2a_072f_6dfa_c6293c2f4648 --> e9867962_df5d_03c5_8e49_973b2b1a930a
  7a947e11_4b82_a72e_a266_e039a8bd3ff1["neon-http"]
  6e2e482d_9a2a_072f_6dfa_c6293c2f4648 --> 7a947e11_4b82_a72e_a266_e039a8bd3ff1
  8d35eaf2_a542_cfd4_fa1a_fafca0f02686["vitest"]
  6e2e482d_9a2a_072f_6dfa_c6293c2f4648 --> 8d35eaf2_a542_cfd4_fa1a_fafca0f02686
  style 6e2e482d_9a2a_072f_6dfa_c6293c2f4648 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { neon, type NeonQueryFunction } from '@neondatabase/serverless';
import { drizzle, type NeonHttpDatabase } from 'drizzle-orm/neon-http';
import { beforeAll, beforeEach, expect, test } from 'vitest';
import {
	commentLikesConfig,
	commentsConfig,
	commentsTable,
	groupsConfig,
	groupsTable,
	postsConfig,
	postsTable,
	usersConfig,
	usersTable,
	usersToGroupsConfig,
	usersToGroupsTable,
} from './neon-http-batch';
import { TestCache, TestGlobalCache } from './pg-common-cache';

const ENABLE_LOGGING = false;

export const schema = {
	usersTable,
	postsTable,
	commentsTable,
	usersToGroupsTable,
	groupsTable,
	commentLikesConfig,
	commentsConfig,
	postsConfig,
	usersToGroupsConfig,
	groupsConfig,
	usersConfig,
};

let db: NeonHttpDatabase<typeof schema>;
let client: NeonQueryFunction<false, true>;
let dbGlobalCached: NeonHttpDatabase;
let cachedDb: NeonHttpDatabase;

beforeAll(async () => {
	const connectionString = process.env['NEON_HTTP_CONNECTION_STRING'];
	if (!connectionString) {
		throw new Error('NEON_HTTP_CONNECTION_STRING is not defined');
	}
	client = neon(connectionString);
	db = drizzle(client, { schema, logger: ENABLE_LOGGING });
	cachedDb = drizzle(client, {
		logger: ENABLE_LOGGING,
		cache: new TestCache(),
	});
	dbGlobalCached = drizzle(client, {
		logger: ENABLE_LOGGING,
		cache: new TestGlobalCache(),
	});
});

beforeEach((ctx) => {
	ctx.neonPg = {
		db,
	};
	ctx.cachedPg = {
		db: cachedDb,
		dbGlobalCached,
	};
});

test('skip', async () => {
	expect(1).toBe(1);
});

Domain

Frequently Asked Questions

What does neon-http-batch.test.ts do?
neon-http-batch.test.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain.
What does neon-http-batch.test.ts depend on?
neon-http-batch.test.ts imports 14 module(s): TestCache, TestGlobalCache, commentLikesConfig, commentsConfig, groupsConfig, neon-http, neon-http-batch.ts, pg-common-cache.ts, and 6 more.
What files import neon-http-batch.test.ts?
neon-http-batch.test.ts is imported by 1 file(s): pg-common.ts.
Where is neon-http-batch.test.ts in the architecture?
neon-http-batch.test.ts is located at integration-tests/tests/pg/neon-http-batch.test.ts (domain: DrizzleORM, directory: integration-tests/tests/pg).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free