GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [FEATURE] TablesNamesFinder does not support CREATE VIEW · Issue #2123 · JSQLParser/JSqlParser

[FEATURE] TablesNamesFinder does not support CREATE VIEW #2123

New issue
Copy link
New issue
Copy link
Closed
Closed
[FEATURE] TablesNamesFinder does not support CREATE VIEW#2123
Copy link

Description

@cptnricard
cptnricard
opened on Dec 12, 2024
Issue body actions

Is there a reason why TablesNamesFinder supports a CREATE TABLE but throws an exception for a CREATE VIEW?
Wouldn't the implementation be almost identical?

The current implementation is

    @Override
    public <S> Void visit(CreateView createView, S context) {
        throwUnsupported(createView);
        return null;
    }

It seems that it could easily be replaced with

    @Override
    public <S> Void visit(CreateView create, S context) {
        visit(create.getView(), null);
        if (create.getSelect() != null) {
            create.getSelect().accept((SelectVisitor<?>) this, context);
        }
        return null;
    }

Which is almost a copy&paste of the CREATE TABLE implementation

    @Override
    public <S> Void visit(CreateTable create, S context) {
        visit(create.getTable(), null);
        if (create.getSelect() != null) {
            create.getSelect().accept((SelectVisitor<?>) this, context);
        }
        return null;
    }

Activity

  1. manticore-projects commented on Dec 13, 2024

    @manticore-projects
    manticore-projects
    on Dec 13, 2024
    Contributor
    More actions

    Greetings!
    You are right of course and your PR was very welcome.

  2. cptnricard
    added a commit that references this issue on Dec 15, 2024

    fix: [FEATURE] TablesNamesFinder does not support CREATE VIEW JSQLPar…

    f30360f
  3. manticore-projects
    added a commit that references this issue on Dec 15, 2024

    fix: [FEATURE] TablesNamesFinder does not support CREATE VIEW #2123 (#…

    8f8439e
  4. manticore-projects commented on Dec 15, 2024

    @manticore-projects
    manticore-projects
    on Dec 15, 2024
    Contributor
    More actions

    fixed via #2124

  5. manticore-projects
    closed this as completedon Dec 15, 2024
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.