Home / Function/ singlestorePushIntrospect() — drizzle-orm Function Reference

singlestorePushIntrospect() — drizzle-orm Function Reference

Architecture documentation for the singlestorePushIntrospect() function in singlestoreIntrospect.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  6919cccf_82c8_5444_1bad_d599b446ee9d["singlestorePushIntrospect()"]
  5ace557c_1d0c_8b30_588f_2973fb2830b3["singlestoreIntrospect.ts"]
  6919cccf_82c8_5444_1bad_d599b446ee9d -->|defined in| 5ace557c_1d0c_8b30_588f_2973fb2830b3
  cb6874bf_41d2_b505_ecf8_e9397a97e640["fromDatabase()"]
  6919cccf_82c8_5444_1bad_d599b446ee9d -->|calls| cb6874bf_41d2_b505_ecf8_e9397a97e640
  style 6919cccf_82c8_5444_1bad_d599b446ee9d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-kit/src/cli/commands/singlestoreIntrospect.ts lines 9–53

export const singlestorePushIntrospect = async (
	db: DB,
	databaseName: string,
	filters: string[],
) => {
	const matchers = filters.map((it) => {
		return new Minimatch(it);
	});

	const filter = (tableName: string) => {
		if (matchers.length === 0) return true;

		let flags: boolean[] = [];

		for (let matcher of matchers) {
			if (matcher.negate) {
				if (!matcher.match(tableName)) {
					flags.push(false);
				}
			}

			if (matcher.match(tableName)) {
				flags.push(true);
			}
		}

		if (flags.length > 0) {
			return flags.every(Boolean);
		}
		return false;
	};

	const progress = new ProgressView(
		'Pulling schema from database...',
		'Pulling schema from database...',
	);
	const res = await renderWithTask(
		progress,
		fromDatabase(db, databaseName, filter),
	);

	const schema = { id: originUUID, prevId: '', ...res } as SingleStoreSchema;
	const { internal, ...schemaWithoutInternals } = schema;
	return { schema: schemaWithoutInternals };
};

Domain

Subdomains

Frequently Asked Questions

What does singlestorePushIntrospect() do?
singlestorePushIntrospect() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/cli/commands/singlestoreIntrospect.ts.
Where is singlestorePushIntrospect() defined?
singlestorePushIntrospect() is defined in drizzle-kit/src/cli/commands/singlestoreIntrospect.ts at line 9.
What does singlestorePushIntrospect() call?
singlestorePushIntrospect() calls 1 function(s): fromDatabase.

Analyze Your Own Codebase

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

Try Supermodel Free