Skip to content

Commit edecb13

Browse files
authored
Merge 51771de into bf81dc8
2 parents bf81dc8 + 51771de commit edecb13

24 files changed

+569
-3248
lines changed

.golangci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ linters:
7272
- gochecknoinits
7373
path: filesql\.go
7474
source: func init\(\)
75-
- linters:
76-
- staticcheck
77-
path: driver/.*\.go
78-
text: SA1019.*deprecated.*Go 1.8
7975
- path: (.+)\.go$
8076
text: fmt.Fprintf
8177
- path: (.+)\.go$

CONTRIBUTING.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ filesql/
7070
├── domain/ # Domain model layer
7171
│ ├── model/ # Domain model definitions
7272
│ └── repository/ # Repository interfaces
73-
├── driver/ # SQLite driver implementation
7473
├── testdata/ # Test data files
7574
├── doc/ # Documentation
7675
│ ├── ja/ # Japanese documentation
@@ -85,7 +84,6 @@ filesql/
8584
### Directory Roles
8685

8786
- **domain/**: Layer containing business logic and domain models. Pure Go implementation without external dependencies
88-
- **driver/**: SQLite driver interface and implementation. Provides database/sql compatible driver
8987
- **testdata/**: Sample files such as CSV, TSV, LTSV used in tests
9088
- **doc/**: Multi-language documentation with subdirectories for each language
9189

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Rather than maintaining duplicate code across both projects, we extracted the co
2020
- 🔍 **SQLite3 SQL Interface** - Use SQLite3's powerful SQL dialect to query your files
2121
- 📁 **Multiple File Formats** - Support for CSV, TSV, and LTSV files
2222
- 🗜️ **Compression Support** - Automatically handles .gz, .bz2, .xz, and .zst compressed files
23+
- 🌊 **Stream Processing** - Efficiently handles large files through streaming with configurable chunk sizes
24+
- 📖 **Flexible Input Sources** - Support for file paths, directories, io.Reader, and embed.FS
2325
- 🚀 **Zero Setup** - No database server required, everything runs in-memory
2426
- 🌍 **Cross-Platform** - Works seamlessly on Linux, macOS, and Windows
2527
- 💾 **SQLite3 Powered** - Built on the robust SQLite3 engine for reliable SQL processing
@@ -374,6 +376,39 @@ if err != nil {
374376
}
375377
```
376378

379+
#### Auto-Save Input Type Restrictions
380+
381+
**Important**: Auto-save behavior depends on your input data source:
382+
383+
- **File Paths** (`AddPath`, `AddPaths`): Supports both overwrite mode (empty string) and output directory
384+
```go
385+
// ✅ Overwrite original files
386+
builder.AddPath("data.csv").EnableAutoSave("")
387+
388+
// ✅ Save to output directory
389+
builder.AddPath("data.csv").EnableAutoSave("./backup")
390+
```
391+
392+
- **io.Reader** (`AddReader`): **Only supports output directory mode**
393+
```go
394+
// ❌ Build error - overwrite mode not supported
395+
builder.AddReader(reader, "table", model.FileTypeCSV).EnableAutoSave("")
396+
397+
// ✅ Must specify output directory
398+
builder.AddReader(reader, "table", model.FileTypeCSV).EnableAutoSave("./output")
399+
```
400+
401+
- **Filesystems** (`AddFS`): **Only supports output directory mode**
402+
```go
403+
// ❌ Build error - overwrite mode not supported
404+
builder.AddFS(filesystem).EnableAutoSave("")
405+
406+
// ✅ Must specify output directory
407+
builder.AddFS(filesystem).EnableAutoSave("./output")
408+
```
409+
410+
This restriction exists because io.Reader and filesystem inputs don't have original file paths that can be overwritten. The builder will return an error at build time if you try to use overwrite mode with these input types.
411+
377412
### Manual Data Export (Alternative to Auto-Save)
378413

379414
If you prefer manual control over when to save changes to files instead of using auto-save:

0 commit comments

Comments
 (0)