The congress.datalog.database Module¶
-
class
congress.datalog.database.Database(name=None, abbr=None, theories=None, schema=None, desc=None, owner=None)¶ Bases:
congress.datalog.topdown.TopDownTheory-
class
Proof(binding, rule)¶ Bases:
object
-
class
ProofCollection(proofs)¶ Bases:
object
-
atom_to_internal(atom, proofs=None)¶
-
bi_unify(dbtuple, unifier1, atom, unifier2, theoryname)¶ THING1 is always a ground DBTuple and THING2 is always an ATOM.
-
body(thing)¶
-
content(tablenames=None)¶ Return a sequence of Literals representing all the table data.
-
content_string()¶
-
defined_tablenames()¶
-
delete(atom, proofs=None)¶ Deletes ATOM from the DB. Returns changes.
-
delete_actual(atom, proofs=None)¶ Workhorse for deleting ATOM from the DB.
Along with the proofs that are no longer true.
-
explain(atom)¶
-
get_arity_self(tablename)¶
-
head(thing)¶
-
head_index(table, match_literal=None)¶
-
insert(atom, proofs=None)¶ Inserts ATOM into the DB. Returns changes.
-
insert_actual(atom, proofs=None)¶ Workhorse for inserting ATOM into the DB.
Along with proofs explaining how ATOM was computed from other tables.
-
is_noop(event)¶ Returns T if EVENT is a noop on the database.
-
modify(event)¶ Insert/Delete atom.
Inserts/deletes ATOM and returns a list of changes that were caused. That list contains either 0 or 1 Event.
-
policy()¶ Return the policy for this theory.
No policy in this theory; only data.
-
str2()¶
-
tablenames(body_only=False, include_builtin=False, include_modal=True)¶ Return all table names occurring in this theory.
-
update(events)¶ Applies all of EVENTS to the DB.
Each event is either an insert or a delete.
-
update_would_cause_errors(events)¶ Return a list of Policyxception.
Return a list of PolicyException if we were to apply the events EVENTS to the current policy.
-
class