Conversation
… CLI - Add locale field to TableInspectionResult interface - Extend inferType() to recognize locale-formatted dates (DD.MM.YYYY, MM/DD/YYYY, etc.) - Implement detectLocale() algorithm: separator + part order analysis - de-DE: DMY with dot (25.03.2026) - en-US: MDY with slash (03/25/2026) - en-GB: DMY with slash (25/03/2026) - ja-JP: YMD with slash (2026/03/12) - Ambiguous defaults: slash→en-US, dot→de-DE - Integrate locale detection in inspectTable() and generateSchema() - Set locale on both connection and table level in generated schema - Update add-table command to propagate detected locale - Add locale hints to CLI output - 47 new tests covering all detection scenarios Closes #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements automatic locale detection in CLI
inspectandadd-tablecommands (SOSO-446 / #19).Changes
src/types/schema.ts: Addedlocale?: stringtoTableInspectionResultsrc/cli/SchemaInspector.ts:inferType()to recognize locale-formatted dates (DD.MM.YYYY, MM/DD/YYYY, YYYY/MM/DD)detectLocale()method: analyzes separator + part order from Date/DateTime/ChangeTimestamp values.→de-DE, DMY+/→en-GB, MDY+/→en-US, YMD+/→ja-JP/→en-US,.→de-DE (with warning)inspectTable()now returns detected locale in resultgenerateSchema()sets locale on both connection and table levelmostFrequent()helper for connection-level localesrc/cli/commands.ts:inspectandadd-tablepropagate locale, output hints updatedTests
tests/cli/SchemaInspector.locale.test.tsConcept
See
docs/SOSO-446/FEATURE_CONCEPT.mdfor full design document.Closes #19