Skip to content

feat(SOSO-451): Add optional tableFactory parameter to SchemaManager constructor#22

Merged
wagnert merged 1 commit intodevelopfrom
feature/SOSO-451-schema-manager-optional-table-factory
Mar 12, 2026
Merged

feat(SOSO-451): Add optional tableFactory parameter to SchemaManager constructor#22
wagnert merged 1 commit intodevelopfrom
feature/SOSO-451-schema-manager-optional-table-factory

Conversation

@wagnert
Copy link
Member

@wagnert wagnert commented Mar 12, 2026

Summary

  • Add optional 3rd parameter tableFactory?: DynamicTableFactoryInterface to SchemaManager constructor
  • Enables injecting pre-configured DynamicTableFactory with custom policies (e.g., WriteConversionPolicy)
  • Eliminates unsafe property override workaround in downstream MCP servers

Changes

File Change
src/utils/SchemaManager.ts Optional tableFactory parameter with nullish coalescing fallback
tests/utils/SchemaManager.test.ts 4 new tests for both constructor paths
CLAUDE.md Updated constructor docs and factory injection examples
CHANGELOG.md v3.5.0 entry
package.json Version bump to 3.5.0
docs/SOSO-451/FEATURE_CONCEPT.md Feature concept document

Usage

// Without custom factory (unchanged default behavior)
const db = new SchemaManager(clientFactory, schema);

// With custom factory (NEW)
const tableFactory = new DynamicTableFactory(clientFactory, schema, undefined, writePolicy);
const db = new SchemaManager(clientFactory, schema, tableFactory);

Linked Issues

…constructor

Allow injecting a pre-configured DynamicTableFactory into SchemaManager,
enabling custom policies (e.g., WriteConversionPolicy) without unsafe
property overrides. When not provided, behavior is identical to v3.4.0.

Closes #21
@wagnert wagnert merged commit 8c21ef2 into develop Mar 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant