class_docstr: test other interface that has db_name params
class_docstr_tok: ["test","other","interface","that","has","db_name","params"]
docstr: target: test search with db
  method: 1. create collection in a db
          2. query from partitions
          3. query output fields: pk + dynamic
          4. query output vector field and ignore growing
          5. query with pagination
          6. query iterator
  expected: no error
docstr_tok: ["target",":","test","search","with","db","method",":","1.","create","collection","in","a","db","2.","query","from","partitions","3.","query","output","fields",":","pk","+","dynamic","4.","query","output","vector","field","and","ignore","growing","5.","query","with","pagination","6.","query","iterator","expected",":","no","error"]
code: def test_query_db(self):
      """
      target: test search with db
      method: 1. create collection in a db
              2. query from partitions
              3. query output fields: pk + dynamic
              4. query output vector field and ignore growing
              5. query with pagination
              6. query iterator
      expected: no error
      """
      # prepare data:
      #  1. create collection with pk_field + vector_field, enable dynamic field
      #  2. insert [0, nb) into default partition and flush
      #  3. create index and load
      #  4. insert data with dynamic extra field into new partition, pk from [nb, 2*nb)
      _, partition_name = self.prepare_data_for_db_search()
  
      # query from partition
      query_expr = (
          f"{ct.default_int64_field_name} in [0, {ct.default_nb}]"
      )
      res, _ = self.collection_wrap.query(
          query_expr, partition_names=[partition_name]
      )
      assert len(res) == 1
  
      # query output pk + dynamic fields
      res_dynamic, _ = self.collection_wrap.query(
          query_expr,
          output_fields=[
              ct.default_int64_field_name,
              ct.default_string_field_name,
          ],
      )
      assert ct.default_int64_field_name in res_dynamic[0].keys()
  
      # query output vector field
      vec_res, _ = self.collection_wrap.query(
          query_expr, output_fields=[ct.default_float_vec_field_name]
      )
      assert set(vec_res[0].keys()) == {
          ct.default_float_vec_field_name,
          ct.default_int64_field_name,
      }
  
      #  query with pagination
      expr = f"1000 <= {ct.default_int64_field_name} < 4000 "
      page_res, _ = self.collection_wrap.query(
          expr, offset=1000, limit=1000
      )
      assert len(page_res) == 1000
  
      # delte and query
      del_expr = (
          f"{ct.default_int64_field_name} in [0, {ct.default_nb}]"
      )
      self.collection_wrap.delete(del_expr)
      self.collection_wrap.query(
          del_expr, check_task=CheckTasks.check_query_empty
      )
  
      # upsert and query
      # TODO https://github.com/milvus-io/milvus/issues/26595
      # upsert_data = cf.gen_default_rows_data(start=0, nb=1, with_json=False)
      # upsert_df= pd.DataFrame({
      #     ct.default_int64_field_name: pd.Series(data=[0]),
      #     ct.default_float_vec_field_name: cf.gen_vectors(1, ct.default_dim)
      # })
      # self.collection_wrap.upsert(data=upsert_df)
      # upsert_entity, _ = self.collection_wrap.query(del_expr, output_fields=[ct.default_string_field_name])
      # assert set(vec_res[0].keys()) == {ct.default_int64_field_name}
  
      # query iterator
      self.collection_wrap.query_iterator(
          f"{ct.default_int64_field_name} <= 3000",
          limit=ct.default_limit * 10,
          partition_names=[partition_name],
          check_task=CheckTasks.check_query_iterator,
          check_items={"count": 1000, "limit": ct.default_limit * 10},
      )
  
imports: import pandas
  import pytest
  from base.client_base import TestcaseBase
  from common.common_type import CheckTasks, CaseLabel
  from common import common_func
  from common import common_type
  from utils.util_log import test_log
label_desc: Use image node_id 8 for calling the TestDatabaseOtherApi obj's underlying member method code with example usage: obj.test_query_db() without return types