Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Sep 13, 2025

Summary

  • Add optional command-line argument for database grow size in both XML Importer and Exporter CLI applications
  • Support user-friendly byte suffixes (B, KB, MB, GB) for specifying grow size
  • Implement proper error handling with fallback to default value for invalid inputs
  • Update target framework versions from net6.0 to net8.0 for consistency with main library

Changes Made

  • XML Importer (Platform.Data.Doublets.Xml.Importer/Program.cs):

    • Added ParseGrowSize() method to parse grow size with suffix support
    • Added optional command-line argument for database grow size
    • Updated target framework to net8.0
  • XML Exporter (Platform.Data.Doublets.Xml.Exporter/Program.cs):

    • Added ParseGrowSize() method to parse grow size with suffix support
    • Added optional command-line argument for database grow size
    • Updated target framework to net8.0

Usage Examples

# Use default grow size
dotnet run input.xml database.links document_name

# Specify custom grow size in bytes
dotnet run input.xml database.links document_name 1048576

# Use MB suffix for readability
dotnet run input.xml database.links document_name 16MB

# Use GB suffix for large files
dotnet run input.xml database.links document_name 2GB

Test Plan

  • Build solution successfully with no errors
  • Run all existing unit tests - all 16 tests pass
  • Test importer with various grow size formats (16MB, 1GB, default)
  • Test exporter with custom grow size
  • Verify error handling for invalid grow size inputs
  • Confirm backward compatibility when no grow size is specified

Backward Compatibility

This change is fully backward compatible. When the grow size argument is not provided or is empty, the application falls back to the default UnitedMemoryLinks<TLinkAddress>.DefaultLinksSizeStep value, maintaining existing behavior.

Fixes #5

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #5
@konard konard self-assigned this Sep 13, 2025
- Add optional command-line argument for database grow size in both XML Importer and Exporter
- Support byte suffixes (B, KB, MB, GB) for user-friendly input
- Add proper error handling with fallback to default value for invalid inputs
- Update target framework from net6.0 to net8.0 for consistency with main library
- Maintain backward compatibility by using default grow size when no argument provided

Fixes #5

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@konard konard changed the title [WIP] Make possible to configure database grow size Make database grow size configurable Sep 13, 2025
@konard konard marked this pull request as ready for review September 13, 2025 15:34
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.

Make possible to configure database grow size

2 participants