// run: // serde_dialog test1.toml -o test1_toml.db // souffle test1_toml_query.dl // return the dependencies of the 'rand' package defined in test1.toml // along with their corresponding versions #include "../schemas/serde_string_key.dl" .decl depVersion(dep: symbol, version: symbol) depVersion(dep, version) :- rootElem(_, root), map(root, "dependencies", deps), map(deps, dep, depRecord), map(depRecord, "version", versionId), string(versionId, version). .input rootElem, type, bool, number, string, map, struct, seq, tuple, structType, variantType(IO=sqlite, dbname="test1_toml.db") .output depVersion(IO=stdout)