memgraph/include/utils/char_str.hpp
Kruno Tomola Fabro fbd9ca8420 First version of CSVImport tool.
Query and import works.

Properties now use unordered_map.
Reduced memory footprint of properties by more than half.
2016-08-22 19:03:45 +01:00

24 lines
453 B
C++

#pragma once
#include <cstring>
#include "utils/total_ordering.hpp"
class CharStr : public TotalOrdering<CharStr>
{
public:
CharStr(const char *str) : str(str) {}
friend bool operator==(const CharStr &lhs, const CharStr &rhs)
{
return strcmp(lhs.str, rhs.str) == 0;
}
friend bool operator<(const CharStr &lhs, const CharStr &rhs)
{
return strcmp(lhs.str, rhs.str) < 0;
}
private:
const char *str;
};