ifndef are replaced with the pragma once
This commit is contained in:
parent
379bfb14c4
commit
ba434cf48a
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@
|
||||
*.so
|
||||
*.dSYM/
|
||||
memgraph
|
||||
*~
|
||||
|
@ -21,4 +21,3 @@ on a 64 bit linux kernel.
|
||||
* catch (for compiling tests)
|
||||
|
||||
## build
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <random>
|
||||
|
||||
#include "api/restful/resource.hpp"
|
||||
#include "mvcc/version_list.hpp"
|
||||
#include "debug/log.hpp"
|
||||
|
||||
#pragma url /node
|
||||
@ -15,46 +16,33 @@ public:
|
||||
void post(sp::Request& req, sp::Response& res)
|
||||
{
|
||||
task->run([this, &req]() {
|
||||
// start a new transaction and obtain a reference to it
|
||||
auto t = db->tx_engine.begin();
|
||||
// VertexRecord vertex;
|
||||
// auto& transaction = db->tx_engine.begin();
|
||||
// auto accessor = vertex.access(transaction);
|
||||
// auto node = accessor.insert();
|
||||
|
||||
// insert a new vertex in the graph
|
||||
auto atom = db->graph.vertices.insert(t);
|
||||
// // TODO: req.json can be empty
|
||||
// // probably there is some other place to handle
|
||||
// // emptiness of req.json
|
||||
|
||||
// a new version was created and we got an atom along with the
|
||||
// first version. obtain a pointer to the first version
|
||||
//
|
||||
// nullptr
|
||||
// ^
|
||||
// |
|
||||
// [Vertex v1]
|
||||
// ^
|
||||
// |
|
||||
// [Atom id=k] k {1, 2, ...}
|
||||
//
|
||||
auto node = atom->first();
|
||||
// // first version
|
||||
// //
|
||||
// // for(key, value in body)
|
||||
// // node->properties[key] = value;
|
||||
// for(auto it = req.json.MemberBegin(); it != req.json.MemberEnd(); ++it)
|
||||
// {
|
||||
// vertex->data.props.set<String>(it->name.GetString(), it->value.GetString());
|
||||
// }
|
||||
|
||||
// TODO: req.json can be empty
|
||||
// probably there is some other place to handle
|
||||
// emptiness of req.json
|
||||
|
||||
// first version
|
||||
//
|
||||
// for(key, value in body)
|
||||
// node->properties[key] = value;
|
||||
for(auto it = req.json.MemberBegin(); it != req.json.MemberEnd(); ++it)
|
||||
{
|
||||
node->properties.emplace<String>(it->name.GetString(), it->value.GetString());
|
||||
}
|
||||
|
||||
// commit the transaction
|
||||
db->tx_engine.commit(t);
|
||||
// transaction.commit();
|
||||
|
||||
// return the node we created so we can send it as a response body
|
||||
return node;
|
||||
//return node;
|
||||
return nullptr;
|
||||
},
|
||||
[&req, &res](Vertex* node) {
|
||||
return res.send(properties_to_string(node));
|
||||
return res.send("TODO");
|
||||
// return res.send(properties_to_string(node));
|
||||
});
|
||||
}
|
||||
};
|
||||
@ -68,10 +56,11 @@ public:
|
||||
void get(sp::Request& req, sp::Response& res)
|
||||
{
|
||||
task->run([this, &req]() -> Vertex* {
|
||||
// read id param
|
||||
Id id(std::stoull(req.params[0]));
|
||||
// TODO: transaction?
|
||||
return db->graph.find_vertex(id);
|
||||
// // read id param
|
||||
// Id id(std::stoull(req.params[0]));
|
||||
// // TODO: transaction?
|
||||
// return db->graph.find_vertex(id);
|
||||
return nullptr;
|
||||
},
|
||||
[&req, &res](Vertex* node) {
|
||||
if (node == nullptr) {
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_AST_ACCESSOR_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_AST_ACCESSOR_HPP
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@ -20,5 +19,3 @@ struct Accessor : public VisitableExpr<Accessor>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_AST_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_AST_HPP
|
||||
#pragma once
|
||||
|
||||
#include "accessor.hpp"
|
||||
#include "values.hpp"
|
||||
@ -14,5 +13,3 @@
|
||||
#include "match.hpp"
|
||||
#include "queries.hpp"
|
||||
#include "start.hpp"
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_PRINT_TREE_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_PRINT_TREE_HPP
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -20,5 +19,3 @@ public:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_AST_NODE_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_AST_NODE_HPP
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
@ -29,5 +28,3 @@ struct AstNode : public Crtp<Derived>, public AstVisitable
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_AST_VISITOR_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_AST_VISITOR_HPP
|
||||
#pragma once
|
||||
|
||||
#include "utils/visitor/visitor.hpp"
|
||||
|
||||
@ -62,5 +61,3 @@ struct AstVisitor : public Visitor<Accessor, Boolean, Float, Identifier,
|
||||
Start, Where, WriteQuery, Create, Return> {};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_CREATE_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_CREATE_HPP
|
||||
#pragma once
|
||||
|
||||
#include "ast_node.hpp"
|
||||
#include "pattern.hpp"
|
||||
@ -17,5 +16,3 @@ struct Create : public AstNode<Create>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_EXPR_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_EXPR_HPP
|
||||
#pragma once
|
||||
|
||||
#include "ast_node.hpp"
|
||||
|
||||
@ -36,5 +35,3 @@ struct BinaryExpr : public VisitableExpr<Derived>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_AST_IDENTIFIER_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_AST_IDENTIFIER_HPP
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
@ -15,5 +14,3 @@ struct Identifier : public AstNode<Identifier>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_LIST_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_LIST_HPP
|
||||
#pragma once
|
||||
|
||||
#include "ast_node.hpp"
|
||||
|
||||
@ -17,5 +16,3 @@ struct List : public AstNode<Derived>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_MATCH_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_MATCH_HPP
|
||||
#pragma once
|
||||
|
||||
#include "ast_node.hpp"
|
||||
#include "pattern.hpp"
|
||||
@ -18,5 +17,3 @@ struct Match : public AstNode<Match>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_NODE_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_NODE_HPP
|
||||
#pragma once
|
||||
|
||||
#include "list.hpp"
|
||||
#include "identifier.hpp"
|
||||
@ -23,5 +22,3 @@ struct Node : public AstNode<Node>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_OPERATORS_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_OPERATORS_HPP
|
||||
#pragma once
|
||||
|
||||
#include "expr.hpp"
|
||||
|
||||
@ -72,5 +71,3 @@ struct Rem : public BinaryExpr<And>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_PATTERN_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_PATTERN_HPP
|
||||
#pragma once
|
||||
|
||||
#include "ast_node.hpp"
|
||||
#include "relationship.hpp"
|
||||
@ -19,5 +18,3 @@ struct Pattern : public AstNode<Pattern>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_AST_PROPERTY_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_AST_PROPERTY_HPP
|
||||
#pragma once
|
||||
|
||||
#include "list.hpp"
|
||||
#include "identifier.hpp"
|
||||
@ -23,5 +22,3 @@ struct PropertyList : public List<Property, PropertyList>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_QUERIES_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_QUERIES_HPP
|
||||
#pragma once
|
||||
|
||||
#include "ast_node.hpp"
|
||||
#include "match.hpp"
|
||||
@ -28,5 +27,3 @@ struct WriteQuery : public AstNode<WriteQuery>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_RELATIONSHIP_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_RELATIONSHIP_HPP
|
||||
#pragma once
|
||||
|
||||
#include "list.hpp"
|
||||
#include "identifier.hpp"
|
||||
@ -34,5 +33,3 @@ struct Relationship : public AstNode<Relationship>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_RETURN_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_RETURN_HPP
|
||||
#pragma once
|
||||
|
||||
#include "list.hpp"
|
||||
#include "identifier.hpp"
|
||||
@ -21,5 +20,3 @@ struct Return : public AstNode<Return>
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_START_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_START_HPP
|
||||
#pragma once
|
||||
|
||||
#include "ast_node.hpp"
|
||||
#include "queries.hpp"
|
||||
@ -18,5 +17,3 @@ struct Start : public AstNode<Start>
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_TREE_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_TREE_HPP
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
@ -46,5 +45,3 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_VALUES_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_VALUES_HPP
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
@ -29,5 +28,3 @@ struct String : public LeafExpr<std::string, String>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_AST_WHERE_HPP
|
||||
#define MEMGRAPH_CYPHER_AST_WHERE_HPP
|
||||
#pragma once
|
||||
|
||||
#include "ast_node.hpp"
|
||||
#include "expr.hpp"
|
||||
@ -16,5 +15,3 @@ struct Where : public AstNode<Where>
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_CODEGEN_CPPGEN_HPP
|
||||
#define MEMGRAPH_CYPHER_CODEGEN_CPPGEN_HPP
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
#include <typeinfo>
|
||||
@ -52,5 +51,3 @@ public:
|
||||
create.accept(create_gen);
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_COMPILER_HPP
|
||||
#define MEMGRAPH_CYPHER_COMPILER_HPP
|
||||
#pragma once
|
||||
|
||||
#include "cypher_lexer.hpp"
|
||||
#include "parser.hpp"
|
||||
@ -25,5 +24,3 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_LEXER_CYPHER_LEXER_HPP
|
||||
#define MEMGRAPH_CYPHER_LEXER_CYPHER_LEXER_HPP
|
||||
#pragma once
|
||||
|
||||
#include "cypher.h"
|
||||
|
||||
@ -69,5 +68,3 @@ public:
|
||||
build();
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_TREE_PRINT_HPP
|
||||
#define MEMGRAPH_CYPHER_TREE_PRINT_HPP
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
#include <stack>
|
||||
@ -297,5 +296,3 @@ public:
|
||||
private:
|
||||
Printer printer;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_ERRORS_HPP
|
||||
#define MEMGRAPH_CYPHER_ERRORS_HPP
|
||||
#pragma once
|
||||
|
||||
#include <stdexcept>
|
||||
#include "token.hpp"
|
||||
@ -22,5 +21,3 @@ class ParserError : public std::runtime_error
|
||||
{
|
||||
using runtime_error::runtime_error;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_PARSER_HPP
|
||||
#define MEMGRAPH_CYPHER_PARSER_HPP
|
||||
#pragma once
|
||||
|
||||
#include "cypher.h"
|
||||
#include "token.hpp"
|
||||
@ -49,5 +48,3 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_TOKEN_HPP
|
||||
#define MEMGRAPH_CYPHER_TOKEN_HPP
|
||||
#pragma once
|
||||
|
||||
#include <ostream>
|
||||
|
||||
@ -17,5 +16,3 @@ struct Token
|
||||
<< ", value = '" << token.value << "'";
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_CYPHER_VISITOR_TRAVERSER_HPP
|
||||
#define MEMGRAPH_CYPHER_VISITOR_TRAVERSER_HPP
|
||||
#pragma once
|
||||
|
||||
#include "cypher/ast/ast_visitor.hpp"
|
||||
#include "cypher/ast/ast.hpp"
|
||||
@ -197,5 +196,3 @@ protected:
|
||||
node->accept(*this);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_STRUCTURES_BITSET_DYNAMIC_BITSET_HPP
|
||||
#define MEMGRAPH_DATA_STRUCTURES_BITSET_DYNAMIC_BITSET_HPP
|
||||
#pragma once
|
||||
|
||||
#include <cassert>
|
||||
#include <atomic>
|
||||
@ -152,5 +151,3 @@ private:
|
||||
|
||||
std::atomic<Chunk*> head;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_STRUCTURES_KDTREE_BUILD_HPP
|
||||
#define MEMGRAPH_DATA_STRUCTURES_KDTREE_BUILD_HPP
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
@ -66,5 +65,3 @@ KdNode<T, U>* build(It first, It last)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef GEOAPI_KDTREE_KDNODE_HPP
|
||||
#define GEOAPI_KDTREE_KDNODE_HPP
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
@ -43,6 +42,3 @@ KdNode<T, U>::~KdNode()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef GEOAPI_KDTREE_KDTREE_HPP
|
||||
#define GEOAPI_KDTREE_KDTREE_HPP
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
@ -39,5 +38,3 @@ KdTree<T, U>::KdTree(It first, It last)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef GEOAPI_KDTREE_MATH_HPP
|
||||
#define GEOAPI_KDTREE_MATH_HPP
|
||||
#pragma once
|
||||
|
||||
#include <limits>
|
||||
#include <cmath>
|
||||
@ -39,5 +38,3 @@ T axial_distance(const Point<T>& a, const Point<T>& b, byte axis)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef GEOAPI_KDTREE_NNS_HPP
|
||||
#define GEOAPI_KDTREE_NNS_HPP
|
||||
#pragma once
|
||||
|
||||
#include "math.hpp"
|
||||
#include "point.hpp"
|
||||
@ -100,5 +99,3 @@ const KdNode<T, U>* nns(const Point<T>& p, const KdNode<T, U>* root)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef GEOAPI_KDTREE_POINT_HPP
|
||||
#define GEOAPI_KDTREE_POINT_HPP
|
||||
#pragma once
|
||||
|
||||
#include <ostream>
|
||||
|
||||
@ -29,5 +28,3 @@ public:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_STRUCTURES_LIST_LOCKFREE_LIST_HPP
|
||||
#define MEMGRAPH_DATA_STRUCTURES_LIST_LOCKFREE_LIST_HPP
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <unistd.h>
|
||||
@ -242,5 +241,3 @@ bool operator!=(typename List<T, sleep_time>::read_iterator& a,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_STRUCTURES_LOCKFREE_HASHMAP_HPP
|
||||
#define MEMGRAPH_DATA_STRUCTURES_LOCKFREE_HASHMAP_HPP
|
||||
#pragma once
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
@ -33,5 +32,3 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_STRUCTURES_QUEUE_MPSC_QUEUE_HPP
|
||||
#define MEMGRAPH_DATA_STRUCTURES_QUEUE_MPSC_QUEUE_HPP
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
@ -148,5 +147,3 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_STRUCTURES_QUEUE_SLQUEUE_HPP
|
||||
#define MEMGRAPH_DATA_STRUCTURES_QUEUE_SLQUEUE_HPP
|
||||
#pragma once
|
||||
|
||||
#include <queue>
|
||||
|
||||
@ -62,5 +61,3 @@ public:
|
||||
private:
|
||||
std::queue<T> queue;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_STRUCTURES_SKIPLIST_LOCKFREE_SKIPLIST_HPP
|
||||
#define MEMGRAPH_DATA_STRUCTURES_SKIPLIST_LOCKFREE_SKIPLIST_HPP
|
||||
#pragma once
|
||||
|
||||
#include <cstdlib>
|
||||
#include <atomic>
|
||||
@ -57,5 +56,3 @@ public:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_STRUCTURES_SKIPLIST_NEW_HEIGHT_HPP
|
||||
#define MEMGRAPH_DATA_STRUCTURES_SKIPLIST_NEW_HEIGHT_HPP
|
||||
#pragma once
|
||||
|
||||
#include "utils/random/xorshift.hpp"
|
||||
|
||||
@ -21,5 +20,3 @@ size_t new_height(int max_height)
|
||||
|
||||
return height;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_STRUCTURES_SKIPLIST_SKIPLIST_HPP
|
||||
#define MEMGRAPH_DATA_STRUCTURES_SKIPLIST_SKIPLIST_HPP
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
@ -252,6 +251,3 @@ public:
|
||||
std::atomic<size_t> size_;
|
||||
std::atomic<Node*> header;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_STRUCTURES_SKIPLIST_SKIPNODE_HPP
|
||||
#define MEMGRAPH_DATA_STRUCTURES_SKIPLIST_SKIPNODE_HPP
|
||||
#pragma once
|
||||
|
||||
#include <cstdlib>
|
||||
#include <atomic>
|
||||
@ -134,5 +133,3 @@ private:
|
||||
// can access anything we want!
|
||||
std::atomic<Node*> forward_[0];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_STRUCTURES_SLLIST_HPP
|
||||
#define MEMGRAPH_DATA_STRUCTURES_SLLIST_HPP
|
||||
#pragma once
|
||||
|
||||
#include <list>
|
||||
|
||||
@ -36,5 +35,3 @@ private:
|
||||
// TODO add removed items to a list for garbage collection
|
||||
// std::list<Node*> removed;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_STRUCTURES_SLRBTREE_HPP
|
||||
#define MEMGRAPH_DATA_STRUCTURES_SLRBTREE_HPP
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
|
||||
@ -13,5 +12,3 @@ public:
|
||||
private:
|
||||
std::map<K, T> tree;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_STRUCTURES_SPINLOCK_STACK_HPP
|
||||
#define MEMGRAPH_DATA_STRUCTURES_SPINLOCK_STACK_HPP
|
||||
#pragma once
|
||||
|
||||
#include <stack>
|
||||
|
||||
@ -31,5 +30,3 @@ public:
|
||||
private:
|
||||
std::stack<T> stack;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_STRUCTURES_STACK_ARRAY_STACK_HPP
|
||||
#define MEMGRAPH_DATA_STRUCTURES_STACK_ARRAY_STACK_HPP
|
||||
#pragma once
|
||||
|
||||
template <class T>
|
||||
class ArrayStack
|
||||
@ -7,5 +6,3 @@ class ArrayStack
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_STRUCTURES_UNION_FIND_UNION_FIND_HPP
|
||||
#define MEMGRAPH_DATA_STRUCTURES_UNION_FIND_UNION_FIND_HPP
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
@ -83,5 +82,3 @@ private:
|
||||
// array of tree indices
|
||||
uintXX_t* parent;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATABASE_DB_HPP
|
||||
#define MEMGRAPH_DATABASE_DB_HPP
|
||||
#pragma once
|
||||
|
||||
#include "storage/graph.hpp"
|
||||
#include "transactions/engine.hpp"
|
||||
@ -13,5 +12,3 @@ public:
|
||||
Graph graph;
|
||||
tx::Engine tx_engine;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DL_DYNAMIC_LIB_HPP
|
||||
#define MEMGRAPH_DL_DYNAMIC_LIB_HPP
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
@ -61,5 +60,3 @@ private:
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DL_EXAMPLE_DB_HPP
|
||||
#define MEMGRAPH_DL_EXAMPLE_DB_HPP
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -21,5 +20,3 @@ public:
|
||||
|
||||
typedef db* (*produce_t)();
|
||||
typedef void (*destruct_t)(db*);
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DEBUG_LOG_HPP
|
||||
#define MEMGRAPH_DEBUG_LOG_HPP
|
||||
#pragma once
|
||||
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
@ -131,5 +130,3 @@ std::array<std::string, 4> Log::level_strings {{
|
||||
#else
|
||||
# define LOG_DEBUG(_MESSAGE_) LOG(Log::Level::Debug, _MESSAGE_)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_IO_UV_BLOCKBUFFER_HPP
|
||||
#define MEMGRAPH_IO_UV_BLOCKBUFFER_HPP
|
||||
#pragma once
|
||||
|
||||
#include <cstring>
|
||||
#include <uv.h>
|
||||
@ -124,5 +123,3 @@ template <size_t block_size>
|
||||
BlockAllocator<block_size> BlockBuffer<block_size>::allocator;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_SERVER_UV_CORE_HPP
|
||||
#define MEMGRAPH_SERVER_UV_CORE_HPP
|
||||
#pragma once
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
@ -9,5 +8,3 @@ namespace uv
|
||||
using callback_t = void (*)(uv_handle_t *);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_SERVER_UV_TCPSTREAM_HPP
|
||||
#define MEMGRAPH_SERVER_UV_TCPSTREAM_HPP
|
||||
#pragma once
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
@ -31,5 +30,3 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_SERVER_UV_TCPSTREAM_INL
|
||||
#define MEMGRAPH_SERVER_UV_TCPSTREAM_INL
|
||||
#pragma once
|
||||
|
||||
#include "tcpstream.hpp"
|
||||
|
||||
@ -44,5 +43,3 @@ TcpStream::operator uv_handle_t*()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_SERVER_UV_UV_ERROR_HPP
|
||||
#define MEMGRAPH_SERVER_UV_UV_ERROR_HPP
|
||||
#pragma once
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
@ -15,5 +14,3 @@ public:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_SERVER_UV_UVBUFFER_HPP
|
||||
#define MEMGRAPH_SERVER_UV_UVBUFFER_HPP
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <uv.h>
|
||||
@ -34,5 +33,3 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_SERVER_UV_UVBUFFER_INL
|
||||
#define MEMGRAPH_SERVER_UV_UVBUFFER_INL
|
||||
#pragma once
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
@ -91,5 +90,3 @@ UvBuffer::operator uv_buf_t*()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_SERVER_UV_UVLOOP_HPP
|
||||
#define MEMGRAPH_SERVER_UV_UVLOOP_HPP
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <uv.h>
|
||||
@ -58,5 +57,3 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_MEMORY_HP_HPP
|
||||
#define MEMGRAPH_MEMORY_HP_HPP
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <cassert>
|
||||
@ -147,5 +146,3 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_MEMORY_LITERALS_HPP
|
||||
#define MEMGRAPH_MEMORY_LITERALS_HPP
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
@ -25,5 +24,3 @@ constexpr unsigned long long operator"" _kB(unsigned long long kb)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_MEMORY_MEMORY_HPP
|
||||
#define MEMGRAPH_MEMORY_MEMORY_HPP
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
@ -54,5 +53,3 @@ private:
|
||||
|
||||
SpinLock lock;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_MVCC_HINTS_HPP
|
||||
#define MEMGRAPH_MVCC_HINTS_HPP
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <unistd.h>
|
||||
@ -110,5 +109,3 @@ public:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_MVCC_MVCC_ERROR_HPP
|
||||
#define MEMGRAPH_MVCC_MVCC_ERROR_HPP
|
||||
#pragma once
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
@ -13,5 +12,3 @@ public:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_STORAGE_MVCC_STORE_HPP
|
||||
#define MEMGRAPH_STORAGE_MVCC_STORE_HPP
|
||||
#pragma once
|
||||
|
||||
#include "transactions/transaction.hpp"
|
||||
#include "mvcc/atom.hpp"
|
||||
@ -97,5 +96,3 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_MVCC_VERSION_HPP
|
||||
#define MEMGRAPH_MVCC_VERSION_HPP
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
|
||||
@ -40,5 +39,3 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_SPEEDY_MIDDLEWARE_HPP
|
||||
#define MEMGRAPH_SPEEDY_MIDDLEWARE_HPP
|
||||
#pragma once
|
||||
|
||||
#include "request.hpp"
|
||||
#include "response.hpp"
|
||||
@ -31,5 +30,3 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_SPEEDY_R3_HPP
|
||||
#define MEMGRAPH_SPEEDY_R3_HPP
|
||||
#pragma once
|
||||
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
@ -144,5 +143,3 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_SPEEDY_RAPIDJSON_MIDDLEWARE_HPP
|
||||
#define MEMGRAPH_SPEEDY_RAPIDJSON_MIDDLEWARE_HPP
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -33,5 +32,3 @@ bool rapidjson_middleware(sp::Request& req, sp::Response& res)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_SPEEDY_REQUEST_HPP
|
||||
#define MEMGRAPH_SPEEDY_REQUEST_HPP
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include "rapidjson/document.h"
|
||||
@ -21,5 +20,3 @@ public:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_SPEEDY_RESPONSE_HPP
|
||||
#define MEMGRAPH_SPEEDY_RESPONSE_HPP
|
||||
#pragma once
|
||||
|
||||
#include "request.hpp"
|
||||
#include "http/response.hpp"
|
||||
@ -34,5 +33,3 @@ public:
|
||||
using request_cb_t = std::function<void(Request&, Response&)>;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -7,8 +7,7 @@
|
||||
* @author Dominik Tomicevic (domko)
|
||||
* @author Marko Budiselic (buda)
|
||||
*/
|
||||
#ifndef MEMGRAPH_SPEEDY_SPEEDY_HPP
|
||||
#define MEMGRAPH_SPEEDY_SPEEDY_HPP
|
||||
#pragma once
|
||||
|
||||
#include "io/uv/uv.hpp"
|
||||
#include "http/http.hpp"
|
||||
@ -121,5 +120,3 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -17,46 +17,13 @@ class Graph
|
||||
public:
|
||||
Graph() {}
|
||||
|
||||
mvcc::Atom<Edge>* connect(mvcc::Atom<Vertex>& atom_a, Vertex& a,
|
||||
mvcc::Atom<Vertex>& atom_b, Vertex& b,
|
||||
const tx::Transaction& t)
|
||||
{
|
||||
// try to lock A
|
||||
auto guard_a = atom_a.acquire_unique();
|
||||
// TODO: connect method
|
||||
// procedure:
|
||||
// 1. acquire unique over first node
|
||||
// 2. acquire unique over second node
|
||||
// 3. add edge
|
||||
|
||||
if(a.tx.max())
|
||||
throw mvcc::MvccError("can't serialize due to\
|
||||
concurrent operation(s)");
|
||||
|
||||
auto guard_b = atom_b.acquire_unique();
|
||||
|
||||
if(b.tx.max())
|
||||
throw mvcc::MvccError("can't serialize due to\
|
||||
concurrent operation(s)");
|
||||
|
||||
return edges.insert(t);
|
||||
}
|
||||
|
||||
// TODO: this should probably return mvcc::Atom<Vertex>*
|
||||
Vertex* find_vertex(const Id& id)
|
||||
{
|
||||
// get atom iterator
|
||||
auto atom_it = vertices.begin();
|
||||
|
||||
// find the right atom
|
||||
// TODO: better implementation
|
||||
while (true) {
|
||||
if (id == atom_it->id) {
|
||||
// TODO: return latest version
|
||||
return atom_it->first();
|
||||
}
|
||||
if (!atom_it.has_next())
|
||||
break;
|
||||
++atom_it;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
// TODO: find vertex by Id
|
||||
|
||||
VertexStore vertices;
|
||||
EdgeStore edges;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_MODEL_JSON_ALL_HPP
|
||||
#define MEMGRAPH_DATA_MODEL_JSON_ALL_HPP
|
||||
#pragma once
|
||||
|
||||
#include "array.hpp"
|
||||
#include "bool.hpp"
|
||||
@ -10,5 +9,3 @@
|
||||
#include "primitive.hpp"
|
||||
#include "real.hpp"
|
||||
#include "string.hpp"
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_MODEL_JSON_ARRAY_HPP
|
||||
#define MEMGRAPH_DATA_MODEL_JSON_ARRAY_HPP
|
||||
#pragma once
|
||||
|
||||
#include <cassert>
|
||||
#include <memory>
|
||||
@ -80,5 +79,3 @@ Array::operator std::string() const
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_MODEL_JSON_BOOL_HPP
|
||||
#define MEMGRAPH_DATA_MODEL_JSON_BOOL_HPP
|
||||
#pragma once
|
||||
|
||||
#include "primitive.hpp"
|
||||
|
||||
@ -29,5 +28,3 @@ Bool::operator std::string() const
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_MODEL_JSON_INTEGRAL_HPP
|
||||
#define MEMGRAPH_DATA_MODEL_JSON_INTEGRAL_HPP
|
||||
#pragma once
|
||||
|
||||
#include "primitive.hpp"
|
||||
|
||||
@ -29,5 +28,3 @@ Integral::operator std::string() const
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_MODEL_JSON_JSON_HPP
|
||||
#define MEMGRAPH_DATA_MODEL_JSON_JSON_HPP
|
||||
#pragma once
|
||||
|
||||
#include <initializer_list>
|
||||
#include <string>
|
||||
@ -43,5 +42,3 @@ const T& Json::as() const
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_MODEL_JSON_NULL_HPP
|
||||
#define MEMGRAPH_DATA_MODEL_JSON_NULL_HPP
|
||||
#pragma once
|
||||
|
||||
#include "json.hpp"
|
||||
|
||||
@ -26,5 +25,3 @@ Null::operator std::string() const
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_MODEL_JSON_OBJECT_HPP
|
||||
#define MEMGRAPH_DATA_MODEL_JSON_OBJECT_HPP
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -102,5 +101,3 @@ Object::operator std::string() const
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_MODEL_JSON_PRIMITIVE_HPP
|
||||
#define MEMGRAPH_DATA_MODEL_JSON_PRIMITIVE_HPP
|
||||
#pragma once
|
||||
|
||||
#include "json.hpp"
|
||||
|
||||
@ -25,5 +24,3 @@ protected:
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_MODEL_JSON_REAL_HPP
|
||||
#define MEMGRAPH_DATA_MODEL_JSON_REAL_HPP
|
||||
#pragma once
|
||||
|
||||
#include "primitive.hpp"
|
||||
|
||||
@ -29,5 +28,3 @@ Real::operator std::string() const
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_DATA_MODEL_JSON_STRING_HPP
|
||||
#define MEMGRAPH_DATA_MODEL_JSON_STRING_HPP
|
||||
#pragma once
|
||||
|
||||
#include "primitive.hpp"
|
||||
|
||||
@ -30,5 +29,3 @@ String::operator std::string() const
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_STORAGE_MODEL_PROPERTIES_PROPERTY_HPP
|
||||
#define MEMGRAPH_STORAGE_MODEL_PROPERTIES_PROPERTY_HPP
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@ -155,5 +154,3 @@ void Property::accept(Handler& h)
|
||||
default: return;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_STORAGE_RECORD_HPP
|
||||
#define MEMGRAPH_STORAGE_RECORD_HPP
|
||||
#pragma once
|
||||
|
||||
#include <ostream>
|
||||
#include <mutex>
|
||||
@ -23,5 +22,3 @@ public:
|
||||
// each record can have one or more distinct labels.
|
||||
// std::set<uint16_t> labels;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_THREADING_POOL_HPP
|
||||
#define MEMGRAPH_THREADING_POOL_HPP
|
||||
#pragma once
|
||||
|
||||
#include <mutex>
|
||||
#include <atomic>
|
||||
@ -77,5 +76,3 @@ private:
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_UTILS_SYNC_CASLOCK_HPP
|
||||
#define MEMGRAPH_UTILS_SYNC_CASLOCK_HPP
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <unistd.h>
|
||||
@ -33,5 +32,3 @@ public:
|
||||
private:
|
||||
std::atomic<bool> lock_flag;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_SYNC_LOCKABLE_HPP
|
||||
#define MEMGRAPH_SYNC_LOCKABLE_HPP
|
||||
#pragma once
|
||||
|
||||
#include <mutex>
|
||||
#include "spinlock.hpp"
|
||||
@ -22,5 +21,3 @@ public:
|
||||
|
||||
mutable lock_t lock;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_THREADING_SYNC_SPINLOCK_HPP
|
||||
#define MEMGRAPH_THREADING_SYNC_SPINLOCK_HPP
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <unistd.h>
|
||||
@ -23,5 +22,3 @@ private:
|
||||
// guaranteed by standard to be lock free!
|
||||
std::atomic_flag lock_flag = ATOMIC_FLAG_INIT;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_THREADING_SYNC_TIMED_SPINLOCK_HPP
|
||||
#define MEMGRAPH_THREADING_SYNC_TIMED_SPINLOCK_HPP
|
||||
#pragma onces
|
||||
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
@ -52,5 +51,3 @@ private:
|
||||
// guaranteed by standard to be lock free!
|
||||
std::atomic_flag lock_flag = ATOMIC_FLAG_INIT;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_THREADING_TASK_HPP
|
||||
#define MEMGRAPH_THREADING_TASK_HPP
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -79,5 +78,3 @@ private:
|
||||
uv::UvLoop::sptr loop;
|
||||
Pool::sptr pool;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_TRANSACTIONS_COMMIT_LOG_HPP
|
||||
#define MEMGRAPH_TRANSACTIONS_COMMIT_LOG_HPP
|
||||
#pragma once
|
||||
|
||||
#include "mvcc/id.hpp"
|
||||
#include "data_structures/bitset/dynamic_bitset.hpp"
|
||||
@ -89,5 +88,3 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_UTILS_AUTO_SCOPE_HPP
|
||||
#define MEMGRAPH_UTILS_AUTO_SCOPE_HPP
|
||||
#pragma once
|
||||
|
||||
#include <utility>
|
||||
|
||||
@ -56,5 +55,3 @@ private:
|
||||
TOKEN_PASTE(auto_, counter)(TOKEN_PASTE(auto_func_, counter));
|
||||
|
||||
#define Auto(Destructor) Auto_INTERNAL(Destructor, __COUNTER__)
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_UTILS_BASH_COLORS_HPP
|
||||
#define MEMGRAPH_UTILS_BASH_COLORS_HPP
|
||||
#pragma once
|
||||
|
||||
namespace bash_color
|
||||
{
|
||||
@ -9,5 +8,3 @@ namespace bash_color
|
||||
auto red = "\033[91m";
|
||||
auto end = "\033[0m";
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
#ifndef MEMGRAPH_UTILS_STRING_BUFFER_HPP
|
||||
#define MEMGRAPH_UTILS_STRING_BUFFER_HPP
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
@ -43,5 +42,3 @@ private:
|
||||
size_t size_, capacity, chunk_size;
|
||||
char* data;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user