File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
33## Unreleased
4+ - Propagate error traces properly, using the ` error_trace ` ` connect_args ` option,
5+ by using ` crate-1.0.0dev1 `
46
57## 2024/08/29 0.39.0
6- Added ` quote_relation_name ` support utility function
8+ - Added ` quote_relation_name ` support utility function
79
810## 2024/06/25 0.38.0
911- Added/reactivated documentation as ` sqlalchemy-cratedb `
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ dynamic = [
8181]
8282dependencies = [
8383 " backports.zoneinfo<1; python_version<'3.9'" ,
84- " crate==1.0.0.dev0 " ,
84+ " crate==1.0.0.dev1 " ,
8585 " geojson<4,>=2.5" ,
8686 " importlib-resources; python_version<'3.9'" ,
8787 " sqlalchemy<2.1,>=1" ,
Original file line number Diff line number Diff line change 1+ import re
2+
3+ import pytest
4+ import sqlalchemy as sa
5+
6+
7+ def test_statement_with_error_trace (cratedb_service ):
8+ """
9+ Verify that the `error_trace` option works correctly.
10+ """
11+ engine = sa .create_engine (cratedb_service .database .dburi , connect_args = {"error_trace" : True })
12+ with engine .connect () as connection :
13+ with pytest .raises (sa .exc .ProgrammingError ) as ex :
14+ connection .execute (sa .text ("CREATE TABLE foo AS SELECT 1 AS _foo" ))
15+ assert ex .match (
16+ re .escape ('InvalidColumnNameException["_foo" conflicts with system column pattern]' )
17+ )
18+ assert ex .match (
19+ "io.crate.exceptions.InvalidColumnNameException: "
20+ '"_foo" conflicts with system column pattern'
21+ )
You can’t perform that action at this time.
0 commit comments