153897 {
153898 auto indent = [](
string &str,
const idx_t n) {
153899 str.append(n, ' ');
153900 };
153901 auto format_byte = [&](
const uint8_t byte) {
153902 if (!options.inside_gate && options.display_ascii && byte >= 32 && byte <= 126) {
153903 return string(1, static_cast<char>(byte));
153904 }
153906 };
153907
153908 string str = "";
153909 indent(str, options.indent_level);
153910 reference<const Node> ref(node);
153911 ToStringOptions child_options = options;
153912 Iterator(art, ref, true, [&](const ConstPrefixHandle &handle) {
153913 str += "Prefix: |";
153914 for (
idx_t i = 0; i < handle.data[art.PrefixCount()]; i++) {
153915 str += format_byte(handle.data[i]) + "|";
153916 if (options.key_path) {
153917 child_options.key_depth++;
153918 }
153919 }
153920 });
153921
153922 auto child = ref.get().ToString(art, child_options);
153923 return str + "\n" + child;
153924}
std::string to_string(const T &value)
Definition duckdb.cpp:19425
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237