Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pybigquery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

2 changes: 1 addition & 1 deletion pybigquery/parse_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def parse_boolean(bool_string):


def parse_url(url): # noqa: C901
query = url.query
query = dict(url.query)

# use_legacy_sql (legacy)
if 'use_legacy_sql' in query:
Expand Down
8 changes: 4 additions & 4 deletions pybigquery/sqlalchemy_bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from sqlalchemy.engine.base import Engine
from sqlalchemy.sql.schema import Column
from sqlalchemy.sql import elements

import re

from .parse_url import parse_url
Expand Down Expand Up @@ -149,11 +150,11 @@ def create_cursor(self):


class BigQueryCompiler(SQLCompiler):
def __init__(self, dialect, statement, column_keys=None,
inline=False, **kwargs):
def __init__(self, dialect, statement, column_keys=None, **kwargs):
if isinstance(statement, Column):
kwargs['compile_kwargs'] = util.immutabledict({'include_table': False})
super(BigQueryCompiler, self).__init__(dialect, statement, column_keys, inline, **kwargs)
# TODO: handle this change to be compatible for all versions?
super(BigQueryCompiler, self).__init__(dialect, statement, column_keys=column_keys, **kwargs)

def visit_select(self, *args, **kwargs):
"""
Expand Down Expand Up @@ -291,7 +292,6 @@ class BigQueryDialect(DefaultDialect):
supports_unicode_statements = True
supports_unicode_binds = True
supports_native_decimal = True
returns_unicode_strings = True
description_encoding = None
supports_native_boolean = True
supports_simple_order_by_label = True
Expand Down
1 change: 0 additions & 1 deletion test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

2 changes: 1 addition & 1 deletion test/test_sqlalchemy_bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def test_dml(engine, session, table_dml):
.filter(table_dml.c.string == 'test')\
.update({'string': 'updated_row'}, synchronize_session=False)
updated_result = table_dml.select().execute().fetchone()
assert updated_result['test_pybigquery.sample_dml_string'] == 'updated_row'
assert updated_result['string'] == 'updated_row'

# test delete
session.query(table_dml).filter(table_dml.c.string == 'updated_row').delete(synchronize_session=False)
Expand Down