@@ -61,15 +61,16 @@ impl DuckdbClient {
6161 Ok ( count)
6262 }
6363
64- #[ pyo3( signature = ( href, * , intersects=None , ids=None , collections=None , limit=None , bbox=None , datetime=None , include=None , exclude=None , sortby=None , filter=None , query=None , * * kwargs) ) ]
64+ #[ pyo3( signature = ( href, * , intersects=None , ids=None , collections=None , limit=None , max_items= None , bbox=None , datetime=None , include=None , exclude=None , sortby=None , filter=None , query=None , * * kwargs) ) ]
6565 fn search < ' py > (
6666 & self ,
6767 py : Python < ' py > ,
6868 href : String ,
6969 intersects : Option < StringOrDict > ,
7070 ids : Option < StringOrList > ,
7171 collections : Option < StringOrList > ,
72- limit : Option < u64 > ,
72+ mut limit : Option < u64 > ,
73+ max_items : Option < u64 > ,
7374 bbox : Option < Vec < f64 > > ,
7475 datetime : Option < String > ,
7576 include : Option < StringOrList > ,
@@ -79,6 +80,12 @@ impl DuckdbClient {
7980 query : Option < Bound < ' py , PyDict > > ,
8081 kwargs : Option < Bound < ' py , PyDict > > ,
8182 ) -> Result < Bound < ' py , PyList > > {
83+ if max_items. is_some ( ) {
84+ if limit. is_some ( ) {
85+ tracing:: warn!( "Both max_items and limit are set, overriding limit with max_items" ) ;
86+ }
87+ limit = max_items;
88+ }
8289 let search = crate :: search:: build (
8390 intersects,
8491 ids,
0 commit comments