#3902 queryOpts for queryHistory
Merged 6 months ago by tkopecek. Opened 8 months ago by tkopecek.
tkopecek/koji issue3899  into  master

file modified
+9 -1
@@ -8149,6 +8149,9 @@ 

      build_target: only relating to a build target

      group: only relating to a (comps) group

      cg: only relating to a content generator

+ 

+     - query

+     queryOpts: for final query (countOnly/order/offset/limit)

      """

      common_fields = {

          # fields:aliases common to all versioned tables
@@ -8220,6 +8223,10 @@ 

              if table not in table_fields:

                  raise koji.GenericError("No such history table: %s" % table)

      ret = {}

+     if 'queryOpts' in kwargs:

+         queryOpts = kwargs.pop('queryOpts')

+     else:

+         queryOpts = None

      for table in tables:

          fields = {}

          for field in common_fields:
@@ -8405,7 +8412,8 @@ 

              continue

          fields, aliases = zip(*fields.items())

          query = QueryProcessor(columns=fields, aliases=aliases, tables=[table],

-                                joins=joins, clauses=clauses, values=data)

+                                joins=joins, clauses=clauses, values=data,

+                                opts=queryOpts)

          ret[table] = query.iterate()

      return ret

  

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

6 months ago

Metadata Update from @mfilip:
- Pull-request tagged with: testing-done

6 months ago

Commit bdf2b3f fixes this pull-request

Pull-Request has been merged by tkopecek

6 months ago