supports_multivalues_insert = True
tuple_in_values = True
supports_statement_cache = True
- supports_nesting_cte = True
default_paramstyle = "qmark"
execution_ctx_cls = SQLiteExecutionContext
insert_executemany_returning = False
cte_follows_insert = False
- supports_nesting_cte = False
supports_native_enum = False
supports_native_boolean = False
if not cte.nesting and self.level_by_ctes[cte] == nesting_level
}
- if ctes and not self.dialect.supports_nesting_cte:
- raise exc.CompileError(
- "Nesting CTE is not supported by this "
- "dialect's statement compiler."
- )
-
ctes_recursive = any([cte.recursive for cte in ctes])
if self.positional:
import functools
-import pytest
from sqlalchemy import delete
from sqlalchemy import testing
from sqlalchemy import text
"SELECT cte.outer_cte FROM cte",
)
- @pytest.mark.parametrize(
- "dialect",
- [mysql],
- )
- def test_nesting_cte_unsupported_backend_raise(self, dialect):
- stmt = select(
- [
- select(
- [select([literal(1).label("one")]).cte("t2", nesting=True)]
- ).cte("t")
- ]
- )
-
- assert_raises_message(
- CompileError,
- "Nesting CTE is not supported by this "
- "dialect's statement compiler.",
- functools.partial(stmt.compile, dialect=dialect.dialect()),
- )
-
def test_select_from_insert_cte_with_nesting(self):
products = table("products", column("id"), column("price"))