3.3.11 Miscellaneous predicates
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog Semantic Web Library 3.0
        • Two RDF APIs
          • library(semweb/rdf_db): The RDF database
            • Miscellaneous predicates
              • rdf_bnode/1
              • rdf_source_location/2
              • rdf_generation/1
              • rdf_estimate_complexity/4
              • rdf_statistics/1
              • rdf_match_label/3
              • lang_matches/2
              • lang_equal/2
              • rdf_reset_db/0
              • rdf_version/1
Availability::- use_module(library(semweb/rdf_db)).
Source[det]rdf_generation(-Generation)
True when Generation is the current generation of the database. Each modification to the database increments the generation. It can be used to check the validity of cached results deduced from the database. Committing a non-empty transaction increments the generation by one.

When inside a transaction, Generation is unified to a term TransactionStartGen + InsideTransactionGen. E.g., 4+3 means that the transaction was started at generation 4 of the global database and we have created 3 new generations inside the transaction. Note that this choice of representation allows for comparing generations using Prolog arithmetic. Comparing a generation in one transaction with a generation in another transaction is meaningless.