SQLite transitive closure extension.