Skip to content

S10: bound query parameters with -a NAME=VALUE #14

Closed

Description

@david-Darkcollective

Part of #17. Design: docs/design.md §9 (R3).

Scope

-a/--arg NAME=VALUE (repeatable) binds query parameters ($name) safely, outside the script text:

relix -a id=42 order.relix
xargs -I{} relix -a id={} order.relix
  • An unbound parameter is an analysis error that names it.
  • fmt, bundle and optimize print $name, never the value.

Dependencies

Acceptance

  • Binding through Main.
  • A value holding a quote cannot change the query.
  • The unbound-parameter error.

Activity

  1. david-Darkcollective commented on Oct 9, 2026

    @david-Darkcollective
    MemberAuthor

    Done in #39, merged to develop (88849b5). -a/--arg NAME=VALUE binds $NAME outside the script text. The value is text, which the engine reads as the parameter's analysed type (DarkCollective/relix-core#101), so -a id=42 binds a number against a NUMBER column. A value holding a quote can't change the query. An unbound parameter is an analysis error (exit 3) that names it and says to use -a NAME=VALUE. fmt, bundle and optimize print $name, never the value. QueryParametersTest covers each of these through Main.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliThe relix command itselfbacklogNot yet scheduledenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions