CGI-FR / CGI-FR/LINO

Add SQL Export Format to `lino pull` Command

Open
#311 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
23
Forks
5
PR merge metrics
No merged PRs in 30d

Description

As part of the effort to support multiple export formats in the `lino pull` command, this sub-task focuses on implementing SQL format support (#309).

**Tasks:**
- Implement SQL generation logic that converts the pulled data into SQL `INSERT` statements.
- Add a `--format sql` option to the `lino pull` command.
- Ensure that the SQL export can handle all existing `lino pull` flags and options (e.g., `--limit`, `--filter`, `--where`).
- Add unit and integration tests to verify SQL generation accuracy.
- Update the documentation with examples of how to use the SQL export format.

**Acceptance Criteria:**
- The `lino pull` command generates valid SQL scripts that can be executed to initialize a test database.
- All relevant `lino pull` flags and options are compatible with the SQL export format.
- Documentation is updated with SQL format usage examples.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the existing `lino pull` command and its current export-format handling. Run the existing unit and integration tests for `lino pull`, then identify how `--limit`, `--filter`, and `--where` are passed through. Done means SQL INSERT output works with those options, tests cover generation and integration behavior, and documentation includes usage examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, sql
Domain
cli, databases, documentation, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.