Skip to content

Bump sql-metadata from 1.12.0 to 2.0.0#241

Merged
dependabot[bot] merged 2 commits intomasterfrom
dependabot/pip/sql-metadata-2.0.0
May 12, 2021
Merged

Bump sql-metadata from 1.12.0 to 2.0.0#241
dependabot[bot] merged 2 commits intomasterfrom
dependabot/pip/sql-metadata-2.0.0

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 12, 2021

Bumps sql-metadata from 1.12.0 to 2.0.0.

Release notes

Sourced from sql-metadata's releases.

New Parser and API

This major release of sql-metadata brings a completely new parser and API implemented by @​collerek on top of proposals from #83 and #98.

The gist of the changes is the introduction of the Parser class (see #121) that is later used to get the list columns, tables, aliases.

CREATE TABLE queries are now supported (#35). Aliases handling has been greatly improved thanks to #131.

Code coverage has been improved and is now kept at 100%.

Example

from sql_metadata import Parser
parsed = Parser("SELECT test, id FROM foo, bar")
parsed.columns  # ['test', 'id']
parsed.tables  # ['foo', 'bar']

Migrating from sql_metadata 1.x

sql_metadata.compat module has been implemented to make the introduction of sql-metadata v2.0 smoother.

You can use it by simply changing the imports in your code from:

from sql_metadata import get_query_columns, get_query_tables

into:

from sql_metadata.compat import get_query_columns, get_query_tables

The following functions from the old API are available in the sql_metadata.compat module:

  • generalize_sql
  • get_query_columns (since #131 columns aliases ARE NOT returned by this function)
  • get_query_limit_and_offset
  • get_query_tables
  • get_query_tokens
  • preprocess_query

Changes

... (truncated)

Commits
  • 860ca47 README: added "Authors and contributors" section
  • cf5e210 Update README.md
  • f2b813e Merge pull request #126 from macbre/create-table-support
  • b76c632 Parser: improve docs
  • fb230c0 Proper handling of columns list in CREATE TABLE queries
  • afcd63a Add test_create_table_as_select
  • c1f2783 Parser: add _is_create_table_query property
  • 79b9674 Merge branch 'master' into create-table-support
  • ab2fc18 Merge pull request #131 from collerek/column_aliases
  • dea85b7 Merge branch 'master' into create-table-support
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

Dependabot will merge this PR once CI passes on it, as requested by @macbre.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [sql-metadata](https://github.com/macbre/sql-metadata) from 1.12.0 to 2.0.0.
- [Release notes](https://github.com/macbre/sql-metadata/releases)
- [Commits](macbre/sql-metadata@v1.12.0...v2.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label May 12, 2021
@macbre macbre added this to the v1.6.0 milestone May 12, 2021
@macbre
Copy link
Owner

macbre commented May 12, 2021

@dependabot merge

1 similar comment
@macbre
Copy link
Owner

macbre commented May 12, 2021

@dependabot merge

@dependabot dependabot bot merged commit 7058471 into master May 12, 2021
@dependabot dependabot bot deleted the dependabot/pip/sql-metadata-2.0.0 branch May 12, 2021 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant