| 128 | } |
| 129 | |
| 130 | std::string getSchemaCypher(ClientContext* clientContext) { |
| 131 | stringstream ss; |
| 132 | exportLoadedExtensions(ss, clientContext); |
| 133 | const auto catalog = Catalog::Get(*clientContext); |
| 134 | auto transaction = Transaction::Get(*clientContext); |
| 135 | ToCypherInfo toCypherInfo; |
| 136 | for (const auto& nodeTableEntry : |
| 137 | catalog->getNodeTableEntries(transaction, false /* useInternal */)) { |
| 138 | ss << nodeTableEntry->toCypher(toCypherInfo) << std::endl; |
| 139 | } |
| 140 | RelGroupToCypherInfo relTableToCypherInfo{clientContext}; |
| 141 | for (const auto& entry : catalog->getRelGroupEntries(transaction, false /* useInternal */)) { |
| 142 | ss << entry->toCypher(relTableToCypherInfo) << std::endl; |
| 143 | } |
| 144 | RelGroupToCypherInfo relGroupToCypherInfo{clientContext}; |
| 145 | for (const auto sequenceEntry : catalog->getSequenceEntries(transaction)) { |
| 146 | ss << sequenceEntry->toCypher(relGroupToCypherInfo) << std::endl; |
| 147 | } |
| 148 | for (auto macroName : catalog->getMacroNames(transaction)) { |
| 149 | ss << catalog->getScalarMacroFunction(transaction, macroName)->toCypher(macroName) |
| 150 | << std::endl; |
| 151 | } |
| 152 | return ss.str(); |
| 153 | } |
| 154 | |
| 155 | std::string getCopyCypher(const ClientContext* context, const FileScanInfo* boundFileInfo, |
| 156 | const std::unordered_map<std::string, const std::atomic<bool>*>& canUseParallelReader) { |
no test coverage detected