loadObjectSourceWithRoutineFallback (table/objectSourceLoad.ts)

dbx · apps/desktop/src/lib/table/objectSourceLoad.ts · typescript · Apache-2.0
database

Loads database object source with fallback for routine type mismatches.

// Source: https://github.com/t8y2/dbx | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import type { DatabaseType, ObjectSource, ObjectSourceKind } from "@/types/database";

export type GetObjectSourceFn = (connectionId: string, database: string, schema: string, name: string, objectType: ObjectSourceKind, signature?: string, relationName?: string) => Promise<ObjectSource>;

export type BuildEditableObjectSourceFn = (input: { databaseType: DatabaseType; objectType: ObjectSourceKind; schema?: string; name: string; source: string }) => Promise<string>;

/**
 * Load object source, retrying common routine type mismatches.
 * Optimistic Ctrl/Cmd+click often assumes PROCEDURE; Oracle fun

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key