congress.datalog.ruleset module

class congress.datalog.ruleset.RuleSet

Bases: object

Keeps track of all rules for all tables.

add_rule(key, rule)

Add a rule to the Ruleset

@rule can be a Rule or a Fact. Returns True if add_rule() changes the RuleSet.

clear()
clear_table(table)
contains(key, rule)
discard_rule(key, rule)

Remove a rule from the Ruleset

@rule can be a Rule or a Fact. Returns True if discard_rule() changes the RuleSet.

get_rules(key, match_literal=None)
keys()