Skip to content

Quote table identifiers for CSV and JSON exports#236

Open
swhan0329 wants to merge 1 commit into
outerbase:mainfrom
swhan0329:codex/quote-export-table-data
Open

Quote table identifiers for CSV and JSON exports#236
swhan0329 wants to merge 1 commit into
outerbase:mainfrom
swhan0329:codex/quote-export-table-data

Conversation

@swhan0329
Copy link
Copy Markdown

/claim #59

Summary

  • quote table identifiers in the shared getTableData() data query used by CSV and JSON exports
  • preserve the existing parameterized sqlite_master existence check
  • add regression coverage for table names containing a quote and for reserved table names like order

This is a separate, scoped follow-up to the SQL dump identifier fix and avoids the broader streaming/R2 export implementations.

Verification

  • pnpm exec vitest run src/export/index.test.ts src/export/csv.test.ts src/export/json.test.ts
  • pnpm exec prettier --check src/export/index.ts src/export/index.test.ts
  • git diff --check
  • pnpm run build

Demo

  • The focused tests verify that getTableData() keeps table existence lookup parameterized while emitting quoted SELECTs for kid's profiles and order.

@swhan0329
Copy link
Copy Markdown
Author

Fresh local verification because this PR does not have GitHub checks attached:

  • pnpm exec vitest run src/export/index.test.ts src/export/csv.test.ts src/export/json.test.ts -> 3 files / 20 tests passed
  • pnpm exec prettier --check src/export/index.ts src/export/index.test.ts -> passed
  • git diff --check -> passed
  • pnpm run build -> passed

This remains scoped to quoting table identifiers in the shared CSV/JSON getTableData() data query while preserving the existing parameterized sqlite_master existence check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant