Skip to content

Add support for reading SQL from file or stdin #3

Description

@castengine

Goal

Allow the --select_sql argument to accept input from a file or standard input (stdin), making it easier to use complex queries without shell escaping.

Tasks

  • If --select_sql starts with @, treat the rest as a path to a .sql file and read its contents
    • Example: --select_sql @query.sql
  • If --select_sql is -, read SQL from stdin
  • Validate file existence and show error if file is not found
  • Update README with usage examples

Why it matters

Long SQL queries are difficult to pass inline. Supporting file and stdin input aligns with standard CLI practices and improves developer ergonomics.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions