# sqlizer-io/sqlizer-client-dotnet architecture

> Architecture diagram of the GitHub repository sqlizer-io/sqlizer-client-dotnet, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sqlizer-io/sqlizer-client-dotnet
- Repository: https://github.com/sqlizer-io/sqlizer-client-dotnet

## Overview

##### Project Type Analysis
This is a specialized API client library written in .NET that serves as a wrapper for the SQLizer.io service, which converts various file formats (Excel, CSV, JSON) into SQL database scripts.

##### Main Components

a) Client Application Layer:
- SQLizerClient as the main component
- Core classes visible in the file structure:
- SQLizerFile (main interaction class)
- DatabaseType (enumeration)
- Settings (configuration class)

b) External Service Layer:
- SQLizer.io API Service
- File Storage System (for input/output)

**┌─────────────────────────────────────────────────────────┐**
- Client Application                      │
- ┌─────────────────┐    ┌────────────────────┐        │
- Settings     │    │    SQLizerFile     │        │

- ApiKey      │    │   - DatabaseType   │        │
- ┘    │   - TableName      │        │
- ▲              │   - HasHeaders      │        │
- SheetName       │        │
- CellRange       │        │
- SaveResultAsync()│        │
- etc...         │        │
- ┘        │
- ┘

- ▼
**┌─────────────────────────────────────────────────────────┐**
- SQLizer.io API                        │
- ┘

##### Key Relationships to Highlight
- Settings class providing configuration to SQLizerFile
- SQLizerFile handling file operations and API communication
- Data flow from input files through the client to the API
- Result flow from API back to local storage

##### Important Implementation Details
- Asynchronous nature of operations
- File format support (Excel, CSV, JSON)
- Configuration options
- Error handling paths

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Settings["Settings Class\n(API Configuration)"]
        SQLizerFile["SQLizerFile Class\n(File Operations)"]
        DatabaseType["DatabaseType Enum\n(DB Configuration)"]
        
        Settings --> SQLizerFile
        DatabaseType --> SQLizerFile
    end

    subgraph FileSystem
        InputFiles["Input Files\n(Excel, CSV, JSON)"]
        OutputFiles["Output Files\n(SQL Scripts)"]
    end

    subgraph ExternalService
        SQLizerAPI["SQLizer.io API Service"]
    end

    InputFiles --> SQLizerFile
    SQLizerFile --> SQLizerAPI
    SQLizerAPI --> OutputFiles

    classDef default fill:#f9f9f9,stroke:#333,stroke-width:2px
    classDef component fill:#ddf1fd,stroke:#0078d4,stroke-width:2px
    classDef external fill:#e1f3e1,stroke:#2ea44f,stroke-width:2px
    classDef storage fill:#fff3e0,stroke:#ff9800,stroke-width:2px

    class Settings,SQLizerFile,DatabaseType component
    class SQLizerAPI external
    class InputFiles,OutputFiles storage

    click SQLizerFile "https://github.com/sqlizer-io/sqlizer-client-dotnet/blob/master/SQLizerClient/SQLizerFile.cs"
    click Settings "https://github.com/sqlizer-io/sqlizer-client-dotnet/blob/master/SQLizerClient/Settings.cs"
    click DatabaseType "https://github.com/sqlizer-io/sqlizer-client-dotnet/blob/master/SQLizerClient/DatabaseType.cs"

    subgraph Legend
        L1["Component"]:::component
        L2["External Service"]:::external
        L3["Storage"]:::storage
    end
```
