| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -34,13 +34,13 @@ std::ostream& operator<<(std::ostream& os, const VT<T>& v)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					#ifdef __AQ__HAS__INT128__
 | 
					 | 
					 | 
					 | 
					#ifdef __AQ__HAS__INT128__
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					std::ostream& operator<<(std::ostream& os, __int128 & v);
 | 
					 | 
					 | 
					 | 
					std::ostream& operator<<(std::ostream& os, __int128& v);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					std::ostream& operator<<(std::ostream& os, __uint128_t & v);
 | 
					 | 
					 | 
					 | 
					std::ostream& operator<<(std::ostream& os, __uint128_t& v);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					#endif
 | 
					 | 
					 | 
					 | 
					#endif
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					std::ostream& operator<<(std::ostream& os, types::date_t & v);
 | 
					 | 
					 | 
					 | 
					std::ostream& operator<<(std::ostream& os, types::date_t& v);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					std::ostream& operator<<(std::ostream& os, types::time_t & v);
 | 
					 | 
					 | 
					 | 
					std::ostream& operator<<(std::ostream& os, types::time_t& v);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					std::ostream& operator<<(std::ostream& os, types::timestamp_t & v);
 | 
					 | 
					 | 
					 | 
					std::ostream& operator<<(std::ostream& os, types::timestamp_t& v);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					template<typename _Ty>
 | 
					 | 
					 | 
					 | 
					template<typename _Ty>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					class ColView;
 | 
					 | 
					 | 
					 | 
					class ColView;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					template<typename _Ty>
 | 
					 | 
					 | 
					 | 
					template<typename _Ty>
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -57,7 +57,7 @@ public:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						ColRef(const char* name) : name(name) {}
 | 
					 | 
					 | 
					 | 
						ColRef(const char* name) : name(name) {}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						ColRef(const uint32_t size, void* data, const char* name = "") : vector_type<_Ty>(size, data), name(name) {}
 | 
					 | 
					 | 
					 | 
						ColRef(const uint32_t size, void* data, const char* name = "") : vector_type<_Ty>(size, data), name(name) {}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						void init(const char* name = "") { ty = types::Types<_Ty>::getType();  this->size = this->capacity = 0; this->container = 0; this->name = name; }
 | 
					 | 
					 | 
					 | 
						void init(const char* name = "") { ty = types::Types<_Ty>::getType();  this->size = this->capacity = 0; this->container = 0; this->name = name; }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						void initfrom(uint32_t sz, void*container, const char* name = "") {
 | 
					 | 
					 | 
					 | 
						void initfrom(uint32_t sz, void* container, const char* name = "") {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							ty = types::Types<_Ty>::getType();
 | 
					 | 
					 | 
					 | 
							ty = types::Types<_Ty>::getType();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							this->size = sz;
 | 
					 | 
					 | 
					 | 
							this->size = sz;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							this->capacity = 0;
 | 
					 | 
					 | 
					 | 
							this->capacity = 0;
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -65,7 +65,7 @@ public:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							this->name = name;
 | 
					 | 
					 | 
					 | 
							this->name = name;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						template<template <typename ...> class VT, typename T>
 | 
					 | 
					 | 
					 | 
						template<template <typename ...> class VT, typename T>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						void initfrom(const VT<T>& v, const char* name = ""){
 | 
					 | 
					 | 
					 | 
						void initfrom(const VT<T>& v, const char* name = "") {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							ty = types::Types<_Ty>::getType();
 | 
					 | 
					 | 
					 | 
							ty = types::Types<_Ty>::getType();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							this->size = v.size;
 | 
					 | 
					 | 
					 | 
							this->size = v.size;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							this->capacity = 0;
 | 
					 | 
					 | 
					 | 
							this->capacity = 0;
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -86,7 +86,7 @@ public:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						using vector_type<_Ty>::subvec;
 | 
					 | 
					 | 
					 | 
						using vector_type<_Ty>::subvec;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						using vector_type<_Ty>::subvec_memcpy;
 | 
					 | 
					 | 
					 | 
						using vector_type<_Ty>::subvec_memcpy;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						using vector_type<_Ty>::subvec_deep;
 | 
					 | 
					 | 
					 | 
						using vector_type<_Ty>::subvec_deep;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						ColRef<_Ty>& operator= (const _Ty& vt){
 | 
					 | 
					 | 
					 | 
						ColRef<_Ty>& operator= (const _Ty& vt) {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							vector_type<_Ty>::operator=(vt);
 | 
					 | 
					 | 
					 | 
							vector_type<_Ty>::operator=(vt);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							return *this;
 | 
					 | 
					 | 
					 | 
							return *this;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -98,7 +98,7 @@ public:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							vector_type<_Ty>::operator=(std::move(vt));
 | 
					 | 
					 | 
					 | 
							vector_type<_Ty>::operator=(std::move(vt));
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							return *this;
 | 
					 | 
					 | 
					 | 
							return *this;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						ColView<_Ty> operator [](const vector_type<uint32_t>&idxs) const {
 | 
					 | 
					 | 
					 | 
						ColView<_Ty> operator [](const vector_type<uint32_t>& idxs) const {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							return ColView<_Ty>(*this, idxs);
 | 
					 | 
					 | 
					 | 
							return ColView<_Ty>(*this, idxs);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -117,7 +117,7 @@ public:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									std::cout << this->operator[](i) << sep;
 | 
					 | 
					 | 
					 | 
									std::cout << this->operator[](i) << sep;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								std::cout << this->operator[](i);
 | 
					 | 
					 | 
					 | 
								std::cout << this->operator[](i);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							}
 | 
					 | 
					 | 
					 | 
							}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							std::cout<< more;
 | 
					 | 
					 | 
					 | 
							std::cout << more;
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							std::cout << ')';
 | 
					 | 
					 | 
					 | 
							std::cout << ')';
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						template<typename T>
 | 
					 | 
					 | 
					 | 
						template<typename T>
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -133,7 +133,7 @@ public:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						
 | 
					 | 
					 | 
					 | 
						
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					};
 | 
					 | 
					 | 
					 | 
					};
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					template<>
 | 
					 | 
					 | 
					 | 
					template<>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					class ColRef<void> : public ColRef<int>{};
 | 
					 | 
					 | 
					 | 
					class ColRef<void> : public ColRef<int> {};
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					template<typename _Ty>
 | 
					 | 
					 | 
					 | 
					template<typename _Ty>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					class ColView {
 | 
					 | 
					 | 
					 | 
					class ColView {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -177,9 +177,9 @@ public:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						void out(uint32_t n = 4, const char* sep = " ") const {
 | 
					 | 
					 | 
					 | 
						void out(uint32_t n = 4, const char* sep = " ") const {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							n = n > size ? size : n;
 | 
					 | 
					 | 
					 | 
							n = n > size ? size : n;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							std::cout<<'(';
 | 
					 | 
					 | 
					 | 
							std::cout << '(';
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							for (uint32_t i = 0; i < n; ++i)
 | 
					 | 
					 | 
					 | 
							for (uint32_t i = 0; i < n; ++i)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								std::cout << this->operator[](i)<< sep;
 | 
					 | 
					 | 
					 | 
								std::cout << this->operator[](i) << sep;
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							std::cout << ')';
 | 
					 | 
					 | 
					 | 
							std::cout << ')';
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						operator ColRef<_Ty>() {
 | 
					 | 
					 | 
					 | 
						operator ColRef<_Ty>() {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -192,7 +192,7 @@ public:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							uint32_t len = end - start;
 | 
					 | 
					 | 
					 | 
							uint32_t len = end - start;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							return ColView<_Ty>(orig, idxs.subvec(start, end));
 | 
					 | 
					 | 
					 | 
							return ColView<_Ty>(orig, idxs.subvec(start, end));
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						ColRef<_Ty> subvec_deep(uint32_t start, uint32_t end) const{
 | 
					 | 
					 | 
					 | 
						ColRef<_Ty> subvec_deep(uint32_t start, uint32_t end) const {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							uint32_t len = end - start;
 | 
					 | 
					 | 
					 | 
							uint32_t len = end - start;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							ColRef<_Ty> subvec(len);
 | 
					 | 
					 | 
					 | 
							ColRef<_Ty> subvec(len);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							for (uint32_t i = 0; i < len; ++i)
 | 
					 | 
					 | 
					 | 
							for (uint32_t i = 0; i < len; ++i)
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -202,10 +202,10 @@ public:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						std::unordered_set<_Ty> distinct_common() {
 | 
					 | 
					 | 
					 | 
						std::unordered_set<_Ty> distinct_common() {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							return std::unordered_set<_Ty> {begin(), end()};
 | 
					 | 
					 | 
					 | 
							return std::unordered_set<_Ty> {begin(), end()};
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						uint32_t distinct_size(){
 | 
					 | 
					 | 
					 | 
						uint32_t distinct_size() {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							return distinct_common().size();
 | 
					 | 
					 | 
					 | 
							return distinct_common().size();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						ColRef<_Ty> distinct(){
 | 
					 | 
					 | 
					 | 
						ColRef<_Ty> distinct() {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							auto set = distinct_common();
 | 
					 | 
					 | 
					 | 
							auto set = distinct_common();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							ColRef<_Ty> ret(set.size());
 | 
					 | 
					 | 
					 | 
							ColRef<_Ty> ret(set.size());
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							uint32_t i = 0;
 | 
					 | 
					 | 
					 | 
							uint32_t i = 0;
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -236,7 +236,7 @@ constexpr inline auto& get(const TableInfo<_Types...>& table) noexcept {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if constexpr (order)
 | 
					 | 
					 | 
					 | 
						if constexpr (order)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							return *(ColRef<std::tuple_element_t<_Index, std::tuple<_Types...>>> *) & (table.colrefs[_Index]);
 | 
					 | 
					 | 
					 | 
							return *(ColRef<std::tuple_element_t<_Index, std::tuple<_Types...>>> *) & (table.colrefs[_Index]);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						else
 | 
					 | 
					 | 
					 | 
						else
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							return *(ColRef<std::tuple_element_t<-1-_Index, std::tuple<_Types...>>> *) & (table.colrefs[-1-_Index]);
 | 
					 | 
					 | 
					 | 
							return *(ColRef<std::tuple_element_t<-1 - _Index, std::tuple<_Types...>>> *) & (table.colrefs[-1 - _Index]);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					template <long long _Index, class... _Types>
 | 
					 | 
					 | 
					 | 
					template <long long _Index, class... _Types>
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -267,7 +267,7 @@ struct TableInfo {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							TableInfo<Types...>* this_table;
 | 
					 | 
					 | 
					 | 
							TableInfo<Types...>* this_table;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							TableInfo<Types2...>* table;
 | 
					 | 
					 | 
					 | 
							TableInfo<Types2...>* table;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							vector_type<uint32_t> rid;
 | 
					 | 
					 | 
					 | 
							vector_type<uint32_t> rid;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							constexpr lineage_t(TableInfo<Types...>*this_table, TableInfo<Types2...> *table) 
 | 
					 | 
					 | 
					 | 
							constexpr lineage_t(TableInfo<Types...>* this_table, TableInfo<Types2...>* table)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								: this_table(this_table), table(table), rid(0) {}
 | 
					 | 
					 | 
					 | 
								: this_table(this_table), table(table), rid(0) {}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							constexpr lineage_t() : this_table(0), table(0), rid(0) {}
 | 
					 | 
					 | 
					 | 
							constexpr lineage_t() : this_table(0), table(0), rid(0) {}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -293,7 +293,7 @@ struct TableInfo {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						template <size_t j = 0>
 | 
					 | 
					 | 
					 | 
						template <size_t j = 0>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						typename std::enable_if<j == sizeof...(Types) - 1, void>::type print_impl(const uint32_t& i, const char* __restrict sep = " ") const;
 | 
					 | 
					 | 
					 | 
						typename std::enable_if<j == sizeof...(Types) - 1, void>::type print_impl(const uint32_t& i, const char* __restrict sep = " ") const;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						template <size_t j = 0>
 | 
					 | 
					 | 
					 | 
						template <size_t j = 0>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						typename std::enable_if<j < sizeof...(Types) - 1, void>::type print_impl(const uint32_t& i, const char* __restrict sep = " ") const;
 | 
					 | 
					 | 
					 | 
						typename std::enable_if < j < sizeof...(Types) - 1, void>::type print_impl(const uint32_t& i, const char* __restrict sep = " ") const;
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						template <size_t ...Idxs>
 | 
					 | 
					 | 
					 | 
						template <size_t ...Idxs>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						struct GetTypes {
 | 
					 | 
					 | 
					 | 
						struct GetTypes {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							typedef typename std::tuple<typename std::tuple_element<Idxs, tuple_type>::type ...> type;
 | 
					 | 
					 | 
					 | 
							typedef typename std::tuple<typename std::tuple_element<Idxs, tuple_type>::type ...> type;
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -302,15 +302,15 @@ struct TableInfo {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						template <size_t ...Idxs>
 | 
					 | 
					 | 
					 | 
						template <size_t ...Idxs>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						using getRecordType = typename GetTypes<Idxs...>::type;
 | 
					 | 
					 | 
					 | 
						using getRecordType = typename GetTypes<Idxs...>::type;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						TableInfo(const char* name, uint32_t n_cols);
 | 
					 | 
					 | 
					 | 
						TableInfo(const char* name, uint32_t n_cols);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						TableInfo(const char* name = "", const char **col_names = nullptr);
 | 
					 | 
					 | 
					 | 
						TableInfo(const char* name = "", const char** col_names = nullptr);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						template <int prog = 0>
 | 
					 | 
					 | 
					 | 
						template <int prog = 0>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						inline void materialize(const vector_type<uint32_t>& idxs, TableInfo<Types...>* tbl = nullptr) { // inplace materialize
 | 
					 | 
					 | 
					 | 
						inline void materialize(const vector_type<uint32_t>& idxs, TableInfo<Types...>* tbl = nullptr) { // inplace materialize
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							if constexpr(prog == 0) tbl = (tbl == 0 ? this : tbl);
 | 
					 | 
					 | 
					 | 
							if constexpr (prog == 0) tbl = (tbl == 0 ? this : tbl);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							if constexpr (prog == sizeof...(Types)) return;
 | 
					 | 
					 | 
					 | 
							if constexpr (prog == sizeof...(Types)) return;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							else {
 | 
					 | 
					 | 
					 | 
							else {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								auto& col = get<prog>(*this);
 | 
					 | 
					 | 
					 | 
								auto& col = get<prog>(*this);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								auto new_col = decays<decltype(col)>{idxs.size};
 | 
					 | 
					 | 
					 | 
								auto new_col = decays<decltype(col)>{ idxs.size };
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								for(uint32_t i = 0; i < idxs.size; ++i)
 | 
					 | 
					 | 
					 | 
								for (uint32_t i = 0; i < idxs.size; ++i)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									new_col[i] = col[idxs[i]];
 | 
					 | 
					 | 
					 | 
									new_col[i] = col[idxs[i]];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								get<prog>(*tbl) = new_col;
 | 
					 | 
					 | 
					 | 
								get<prog>(*tbl) = new_col;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								materialize<prog + 1>(idxs, tbl);
 | 
					 | 
					 | 
					 | 
								materialize<prog + 1>(idxs, tbl);
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -337,7 +337,7 @@ struct TableInfo {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							return ord;
 | 
					 | 
					 | 
					 | 
							return ord;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						template <int ...cols>
 | 
					 | 
					 | 
					 | 
						template <int ...cols>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						auto order_by_view () {
 | 
					 | 
					 | 
					 | 
						auto order_by_view() {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							return TableView<Types...>(order_by<cols...>(), *this);
 | 
					 | 
					 | 
					 | 
							return TableView<Types...>(order_by<cols...>(), *this);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -346,7 +346,7 @@ struct TableInfo {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						inline void print2_impl(Fn func, const uint32_t& i, const __Types& ... args) const {
 | 
					 | 
					 | 
					 | 
						inline void print2_impl(Fn func, const uint32_t& i, const __Types& ... args) const {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							using this_type = typename std::tuple_element<col, tuple_type>::type;
 | 
					 | 
					 | 
					 | 
							using this_type = typename std::tuple_element<col, tuple_type>::type;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							const auto& this_value = get<col>(*this)[i];
 | 
					 | 
					 | 
					 | 
							const auto& this_value = get<col>(*this)[i];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							const auto& next = [&](auto &v) {
 | 
					 | 
					 | 
					 | 
							const auto& next = [&](auto& v) {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								if constexpr (sizeof...(rem_cols) == 0)
 | 
					 | 
					 | 
					 | 
								if constexpr (sizeof...(rem_cols) == 0)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									func(args..., print_hook(v));
 | 
					 | 
					 | 
					 | 
									func(args..., print_hook(v));
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								else
 | 
					 | 
					 | 
					 | 
								else
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -358,7 +358,7 @@ struct TableInfo {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							else
 | 
					 | 
					 | 
					 | 
							else
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								next(this_value);
 | 
					 | 
					 | 
					 | 
								next(this_value);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						std::string get_header_string(const char* __restrict sep, const char* __restrict end) const{
 | 
					 | 
					 | 
					 | 
						std::string get_header_string(const char* __restrict sep, const char* __restrict end) const {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							std::string header_string = std::string();
 | 
					 | 
					 | 
					 | 
							std::string header_string = std::string();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							for (uint32_t i = 0; i < sizeof...(Types); ++i)
 | 
					 | 
					 | 
					 | 
							for (uint32_t i = 0; i < sizeof...(Types); ++i)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								header_string += std::string(this->colrefs[i].name) + sep + '|' + sep;
 | 
					 | 
					 | 
					 | 
								header_string += std::string(this->colrefs[i].name) + sep + '|' + sep;
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -376,10 +376,10 @@ struct TableInfo {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								generate_printf_string<typename std::tuple_element<cols, tuple_type>::type ...>(sep, end);
 | 
					 | 
					 | 
					 | 
								generate_printf_string<typename std::tuple_element<cols, tuple_type>::type ...>(sep, end);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							std::string header_string = std::string();
 | 
					 | 
					 | 
					 | 
							std::string header_string = std::string();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							constexpr static int a_cols[] = { cols... };
 | 
					 | 
					 | 
					 | 
							constexpr static int a_cols[] = { cols... };
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							for(int i = 0; i < sizeof...(cols); ++i)
 | 
					 | 
					 | 
					 | 
							for (int i = 0; i < sizeof...(cols); ++i)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								header_string += std::string(this->colrefs[a_cols[i]].name) + sep;
 | 
					 | 
					 | 
					 | 
								header_string += std::string(this->colrefs[a_cols[i]].name) + sep;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							const size_t l_sep = strlen(sep);
 | 
					 | 
					 | 
					 | 
							const size_t l_sep = strlen(sep);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							if(header_string.size() - l_sep >= 0)
 | 
					 | 
					 | 
					 | 
							if (header_string.size() - l_sep >= 0)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								header_string.resize(header_string.size() - l_sep);
 | 
					 | 
					 | 
					 | 
								header_string.resize(header_string.size() - l_sep);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							const auto& prt_loop = [&fp, &view, &printf_string, *this](const auto& f) {
 | 
					 | 
					 | 
					 | 
							const auto& prt_loop = [&fp, &view, &printf_string, *this](const auto& f) {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -398,13 +398,13 @@ struct TableInfo {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									+ 1 // padding for msvc not allowing empty arrays
 | 
					 | 
					 | 
					 | 
									+ 1 // padding for msvc not allowing empty arrays
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								];
 | 
					 | 
					 | 
					 | 
								];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								setgbuf(cbuf);
 | 
					 | 
					 | 
					 | 
								setgbuf(cbuf);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								if(view)
 | 
					 | 
					 | 
					 | 
								if (view)
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									for (uint32_t i = 0; i < view->size; ++i){
 | 
					 | 
					 | 
					 | 
									for (uint32_t i = 0; i < view->size; ++i) {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										print2_impl<cols...>(f, (*view)[i], printf_string.c_str());
 | 
					 | 
					 | 
					 | 
										print2_impl<cols...>(f, (*view)[i], printf_string.c_str());
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										setgbuf();
 | 
					 | 
					 | 
					 | 
										setgbuf();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									}
 | 
					 | 
					 | 
					 | 
									}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								else
 | 
					 | 
					 | 
					 | 
								else
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									for (uint32_t i = 0; i < colrefs[0].size; ++i){
 | 
					 | 
					 | 
					 | 
									for (uint32_t i = 0; i < colrefs[0].size; ++i) {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										print2_impl<cols...>(f, i, printf_string.c_str());
 | 
					 | 
					 | 
					 | 
										print2_impl<cols...>(f, i, printf_string.c_str());
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										setgbuf();
 | 
					 | 
					 | 
					 | 
										setgbuf();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									}
 | 
					 | 
					 | 
					 | 
									}
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -421,9 +421,12 @@ struct TableInfo {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							}
 | 
					 | 
					 | 
					 | 
							}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						template <int ...vals> struct applier {
 | 
					 | 
					 | 
					 | 
						template <int ...vals> struct applier {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						inline constexpr static void apply(const TableInfo<Types...>& t, const char* __restrict sep = ",", const char* __restrict end = "\n",
 | 
					 | 
					 | 
					 | 
							inline constexpr static void apply(const TableInfo<Types...>& t, const char* __restrict sep = ",", const char* __restrict end = "\n",
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							const vector_type<uint32_t>* __restrict view = nullptr, FILE* __restrict fp = nullptr)
 | 
					 | 
					 | 
					 | 
								const vector_type<uint32_t>* __restrict view = nullptr, FILE* __restrict fp = nullptr)
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						{ t.template print2<vals ...>(sep, end, view, fp); }};
 | 
					 | 
					 | 
					 | 
							{
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
								t.template print2<vals ...>(sep, end, view, fp);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						};
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						inline void printall(const char* __restrict sep = ",", const char* __restrict end = "\n",
 | 
					 | 
					 | 
					 | 
						inline void printall(const char* __restrict sep = ",", const char* __restrict end = "\n",
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							const vector_type<uint32_t>* __restrict view = nullptr, FILE* __restrict fp = nullptr) {
 | 
					 | 
					 | 
					 | 
							const vector_type<uint32_t>* __restrict view = nullptr, FILE* __restrict fp = nullptr) {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -436,8 +439,8 @@ struct TableInfo {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						template <size_t ...Is>
 | 
					 | 
					 | 
					 | 
						template <size_t ...Is>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						void inline
 | 
					 | 
					 | 
					 | 
						void inline
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						reserve(std::index_sequence<Is...>, uint32_t size) {
 | 
					 | 
					 | 
					 | 
							reserve(std::index_sequence<Is...>, uint32_t size) {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							const auto& assign_sz = [&size](auto& col){ 
 | 
					 | 
					 | 
					 | 
							const auto& assign_sz = [&size](auto& col) {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								col.size = size;
 | 
					 | 
					 | 
					 | 
								col.size = size;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								col.grow();
 | 
					 | 
					 | 
					 | 
								col.grow();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							};
 | 
					 | 
					 | 
					 | 
							};
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -445,16 +448,16 @@ struct TableInfo {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						template <size_t ...Is>
 | 
					 | 
					 | 
					 | 
						template <size_t ...Is>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						decltype(auto) inline
 | 
					 | 
					 | 
					 | 
						decltype(auto) inline
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						get_record(std::index_sequence<Is...>, uint32_t i) {
 | 
					 | 
					 | 
					 | 
							get_record(std::index_sequence<Is...>, uint32_t i) {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							return std::forward_as_tuple(get_col<Is>()[i] ...);
 | 
					 | 
					 | 
					 | 
							return std::forward_as_tuple(get_col<Is>()[i] ...);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						template <size_t ...Is>
 | 
					 | 
					 | 
					 | 
						template <size_t ...Is>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						void inline
 | 
					 | 
					 | 
					 | 
						void inline
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set_record(std::index_sequence<Is...>, const tuple_type& t, uint32_t i) {
 | 
					 | 
					 | 
					 | 
							set_record(std::index_sequence<Is...>, const tuple_type& t, uint32_t i) {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							const auto& assign_field =
 | 
					 | 
					 | 
					 | 
							const auto& assign_field =
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								[](auto& l, const auto& r){
 | 
					 | 
					 | 
					 | 
								[](auto& l, const auto& r) {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									l = r;
 | 
					 | 
					 | 
					 | 
								l = r;
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								};
 | 
					 | 
					 | 
					 | 
							};
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							(assign_field(get_col<Is>()[i], std::get<Is>(t)), ...);
 | 
					 | 
					 | 
					 | 
							(assign_field(get_col<Is>()[i], std::get<Is>(t)), ...);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						TableInfo<Types ...>* distinct() {
 | 
					 | 
					 | 
					 | 
						TableInfo<Types ...>* distinct() {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -490,7 +493,7 @@ struct TableView {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						template <size_t ...Is>
 | 
					 | 
					 | 
					 | 
						template <size_t ...Is>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						decltype(auto) inline
 | 
					 | 
					 | 
					 | 
						decltype(auto) inline
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						get_record(std::index_sequence<Is...>, uint32_t i) {
 | 
					 | 
					 | 
					 | 
							get_record(std::index_sequence<Is...>, uint32_t i) {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							return std::forward_as_tuple(info.template get_col<Is>()[idxs[i]] ...);
 | 
					 | 
					 | 
					 | 
							return std::forward_as_tuple(info.template get_col<Is>()[idxs[i]] ...);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -500,7 +503,7 @@ struct TableView {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							const char* info_names[sizeof...(Types)];
 | 
					 | 
					 | 
					 | 
							const char* info_names[sizeof...(Types)];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							if (name == nullptr) {
 | 
					 | 
					 | 
					 | 
							if (name == nullptr) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								for(uint32_t i = 0; i < sizeof...(Types); ++i) 
 | 
					 | 
					 | 
					 | 
								for (uint32_t i = 0; i < sizeof...(Types); ++i)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									info_names[i] = info.colrefs[i].name;
 | 
					 | 
					 | 
					 | 
									info_names[i] = info.colrefs[i].name;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								names = info_names;
 | 
					 | 
					 | 
					 | 
								names = info_names;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							}
 | 
					 | 
					 | 
					 | 
							}
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -560,7 +563,7 @@ template<class ...Types>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					TableInfo<Types...>::TableInfo(const char* name, const char** col_names) : name(name), n_cols(sizeof...(Types)) {
 | 
					 | 
					 | 
					 | 
					TableInfo<Types...>::TableInfo(const char* name, const char** col_names) : name(name), n_cols(sizeof...(Types)) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						this->colrefs = (ColRef<void>*)malloc(sizeof(ColRef<void>) * this->n_cols);
 | 
					 | 
					 | 
					 | 
						this->colrefs = (ColRef<void>*)malloc(sizeof(ColRef<void>) * this->n_cols);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						for (uint32_t i = 0; i < n_cols; ++i) {
 | 
					 | 
					 | 
					 | 
						for (uint32_t i = 0; i < n_cols; ++i) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							this->colrefs[i].init(col_names? col_names[i] : "");
 | 
					 | 
					 | 
					 | 
							this->colrefs[i].init(col_names ? col_names[i] : "");
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					template <class ...Types>
 | 
					 | 
					 | 
					 | 
					template <class ...Types>
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -595,17 +598,17 @@ inline void TableView<Types...>::print(const char* __restrict sep, const char* _
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					template <class ...Types>
 | 
					 | 
					 | 
					 | 
					template <class ...Types>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					template <size_t j>
 | 
					 | 
					 | 
					 | 
					template <size_t j>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					inline typename std::enable_if<j == sizeof...(Types) - 1, void>::type
 | 
					 | 
					 | 
					 | 
					inline typename std::enable_if<j == sizeof...(Types) - 1, void>::type
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						TableInfo<Types ...>::print_impl(const uint32_t& i, const char* __restrict sep) const {
 | 
					 | 
					 | 
					 | 
					TableInfo<Types ...>::print_impl(const uint32_t& i, const char* __restrict sep) const {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						std::cout << (get<j>(*this))[i];
 | 
					 | 
					 | 
					 | 
						std::cout << (get<j>(*this))[i];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					template<class ...Types>
 | 
					 | 
					 | 
					 | 
					template<class ...Types>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					template<size_t j>
 | 
					 | 
					 | 
					 | 
					template<size_t j>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					inline typename std::enable_if<j < sizeof...(Types) - 1, void>::type 
 | 
					 | 
					 | 
					 | 
					inline typename std::enable_if < j < sizeof...(Types) - 1, void>::type
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						TableInfo<Types...>::print_impl(const uint32_t& i, const char* __restrict sep) const
 | 
					 | 
					 | 
					 | 
						TableInfo<Types...>::print_impl(const uint32_t& i, const char* __restrict sep) const
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					{
 | 
					 | 
					 | 
					 | 
					{
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						std::cout << (get<j>(*this))[i] << sep;
 | 
					 | 
					 | 
					 | 
						std::cout << (get<j>(*this))[i] << sep;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						print_impl<j+1>(i, sep);
 | 
					 | 
					 | 
					 | 
						print_impl<j + 1>(i, sep);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					template<class ...Types>
 | 
					 | 
					 | 
					 | 
					template<class ...Types>
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -799,7 +802,7 @@ void print(const TableView<Types...>& v, const char* delimiter = " ", const char
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					template <class T>
 | 
					 | 
					 | 
					 | 
					template <class T>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					void print(const T& v, const char* delimiter = " ") {
 | 
					 | 
					 | 
					 | 
					void print(const T& v, const char* delimiter = " ") {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						std::cout<< v<< delimiter;
 | 
					 | 
					 | 
					 | 
						std::cout << v << delimiter;
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						// printf(types::printf_str[types::Types<T>::getType()], v);
 | 
					 | 
					 | 
					 | 
						// printf(types::printf_str[types::Types<T>::getType()], v);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -807,10 +810,10 @@ void print(const T& v, const char* delimiter = " ") {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					template <>
 | 
					 | 
					 | 
					 | 
					template <>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					void print<__int128_t>(const __int128_t& v, const char* delimiter);
 | 
					 | 
					 | 
					 | 
					void print<__int128_t>(const __int128_t& v, const char* delimiter);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					template <>
 | 
					 | 
					 | 
					 | 
					template <>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					void print<__uint128_t>(const __uint128_t&v, const char* delimiter);
 | 
					 | 
					 | 
					 | 
					void print<__uint128_t>(const __uint128_t& v, const char* delimiter);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					#endif
 | 
					 | 
					 | 
					 | 
					#endif
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					template <>
 | 
					 | 
					 | 
					 | 
					template <>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					void print<bool>(const bool&v, const char* delimiter);
 | 
					 | 
					 | 
					 | 
					void print<bool>(const bool& v, const char* delimiter);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					template <class T>
 | 
					 | 
					 | 
					 | 
					template <class T>
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					void inline print_impl(const T& v, const char* delimiter, const char* endline) {
 | 
					 | 
					 | 
					 | 
					void inline print_impl(const T& v, const char* delimiter, const char* endline) {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |