Skip to content

Commit

Permalink
Merge pull request #115 from Mause/duckdb-0.2.8
Browse files Browse the repository at this point in the history
Bump duckdb version
  • Loading branch information
Mause authored Aug 7, 2021
2 parents 065a3b3 + 1f25995 commit 12698fd
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 91 deletions.
22 changes: 1 addition & 21 deletions duckdb_engine/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, List, Optional, Tuple, Type
from typing import Any, Dict, List, Tuple, Type

import duckdb
from sqlalchemy.dialects.postgresql import dialect as postgres_dialect
Expand Down Expand Up @@ -58,26 +58,6 @@ def close(self) -> None:
# duckdb doesn't support 'soft closes'
pass

@property
def description(
self,
) -> Optional[
# TODO: remove this override once the next version of duckdb is released
Tuple[
str,
str,
Optional[str],
Optional[str],
Optional[str],
Optional[str],
Optional[str],
]
]:
try:
return self.c.description
except RuntimeError:
return None

def executemany(
self, statement: str, parameters: List[Dict] = None, context: Any = None
) -> None:
Expand Down
5 changes: 0 additions & 5 deletions duckdb_engine/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ def test_get_check_constraints(inspector: PGInspector) -> None:
inspector.get_check_constraints("test", None)


@mark.xfail(reason="reflection not yet supported in duckdb", raises=NotImplementedError)
def test_get_unique_constraints(inspector: PGInspector) -> None:
inspector.get_unique_constraints("test", None)

Expand All @@ -143,16 +142,12 @@ def test_table_reflect(session: Session, engine: Engine) -> None:
insp.reflect_table(user_table, None)


@mark.xfail(reason="current duckdb release doesnt support size param", raises=TypeError)
def test_fetch_df_chunks() -> None:
import duckdb

duckdb.connect(":memory:").execute("select 1").fetch_df_chunk(1)


@mark.xfail(
reason="current duckdb release doesnt support size param", raises=RuntimeError
)
def test_description() -> None:
import duckdb

Expand Down
Loading

0 comments on commit 12698fd

Please sign in to comment.