o ckF[ ã@s ddlmZGdd„deƒZdS)é)Úsixc@szeZdZdZddd„Zdd„Zdd„Zdd „Zdd d „Zddd„Z dd„Z dd„Z ddd„Z dd„Z dd„Zee eƒZdS)ÚQueryNcCsJ||_||_d|_|r||_n|jj|_g|_d|_d|_d|_||_ dS)Nr) Ú model_classÚlimitÚoffsetÚmanagerÚ_managerÚfiltersÚselectÚsort_byÚrsÚ next_token)Úselfrrr r©rú3/usr/lib/python3/dist-packages/boto/sdb/db/query.pyÚ__init__s  zQuery.__init__cCst|j |¡ƒS©N)ÚiterrÚquery©rrrrÚ__iter__'szQuery.__iter__cCs|jdur | ¡|_t|jƒSr)Ú__local_iter__rÚnextrrrrr*s   z Query.nextcCs|j ||f¡|Sr)r Úappend)rÚproperty_operatorÚvaluerrrÚfilter/sz Query.filterrcCs||_||_|S)zmNot currently fully supported, but we can use this to allow them to set a limit in a chainable method)rr)rrrrrrÚfetch3sz Query.fetchTcCs|j |j|j||j|j¡Sr)rÚcountrr r r )rÚquickrrrr:sz Query.countcCs|j |j|j|j|j¡Sr)rÚ_build_filter_partrr r r rrrrÚ get_query=szQuery.get_querycCs ||_|Sr)r )rÚkeyrrrÚorder@sz Query.ordercCs.|s |j ¡}| ¡}|D]}| |¡q |Sr)rÚget_xmlmanagerÚnew_docÚto_xml)rÚdocÚ xmlmanagerÚobjrrrr&Ds   z Query.to_xmlcCs|jr|jjS|jr |jSdSr)r r Ú _next_tokenrrrrÚget_next_tokenLs zQuery.get_next_tokencCs ||_dSr)r*)rÚtokenrrrÚset_next_tokenSs zQuery.set_next_token)NNN)r)Tr)Ú__name__Ú __module__Ú __qualname__rrrrrrrr!r#r&r+r-Úpropertyr rrrrrs    rN)Ú boto.compatrÚobjectrrrrrÚs