sqlalchemy-bigquery 0.0.4__tar.gz → 0.0.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/PKG-INFO +1 -1
- {sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/sqlalchemy_bigquery/__init__.py +1 -1
- {sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/sqlalchemy_bigquery/base.py +1 -1
- {sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/sqlalchemy_bigquery.egg-info/PKG-INFO +1 -1
- {sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/test/test_suite.py +33 -3
- {sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/MANIFEST.in +0 -0
- {sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/README.rst +0 -0
- {sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/setup.cfg +0 -0
- {sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/setup.py +0 -0
- {sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/sqlalchemy_bigquery/pyodbc.py +0 -0
- {sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/sqlalchemy_bigquery/requirements.py +0 -0
- {sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/sqlalchemy_bigquery.egg-info/SOURCES.txt +0 -0
- {sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/sqlalchemy_bigquery.egg-info/dependency_links.txt +0 -0
- {sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/sqlalchemy_bigquery.egg-info/entry_points.txt +0 -0
- {sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/sqlalchemy_bigquery.egg-info/not-zip-safe +0 -0
- {sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/sqlalchemy_bigquery.egg-info/top_level.txt +0 -0
|
@@ -3,9 +3,15 @@
|
|
|
3
3
|
import sqlalchemy.sql as sql
|
|
4
4
|
from sqlalchemy import func
|
|
5
5
|
|
|
6
|
+
import sqlalchemy_bigquery
|
|
6
7
|
import sqlalchemy_bigquery.base as bq
|
|
7
8
|
|
|
8
9
|
|
|
10
|
+
def test_assert_correct_version():
|
|
11
|
+
""" yep. update it every time """
|
|
12
|
+
assert "0.0.4" == sqlalchemy_bigquery.__version__
|
|
13
|
+
|
|
14
|
+
|
|
9
15
|
def test_mixed_case_function_label_not_quoted():
|
|
10
16
|
s = sql.select([
|
|
11
17
|
func.sum().label("Pork")
|
|
@@ -37,9 +43,9 @@ def test_mixed_case_column_not_quoted():
|
|
|
37
43
|
assert "Pork" in str(s)
|
|
38
44
|
|
|
39
45
|
|
|
40
|
-
def
|
|
46
|
+
def test_string_literal_does_not_use_old_sql_quote_escaping():
|
|
41
47
|
s = sql.select([
|
|
42
|
-
func.look_at(sql.column("something")
|
|
48
|
+
func.look_at(sql.column("something") == "here's a single-quote")
|
|
43
49
|
]).select_from(
|
|
44
50
|
sql.table("something_else")
|
|
45
51
|
).compile(
|
|
@@ -47,4 +53,28 @@ def test_string_literals_correctly_quoted():
|
|
|
47
53
|
dialect=bq.BQDialect()
|
|
48
54
|
)
|
|
49
55
|
assert "here''s" not in str(s)
|
|
50
|
-
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def test_string_literals_correctly_quoted():
|
|
59
|
+
s = sql.select([
|
|
60
|
+
func.look_at(sql.column("something") == "here's a single-quote")
|
|
61
|
+
]).select_from(
|
|
62
|
+
sql.table("something_else")
|
|
63
|
+
).compile(
|
|
64
|
+
compile_kwargs={"literal_binds": True},
|
|
65
|
+
dialect=bq.BQDialect()
|
|
66
|
+
)
|
|
67
|
+
assert "here\\'s" in str(s)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def test_string_literals_not_oldstyle_quoted_in_func():
|
|
71
|
+
s = str(
|
|
72
|
+
sql.case(
|
|
73
|
+
[(sql.column("WHOA") == "Jason's", 1)],
|
|
74
|
+
else_=0
|
|
75
|
+
).compile(
|
|
76
|
+
compile_kwargs={"literal_binds": True},
|
|
77
|
+
dialect=bq.BQDialect()
|
|
78
|
+
)
|
|
79
|
+
)
|
|
80
|
+
assert "Jason's" not in s
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/sqlalchemy_bigquery.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/sqlalchemy_bigquery.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{sqlalchemy_bigquery-0.0.4 → sqlalchemy_bigquery-0.0.5}/sqlalchemy_bigquery.egg-info/top_level.txt
RENAMED
|
File without changes
|