Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(analyzer): Analyze queries using a running PostgreSQL database #2805

Merged
merged 10 commits into from
Oct 12, 2023

Commits on Oct 10, 2023

  1. feat(analyzer): Analyze queries using a running PostgreSQL database

    94 of the open issues on sqlc are related to the analyzer. There are
    many cases where the current analyzer produces false positives or
    false negatives.
    
    sqlx and some other projects have proven that it's possible to extract
    query metadata from a running database.
    
    This approach is a bit different, in that the database analysis is
    layered on top of the existing query analyzer. We use the new analysis
    to provide better type information and support a wider set of cases when
    the existing analyzer fails.
    kyleconroy committed Oct 10, 2023
    Configuration menu
    Copy the full SHA
    cba2aac View commit details
    Browse the repository at this point in the history
  2. test(analyzer): Update endtoend tests for new analyzer

    Add a `contexts` key to exec.json to opt certain tests into or out of
    database-backed analysis.
    
    Fix many incorrect test cases that didn't run against an actual
    database.
    kyleconroy committed Oct 10, 2023
    Configuration menu
    Copy the full SHA
    48f638b View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2023

  1. back out change

    kyleconroy committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    884d317 View commit details
    Browse the repository at this point in the history
  2. Address comments

    kyleconroy committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    770837d View commit details
    Browse the repository at this point in the history
  3. No more splitting

    kyleconroy committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    854758f View commit details
    Browse the repository at this point in the history
  4. fix invalid_func_args

    kyleconroy committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    7e73bc3 View commit details
    Browse the repository at this point in the history
  5. invalid_params

    kyleconroy committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    65ffec2 View commit details
    Browse the repository at this point in the history
  6. Fix last tests

    kyleconroy committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    ea91202 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    daecc8b View commit details
    Browse the repository at this point in the history
  8. Fix diff_output test

    kyleconroy committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    e955bb5 View commit details
    Browse the repository at this point in the history