Skip to content
Merged
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
2 changes: 1 addition & 1 deletion pymongosql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
if TYPE_CHECKING:
from .connection import Connection

__version__: str = "0.2.0"
__version__: str = "0.2.1"

# Globals https://www.python.org/dev/peps/pep-0249/#globals
apilevel: str = "2.0"
Expand Down
2 changes: 1 addition & 1 deletion pymongosql/sqlalchemy_mongodb/sqlalchemy_compat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
SQLAlchemy version compatibility utilities for PyMongoSQL.

Expand Down
18 changes: 18 additions & 0 deletions pymongosql/sqlalchemy_mongodb/sqlalchemy_dialect.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,24 @@ def get_table_names(self, connection, schema: Optional[str] = None, **kwargs) ->
_logger.warning(f"Failed to get table names: {e}")
return []

def get_view_names(self, connection, schema: Optional[str] = None, **kwargs) -> List[str]:
"""Get list of views.

MongoDB doesn't have traditional SQL views like relational databases.
Return empty list to satisfy SQLAlchemy and tools like Superset.

Args:
connection: Database connection
schema: Optional schema/database name
**kwargs: Additional arguments

Returns:
Empty list as MongoDB doesn't support SQL views
"""
# MongoDB doesn't have traditional SQL views
# Return empty list to avoid NotImplementedError
return []

def get_columns(self, connection, table_name: str, schema: Optional[str] = None, **kwargs) -> List[Dict[str, Any]]:
"""Get column information for a collection.

Expand Down