Skip to content

Expose parameter names from ParsedSql [SPR-16211] #20759

Closed as not planned
Closed as not planned

Description

@spring-projects-issues

Yanming Zhou opened SPR-16211 and commented

I'm developing a query console using NamedParameterJdbcTemplate, I need get parameter names from sql to construct UI form let user input parameters

ParsedSql parsedSql = NamedParameterUtils.parseSqlStatement(sql);
List<String> params = parsedSql.getParameterNames(); //NOT public

It's better if NamedParameterJdbcTemplate could provide a method to get parameter name and parameter type, using PreparedStatement.getParameterMetaData().getParameterType()


Reference URL: #1597

Issue Links:

Activity

  1. spring-projects-issues commented on Jan 10, 2018

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    ParsedSql would have to provide new accessor methods which don't allow for mutation; the current methods are really only meant to for internal purposes. Let's revisit this for 5.1.

  2. spring-projects-issues commented on Oct 22, 2018

    @spring-projects-issues
    CollaboratorAuthor

    Yanming Zhou commented

     Please revisit this for 5.1.

  3. added
    in: data
    type: enhancement
    on Jan 11, 2019
  4. rengy-github commented on Feb 14, 2020

    @rengy-github

    Namedparameterutils is a tool class. I also want to use this class instead of copying one

  5. removed this from the 6.x Backlog milestone on Dec 29, 2023
  6. added
    status: declined
    on Dec 29, 2023
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

    in: datastatus: declinedtype: enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions