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

Add support for EXPLAIN statement #231

Merged
merged 30 commits into from
Jun 7, 2020

Commits on May 24, 2020

  1. Add support for EXPLAIN statement

    It's still a WIP to gather feedback
    Leandro Cesquini Pereira committed May 24, 2020
    Configuration menu
    Copy the full SHA
    3b5145d View commit details
    Browse the repository at this point in the history

Commits on May 26, 2020

  1. Implement explain_query callback

    Leandro Cesquini Pereira committed May 26, 2020
    Configuration menu
    Copy the full SHA
    f28c842 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2020

  1. Add all explain options for Postgres from v9 to v12

    and addressed review comments.
    
    TODO: implement EXPLAIN for tds and myxql
    Leandro Cesquini Pereira committed May 27, 2020
    Configuration menu
    Copy the full SHA
    6c0e844 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2020

  1. Add support for all Postgres versions

    Leandro Cesquini Pereira committed May 29, 2020
    Configuration menu
    Copy the full SHA
    d46c264 View commit details
    Browse the repository at this point in the history
  2. Leverage Ecto.Multi to guarantee a rollback after EXPLAIN statement

    Leandro Cesquini Pereira committed May 29, 2020
    Configuration menu
    Copy the full SHA
    941d2cb View commit details
    Browse the repository at this point in the history
  3. Leverage iodata on explain query and add explain output callback

    Each adapter should be responsible for how to format
    the output of the EXPLAIN statement
    Leandro Cesquini Pereira committed May 29, 2020
    Configuration menu
    Copy the full SHA
    d25ba1c View commit details
    Browse the repository at this point in the history
  4. Update lib/ecto/adapters/sql.ex

    Co-authored-by: José Valim <jose.valim@gmail.com>
    Leandro Cesquini Pereira and josevalim authored May 29, 2020
    Configuration menu
    Copy the full SHA
    15cd28f View commit details
    Browse the repository at this point in the history
  5. Update lib/ecto/adapters/sql.ex

    Co-authored-by: José Valim <jose.valim@gmail.com>
    Leandro Cesquini Pereira and josevalim authored May 29, 2020
    Configuration menu
    Copy the full SHA
    e62542d View commit details
    Browse the repository at this point in the history
  6. Update lib/ecto/adapters/postgres/connection.ex

    Co-authored-by: José Valim <jose.valim@gmail.com>
    Leandro Cesquini Pereira and josevalim authored May 29, 2020
    Configuration menu
    Copy the full SHA
    6d08ba7 View commit details
    Browse the repository at this point in the history
  7. Update lib/ecto/adapters/sql.ex

    Co-authored-by: José Valim <jose.valim@gmail.com>
    Leandro Cesquini Pereira and josevalim authored May 29, 2020
    Configuration menu
    Copy the full SHA
    7451fd9 View commit details
    Browse the repository at this point in the history
  8. Address review comments:

    - Only accept true/false values for options (raise if not)
    - Fix doc
    - Raise if query fails (call query! instead of query)
    Leandro Cesquini Pereira committed May 29, 2020
    Configuration menu
    Copy the full SHA
    d34b522 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2020

  1. Format mysql explain output as a table

    Leandro Cesquini Pereira committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    03002f2 View commit details
    Browse the repository at this point in the history
  2. Raise for Tds because currently it lacks support for multiple sets

    Leandro Cesquini Pereira committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    8fcf356 View commit details
    Browse the repository at this point in the history
  3. Fix explain query for postgres > v9.0

    Leandro Cesquini Pereira committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    24fe371 View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2020

  1. Update lib/ecto/adapters/tds/connection.ex

    Co-authored-by: José Valim <jose.valim@gmail.com>
    Leandro Cesquini Pereira and josevalim authored Jun 2, 2020
    Configuration menu
    Copy the full SHA
    0a22eac View commit details
    Browse the repository at this point in the history
  2. Improve docs and fix TDS raise message

    Leandro Cesquini Pereira committed Jun 2, 2020
    Configuration menu
    Copy the full SHA
    a9ad09a View commit details
    Browse the repository at this point in the history
  3. Refactor so the adapter runs the query and format output

    That way Ecto.Adapters.SQL is responsible for providing the public API,
    controlling the execution, and making sure explain doesn't cause side effects,
    while each adapter has control over which query function to call,
    mostly to support TDS multiple result sets.
    
    Also:
    - Add explain!
    - More tests
    Leandro Cesquini Pereira committed Jun 2, 2020
    2 Configuration menu
    Copy the full SHA
    a95bb00 View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2020

  1. Revert to explain raising on invalid queries

    Leandro Cesquini Pereira committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    cee7a28 View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2020

  1. Add missing shared opts

    Leandro Cesquini Pereira committed Jun 6, 2020
    Configuration menu
    Copy the full SHA
    9367b63 View commit details
    Browse the repository at this point in the history
  2. Unify explain_opts and shared_opts

    Leandro Cesquini Pereira committed Jun 6, 2020
    Configuration menu
    Copy the full SHA
    4f360f5 View commit details
    Browse the repository at this point in the history
  3. Split keywords to avoid passing unecessary opts downstream

    Leandro Cesquini Pereira committed Jun 6, 2020
    Configuration menu
    Copy the full SHA
    44f8b39 View commit details
    Browse the repository at this point in the history
  4. typo

    Leandro Cesquini Pereira committed Jun 6, 2020
    Configuration menu
    Copy the full SHA
    507f782 View commit details
    Browse the repository at this point in the history
  5. Update lib/ecto/adapters/sql.ex

    Co-authored-by: José Valim <jose.valim@gmail.com>
    Leandro Cesquini Pereira and josevalim authored Jun 6, 2020
    Configuration menu
    Copy the full SHA
    e881efa View commit details
    Browse the repository at this point in the history
  6. Update lib/ecto/adapters/sql.ex

    Co-authored-by: José Valim <jose.valim@gmail.com>
    Leandro Cesquini Pereira and josevalim authored Jun 6, 2020
    Configuration menu
    Copy the full SHA
    a0dc8e9 View commit details
    Browse the repository at this point in the history
  7. Update lib/ecto/adapters/sql.ex

    Co-authored-by: José Valim <jose.valim@gmail.com>
    Leandro Cesquini Pereira and josevalim authored Jun 6, 2020
    Configuration menu
    Copy the full SHA
    9f958ea View commit details
    Browse the repository at this point in the history
  8. improve docs

    Leandro Cesquini Pereira committed Jun 6, 2020
    Configuration menu
    Copy the full SHA
    1efd817 View commit details
    Browse the repository at this point in the history
  9. typo

    Leandro Cesquini Pereira committed Jun 6, 2020
    Configuration menu
    Copy the full SHA
    9943af6 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2020

  1. Update lib/ecto/adapters/sql.ex

    Co-authored-by: José Valim <jose.valim@gmail.com>
    Leandro Cesquini Pereira and josevalim authored Jun 7, 2020
    Configuration menu
    Copy the full SHA
    72f89d9 View commit details
    Browse the repository at this point in the history
  2. Update lib/ecto/adapters/sql.ex

    Co-authored-by: José Valim <jose.valim@gmail.com>
    Leandro Cesquini Pereira and josevalim authored Jun 7, 2020
    Configuration menu
    Copy the full SHA
    d6d4c0a View commit details
    Browse the repository at this point in the history
  3. improve docs

    Leandro Cesquini Pereira committed Jun 7, 2020
    Configuration menu
    Copy the full SHA
    9d5ba8d View commit details
    Browse the repository at this point in the history