77
88import httpx
99
10- from ..types import axon_create_params , axon_publish_params
11- from .._types import Body , Omit , Query , Headers , NotGiven , omit , not_given
12- from .._utils import path_template , maybe_transform , async_maybe_transform
13- from .._compat import cached_property
14- from .._resource import SyncAPIResource , AsyncAPIResource
15- from .._response import (
10+ from .sql import (
11+ SqlResource ,
12+ AsyncSqlResource ,
13+ SqlResourceWithRawResponse ,
14+ AsyncSqlResourceWithRawResponse ,
15+ SqlResourceWithStreamingResponse ,
16+ AsyncSqlResourceWithStreamingResponse ,
17+ )
18+ from ...types import axon_create_params , axon_publish_params
19+ from ..._types import Body , Omit , Query , Headers , NotGiven , omit , not_given
20+ from ..._utils import path_template , maybe_transform , async_maybe_transform
21+ from ..._compat import cached_property
22+ from ..._resource import SyncAPIResource , AsyncAPIResource
23+ from ..._response import (
1624 to_raw_response_wrapper ,
1725 to_streamed_response_wrapper ,
1826 async_to_raw_response_wrapper ,
1927 async_to_streamed_response_wrapper ,
2028)
21- from .._streaming import Stream , AsyncStream
22- from .._base_client import make_request_options
23- from ..types .axon_view import AxonView
24- from ..types .axon_list_view import AxonListView
25- from ..types .axon_event_view import AxonEventView
26- from ..types .publish_result_view import PublishResultView
29+ from ... _streaming import Stream , AsyncStream
30+ from ... _base_client import make_request_options
31+ from ... types .axon_view import AxonView
32+ from ... types .axon_list_view import AxonListView
33+ from ... types .axon_event_view import AxonEventView
34+ from ... types .publish_result_view import PublishResultView
2735
2836__all__ = ["AxonsResource" , "AsyncAxonsResource" ]
2937
3038
3139class AxonsResource (SyncAPIResource ):
40+ @cached_property
41+ def sql (self ) -> SqlResource :
42+ return SqlResource (self ._client )
43+
3244 @cached_property
3345 def with_raw_response (self ) -> AxonsResourceWithRawResponse :
3446 """
@@ -239,6 +251,10 @@ def subscribe_sse(
239251
240252
241253class AsyncAxonsResource (AsyncAPIResource ):
254+ @cached_property
255+ def sql (self ) -> AsyncSqlResource :
256+ return AsyncSqlResource (self ._client )
257+
242258 @cached_property
243259 def with_raw_response (self ) -> AsyncAxonsResourceWithRawResponse :
244260 """
@@ -468,6 +484,10 @@ def __init__(self, axons: AxonsResource) -> None:
468484 axons .subscribe_sse ,
469485 )
470486
487+ @cached_property
488+ def sql (self ) -> SqlResourceWithRawResponse :
489+ return SqlResourceWithRawResponse (self ._axons .sql )
490+
471491
472492class AsyncAxonsResourceWithRawResponse :
473493 def __init__ (self , axons : AsyncAxonsResource ) -> None :
@@ -489,6 +509,10 @@ def __init__(self, axons: AsyncAxonsResource) -> None:
489509 axons .subscribe_sse ,
490510 )
491511
512+ @cached_property
513+ def sql (self ) -> AsyncSqlResourceWithRawResponse :
514+ return AsyncSqlResourceWithRawResponse (self ._axons .sql )
515+
492516
493517class AxonsResourceWithStreamingResponse :
494518 def __init__ (self , axons : AxonsResource ) -> None :
@@ -510,6 +534,10 @@ def __init__(self, axons: AxonsResource) -> None:
510534 axons .subscribe_sse ,
511535 )
512536
537+ @cached_property
538+ def sql (self ) -> SqlResourceWithStreamingResponse :
539+ return SqlResourceWithStreamingResponse (self ._axons .sql )
540+
513541
514542class AsyncAxonsResourceWithStreamingResponse :
515543 def __init__ (self , axons : AsyncAxonsResource ) -> None :
@@ -530,3 +558,7 @@ def __init__(self, axons: AsyncAxonsResource) -> None:
530558 self .subscribe_sse = async_to_streamed_response_wrapper (
531559 axons .subscribe_sse ,
532560 )
561+
562+ @cached_property
563+ def sql (self ) -> AsyncSqlResourceWithStreamingResponse :
564+ return AsyncSqlResourceWithStreamingResponse (self ._axons .sql )
0 commit comments