comments refactor
This commit is contained in:
parent
8fd713d93d
commit
ee23b0204d
@ -328,6 +328,7 @@ auto load_queries(Db &db)
|
||||
Option<const VertexAccessor> n;
|
||||
Option<const EdgeAccessor> r;
|
||||
|
||||
// lazy load iterator
|
||||
auto it_type = type.index()
|
||||
.for_range(t)
|
||||
.clone_to(r) // Savepoint
|
||||
@ -346,12 +347,16 @@ auto load_queries(Db &db)
|
||||
if (it_type.count() > it_vertex.count()) {
|
||||
// Going through vertices wiil probably be faster
|
||||
it_vertex.to().for_all([&](auto m) {
|
||||
// m is changing
|
||||
// n is n
|
||||
// PRINT n, m
|
||||
});
|
||||
|
||||
} else {
|
||||
// Going through edges wiil probably be faster
|
||||
it_type.to().for_all([&](auto m) {
|
||||
// m is r
|
||||
// n is changing
|
||||
// PRINT n, m
|
||||
});
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "data_structures/concurrent/concurrent_set.hpp"
|
||||
|
||||
// TODO: T shoud be TG (TypeGroup)
|
||||
template <class T, class K>
|
||||
class UniqueOrderedIndex : public IndexBase<T, K>
|
||||
{
|
||||
|
@ -29,9 +29,6 @@ template <class TG, class K>
|
||||
class IndexBase : public DeleteSensitive
|
||||
{
|
||||
public:
|
||||
// typedef T value_type;
|
||||
// typedef K key_type;
|
||||
|
||||
// Created with the database
|
||||
IndexBase(IndexDefinition &&it);
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
// #pragma once
|
||||
//
|
||||
// TODO: DEPRICATED
|
||||
//
|
||||
// #include <memory>
|
||||
//
|
||||
// #include "data_structures/concurrent/concurrent_set.hpp"
|
||||
|
@ -16,6 +16,8 @@ struct IndexUpdateVertex
|
||||
Vertex *record;
|
||||
};
|
||||
|
||||
// based of IndexUpdate objects IndexRecords are created
|
||||
// at the end of transaction (inside commit called on DbAccessor)
|
||||
struct IndexUpdate
|
||||
{
|
||||
enum
|
||||
|
@ -20,7 +20,13 @@ public:
|
||||
|
||||
// Adds index defined in given definition. Returns true if successfull.
|
||||
bool add_index(IndexDefinition id);
|
||||
|
||||
// currently caller has to get index through object that contains
|
||||
// the index
|
||||
|
||||
// TODO: redesign
|
||||
//
|
||||
// this was a nice try
|
||||
// // Returns index from location.
|
||||
// template <class TG, class K>
|
||||
// Option<IndexHolder<TG, K>> get_index(IndexLocation loc)
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
// TODO: DEPRICATED
|
||||
|
||||
#include "utils/total_ordering.hpp"
|
||||
|
||||
#include "storage/model/properties/properties.hpp"
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
// TODO: DEPRICATED
|
||||
|
||||
#include "unique_key.hpp"
|
||||
|
||||
template <class K, class T, class SortOrder>
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
// TODO: DEPRICATED
|
||||
|
||||
#include "utils/total_ordering.hpp"
|
||||
|
||||
#include "storage/indexes/sort_order.hpp"
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
// TODO: DEPRICATED
|
||||
|
||||
template <class T>
|
||||
struct Ascending
|
||||
{
|
||||
|
@ -8,6 +8,9 @@
|
||||
#include "storage/model/properties/property_family.hpp"
|
||||
#include "storage/model/properties/stored_property.hpp"
|
||||
|
||||
// TG - type group (TypeGroupEntity)
|
||||
|
||||
// TODO: think about a better place
|
||||
template <class TG, class T>
|
||||
using type_key_t =
|
||||
typename PropertyFamily<TG>::PropertyType::template PropertyTypeKey<T>;
|
||||
|
@ -34,7 +34,6 @@ public:
|
||||
|
||||
public:
|
||||
// Ordered on POINTERS to PropertyFamily
|
||||
// TODO: This probably isn't necessary anymore.
|
||||
class PropertyFamilyKey
|
||||
: public TotalOrdering<PropertyFamilyKey>,
|
||||
public TotalOrdering<PropertyFamilyKey, PropertyFamily>,
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
|
||||
if (record->is_visible_write(db.trans)) {
|
||||
// TODO: VALIDATE THIS BRANCH. THEN ONLY THIS TRANSACTION CAN SEE
|
||||
// THIS DATA WHICH MEENS THAT IT CAN CHANGE IT.
|
||||
// THIS DATA WHICH MEANS THAT IT CAN CHANGE IT.
|
||||
return Derived(record, vlist, db);
|
||||
|
||||
} else {
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include "query_engine/exceptions/exceptions.hpp"
|
||||
#include "utils/memory/block_allocator.hpp"
|
||||
|
||||
// http://en.cppreference.com/w/cpp/language/new
|
||||
|
||||
// Useful for allocating memory which can be freed with one call.
|
||||
// Most performant for data which need to be present to the end.
|
||||
class StackAllocator
|
||||
|
@ -5,17 +5,13 @@
|
||||
#include <ext/aligned_buffer.h>
|
||||
#include <utility>
|
||||
|
||||
// Optional object storage
|
||||
|
||||
template <class T>
|
||||
class Option
|
||||
{
|
||||
public:
|
||||
Option() { std::memset(data._M_addr(), 0, sizeof(T)); }
|
||||
//
|
||||
// Option(T item)
|
||||
// {
|
||||
// new (data._M_addr()) T(std::forward(item));
|
||||
// initialized = true;
|
||||
// }
|
||||
|
||||
Option(T const &item)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user