code: def query_under_condition(condition, kind='2'):
          '''
          Get All data of certain kind according to the condition
          '''
          if DB_CFG['kind'] == 's':
              return TabPost.select().where(
                  (TabPost.kind == kind) & (TabPost.valid == 1)
              ).order_by(
                  TabPost.time_update.desc()
              )
  
          return TabPost.select().where(
              (TabPost.kind == kind) &
              (TabPost.valid == 1) &
              TabPost.extinfo.contains(condition)
          ).order_by(TabPost.time_update.desc()f query_under_condition(condition, kind='2'):
          '''
          Get All data of certain kind according to the condition
          '''
          if DB_CFG['kind'] == 's':
              return TabPost.select().where(
                  (TabPost.kind == kind) & (TabPost.valid == 1)
              ).order_by(
                  TabPost.time_update.desc()
              )
  
          return TabPost.select().where(
              (TabPost.kind == kind) &
              (TabPost.valid == 1) &
              TabPost.extinfo.contains(condition)
          ).order_by(TabPost.time_update.desc())
docs: Get All data of certain kind according to the condition