@@ -15,7 +15,7 @@ class TestBasicQueries:
1515
1616 def test_simple_select (self , altertable_client : Client ):
1717 """Test executing a simple SELECT query."""
18- reader = altertable_client .execute ("SELECT 1 AS value" )
18+ reader = altertable_client .query ("SELECT 1 AS value" )
1919
2020 # Check the result
2121 df = reader .read_pandas ()
@@ -25,7 +25,7 @@ def test_simple_select(self, altertable_client: Client):
2525 def test_select_multiple_columns (self , altertable_client : Client ):
2626 """Test SELECT with multiple columns."""
2727 query = "SELECT 1 AS col1, 'test' AS col2, 3.14 AS col3"
28- reader = altertable_client .execute (query )
28+ reader = altertable_client .query (query )
2929
3030 df = reader .read_pandas ()
3131 assert df ["col1" ].iloc [0 ] == 1
@@ -35,7 +35,7 @@ def test_select_multiple_columns(self, altertable_client: Client):
3535 def test_select_with_filter (self , altertable_client : Client , test_table : TableInfo ):
3636 """Test SELECT with WHERE clause."""
3737 # Query with filter
38- reader = altertable_client .execute (
38+ reader = altertable_client .query (
3939 f"SELECT * FROM { test_table .full_name } WHERE value >= 200"
4040 )
4141
@@ -46,7 +46,7 @@ def test_select_with_filter(self, altertable_client: Client, test_table: TableIn
4646 def test_empty_result_set (self , altertable_client : Client , test_table : TableInfo ):
4747 """Test query that returns no rows."""
4848 # Query empty table
49- reader = altertable_client .execute (
49+ reader = altertable_client .query (
5050 f"SELECT * FROM { test_table .full_name } WHERE value > 1000"
5151 )
5252 table = reader .read_all ()
@@ -78,20 +78,20 @@ class TestErrorHandling:
7878 def test_invalid_sql_syntax (self , altertable_client : Client ):
7979 """Test handling of invalid SQL syntax."""
8080 with pytest .raises (Exception ):
81- reader = altertable_client .execute ("INVALID SQL SYNTAX" )
81+ reader = altertable_client .query ("INVALID SQL SYNTAX" )
8282 list (reader )
8383
8484 def test_nonexistent_table (self , altertable_client : Client ):
8585 """Test querying a non-existent table."""
8686 with pytest .raises (Exception ):
87- reader = altertable_client .execute ("SELECT * FROM nonexistent_table_12345" )
87+ reader = altertable_client .query ("SELECT * FROM nonexistent_table_12345" )
8888 list (reader )
8989
9090 def test_invalid_column_name (self , altertable_client : Client , test_table : TableInfo ):
9191 """Test querying with invalid column name."""
9292 # Query with invalid column
9393 with pytest .raises (Exception ):
94- reader = altertable_client .execute (
94+ reader = altertable_client .query (
9595 f"SELECT nonexistent_column FROM { test_table .full_name } "
9696 )
9797 list (reader )
0 commit comments