Skip to content

Commit

Permalink
added an option to cache paginated queries in AG v8
Browse files Browse the repository at this point in the history
  • Loading branch information
mdorf committed Jan 24, 2024
1 parent db2b330 commit 1707d38
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/goo/sparql/solutions_mapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@ def map_each_solutions(select)
list_attributes = Set.new(klass.attributes(:list))
all_attributes = Set.new(klass.attributes(:all))

# for using prefixes before queries
# mdorf, 7/27/2023, AllegroGraph supplied a patch (rfe17161-7.3.1.fasl.patch)
# that enables implicit internal ordering. The patch requires the prefix below
select.prefix('franzOption_imposeImplicitBasicOrdering: <franz:yes>') if @options[:page]
if @options[:page]
# for using prefixes before queries
# mdorf, 7/27/2023, AllegroGraph supplied a patch (rfe17161-7.3.1.fasl.patch)
# that enables implicit internal ordering. The patch requires the prefix below
select.prefix('franzOption_imposeImplicitBasicOrdering: <franz:yes>')
# mdorf, 1/24/2024, AllegroGraph 8 introduced a new feature that allows caching OFFSET/LIMIT queries
select.prefix('franzOption_allowCachingResults: <franz:yes>')
end

# for troubleshooting specific queries (write 1 of 3)
# ont_to_parse = 'OAE'
Expand Down

0 comments on commit 1707d38

Please sign in to comment.