@@ -646,20 +646,7 @@ def test_method_query_overload_2(self, client: Cloudflare) -> None:
646646 database = client .d1 .database .query (
647647 database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
648648 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
649- )
650- assert_matches_type (SyncSinglePage [QueryResult ], database , path = ["response" ])
651-
652- @parametrize
653- def test_method_query_with_all_params_overload_2 (self , client : Cloudflare ) -> None :
654- database = client .d1 .database .query (
655- database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
656- account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
657- batch = [
658- {
659- "sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" ,
660- "params" : ["firstParam" , "secondParam" ],
661- }
662- ],
649+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
663650 )
664651 assert_matches_type (SyncSinglePage [QueryResult ], database , path = ["response" ])
665652
@@ -668,6 +655,7 @@ def test_raw_response_query_overload_2(self, client: Cloudflare) -> None:
668655 response = client .d1 .database .with_raw_response .query (
669656 database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
670657 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
658+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
671659 )
672660
673661 assert response .is_closed is True
@@ -680,6 +668,7 @@ def test_streaming_response_query_overload_2(self, client: Cloudflare) -> None:
680668 with client .d1 .database .with_streaming_response .query (
681669 database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
682670 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
671+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
683672 ) as response :
684673 assert not response .is_closed
685674 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -695,12 +684,14 @@ def test_path_params_query_overload_2(self, client: Cloudflare) -> None:
695684 client .d1 .database .with_raw_response .query (
696685 database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
697686 account_id = "" ,
687+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
698688 )
699689
700690 with pytest .raises (ValueError , match = r"Expected a non-empty value for `database_id` but received ''" ):
701691 client .d1 .database .with_raw_response .query (
702692 database_id = "" ,
703693 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
694+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
704695 )
705696
706697 @parametrize
@@ -771,20 +762,7 @@ def test_method_raw_overload_2(self, client: Cloudflare) -> None:
771762 database = client .d1 .database .raw (
772763 database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
773764 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
774- )
775- assert_matches_type (SyncSinglePage [DatabaseRawResponse ], database , path = ["response" ])
776-
777- @parametrize
778- def test_method_raw_with_all_params_overload_2 (self , client : Cloudflare ) -> None :
779- database = client .d1 .database .raw (
780- database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
781- account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
782- batch = [
783- {
784- "sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" ,
785- "params" : ["firstParam" , "secondParam" ],
786- }
787- ],
765+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
788766 )
789767 assert_matches_type (SyncSinglePage [DatabaseRawResponse ], database , path = ["response" ])
790768
@@ -793,6 +771,7 @@ def test_raw_response_raw_overload_2(self, client: Cloudflare) -> None:
793771 response = client .d1 .database .with_raw_response .raw (
794772 database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
795773 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
774+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
796775 )
797776
798777 assert response .is_closed is True
@@ -805,6 +784,7 @@ def test_streaming_response_raw_overload_2(self, client: Cloudflare) -> None:
805784 with client .d1 .database .with_streaming_response .raw (
806785 database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
807786 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
787+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
808788 ) as response :
809789 assert not response .is_closed
810790 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -820,12 +800,14 @@ def test_path_params_raw_overload_2(self, client: Cloudflare) -> None:
820800 client .d1 .database .with_raw_response .raw (
821801 database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
822802 account_id = "" ,
803+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
823804 )
824805
825806 with pytest .raises (ValueError , match = r"Expected a non-empty value for `database_id` but received ''" ):
826807 client .d1 .database .with_raw_response .raw (
827808 database_id = "" ,
828809 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
810+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
829811 )
830812
831813
@@ -1455,20 +1437,7 @@ async def test_method_query_overload_2(self, async_client: AsyncCloudflare) -> N
14551437 database = await async_client .d1 .database .query (
14561438 database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
14571439 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
1458- )
1459- assert_matches_type (AsyncSinglePage [QueryResult ], database , path = ["response" ])
1460-
1461- @parametrize
1462- async def test_method_query_with_all_params_overload_2 (self , async_client : AsyncCloudflare ) -> None :
1463- database = await async_client .d1 .database .query (
1464- database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
1465- account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
1466- batch = [
1467- {
1468- "sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" ,
1469- "params" : ["firstParam" , "secondParam" ],
1470- }
1471- ],
1440+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
14721441 )
14731442 assert_matches_type (AsyncSinglePage [QueryResult ], database , path = ["response" ])
14741443
@@ -1477,6 +1446,7 @@ async def test_raw_response_query_overload_2(self, async_client: AsyncCloudflare
14771446 response = await async_client .d1 .database .with_raw_response .query (
14781447 database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
14791448 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
1449+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
14801450 )
14811451
14821452 assert response .is_closed is True
@@ -1489,6 +1459,7 @@ async def test_streaming_response_query_overload_2(self, async_client: AsyncClou
14891459 async with async_client .d1 .database .with_streaming_response .query (
14901460 database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
14911461 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
1462+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
14921463 ) as response :
14931464 assert not response .is_closed
14941465 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -1504,12 +1475,14 @@ async def test_path_params_query_overload_2(self, async_client: AsyncCloudflare)
15041475 await async_client .d1 .database .with_raw_response .query (
15051476 database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
15061477 account_id = "" ,
1478+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
15071479 )
15081480
15091481 with pytest .raises (ValueError , match = r"Expected a non-empty value for `database_id` but received ''" ):
15101482 await async_client .d1 .database .with_raw_response .query (
15111483 database_id = "" ,
15121484 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
1485+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
15131486 )
15141487
15151488 @parametrize
@@ -1580,20 +1553,7 @@ async def test_method_raw_overload_2(self, async_client: AsyncCloudflare) -> Non
15801553 database = await async_client .d1 .database .raw (
15811554 database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
15821555 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
1583- )
1584- assert_matches_type (AsyncSinglePage [DatabaseRawResponse ], database , path = ["response" ])
1585-
1586- @parametrize
1587- async def test_method_raw_with_all_params_overload_2 (self , async_client : AsyncCloudflare ) -> None :
1588- database = await async_client .d1 .database .raw (
1589- database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
1590- account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
1591- batch = [
1592- {
1593- "sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" ,
1594- "params" : ["firstParam" , "secondParam" ],
1595- }
1596- ],
1556+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
15971557 )
15981558 assert_matches_type (AsyncSinglePage [DatabaseRawResponse ], database , path = ["response" ])
15991559
@@ -1602,6 +1562,7 @@ async def test_raw_response_raw_overload_2(self, async_client: AsyncCloudflare)
16021562 response = await async_client .d1 .database .with_raw_response .raw (
16031563 database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
16041564 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
1565+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
16051566 )
16061567
16071568 assert response .is_closed is True
@@ -1614,6 +1575,7 @@ async def test_streaming_response_raw_overload_2(self, async_client: AsyncCloudf
16141575 async with async_client .d1 .database .with_streaming_response .raw (
16151576 database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
16161577 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
1578+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
16171579 ) as response :
16181580 assert not response .is_closed
16191581 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -1629,10 +1591,12 @@ async def test_path_params_raw_overload_2(self, async_client: AsyncCloudflare) -
16291591 await async_client .d1 .database .with_raw_response .raw (
16301592 database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
16311593 account_id = "" ,
1594+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
16321595 )
16331596
16341597 with pytest .raises (ValueError , match = r"Expected a non-empty value for `database_id` but received ''" ):
16351598 await async_client .d1 .database .with_raw_response .raw (
16361599 database_id = "" ,
16371600 account_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
1601+ batch = [{"sql" : "SELECT * FROM myTable WHERE field = ? OR field = ?;" }],
16381602 )
0 commit comments