Merge branch 'master' of https://git.billsun.dev/bill/AQuery
This commit is contained in:
@@ -27,7 +27,7 @@
|
|||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="dummy.cpp" />
|
<ClCompile Include="..\server\tests\testmain.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<VCProjectVersion>16.0</VCProjectVersion>
|
<VCProjectVersion>16.0</VCProjectVersion>
|
||||||
|
|||||||
+4
-2
@@ -8,14 +8,16 @@
|
|||||||
// #include "robin_hood.h"
|
// #include "robin_hood.h"
|
||||||
#include "unordered_dense.h"
|
#include "unordered_dense.h"
|
||||||
// only works for 64 bit systems
|
// only works for 64 bit systems
|
||||||
|
namespace hasher_consts{
|
||||||
constexpr size_t _FNV_offset_basis = 14695981039346656037ULL;
|
constexpr size_t _FNV_offset_basis = 14695981039346656037ULL;
|
||||||
constexpr size_t _FNV_prime = 1099511628211ULL;
|
constexpr size_t _FNV_prime = 1099511628211ULL;
|
||||||
|
}
|
||||||
|
|
||||||
inline size_t append_bytes(const unsigned char* _First) noexcept {
|
inline size_t append_bytes(const unsigned char* _First) noexcept {
|
||||||
size_t _Val = _FNV_offset_basis;
|
size_t _Val = hasher_consts::_FNV_offset_basis;
|
||||||
for (; *_First; ++_First) {
|
for (; *_First; ++_First) {
|
||||||
_Val ^= static_cast<size_t>(*_First);
|
_Val ^= static_cast<size_t>(*_First);
|
||||||
_Val *= _FNV_prime;
|
_Val *= hasher_consts::_FNV_prime;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _Val;
|
return _Val;
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ inline char* to_text(char text[], unsigned long long i) { return to_text_from_in
|
|||||||
|
|
||||||
// Copyright (c) 2022 Bill Sun
|
// Copyright (c) 2022 Bill Sun
|
||||||
|
|
||||||
//#if defined(SIZEOF___INT128) || (defined(SIZEOF___INT128_T) && defined(SIZEOF___UINT128_T))
|
#if defined(__SIZEOF_INT128__)
|
||||||
constexpr static __uint128_t _10_19 = 10000000000000000000ull,
|
constexpr static __uint128_t _10_19 = 10000000000000000000ull,
|
||||||
_10_37 = _10_19*_10_19 / 10;
|
_10_37 = _10_19*_10_19 / 10;
|
||||||
|
|
||||||
@@ -118,4 +118,4 @@ char* jeaiii_i128(char* buf, T v){
|
|||||||
buf = to_text(buf, uint64_t(v % _10_19));
|
buf = to_text(buf, uint64_t(v % _10_19));
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
// #endif
|
#endif // INT128
|
||||||
|
|||||||
@@ -161,4 +161,5 @@ template<> char* aq_to_chars<char*>(void* , char*);
|
|||||||
template<> char* aq_to_chars<types::date_t>(void* , char*);
|
template<> char* aq_to_chars<types::date_t>(void* , char*);
|
||||||
template<> char* aq_to_chars<types::time_t>(void* , char*);
|
template<> char* aq_to_chars<types::time_t>(void* , char*);
|
||||||
template<> char* aq_to_chars<types::timestamp_t>(void* , char*);
|
template<> char* aq_to_chars<types::timestamp_t>(void* , char*);
|
||||||
|
typedef int (*code_snippet)(void*);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#include "monetdb_conn.h"
|
#include "monetdb_conn.h"
|
||||||
#include "monetdbe.h"
|
#include "monetdbe.h"
|
||||||
#include "table.h"
|
#include "table.h"
|
||||||
|
#undef ERROR
|
||||||
#undef static_assert
|
#undef static_assert
|
||||||
|
|
||||||
constexpr const char* monetdbe_type_str[] = {
|
constexpr const char* monetdbe_type_str[] = {
|
||||||
|
|||||||
+4
-2
@@ -118,7 +118,6 @@ A_Semaphore prompt{ true }, engine{ false };
|
|||||||
#define ENGINE_RELEASE()
|
#define ENGINE_RELEASE()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef int (*code_snippet)(void*);
|
|
||||||
typedef void (*module_init_fn)(Context*);
|
typedef void (*module_init_fn)(Context*);
|
||||||
|
|
||||||
int n_recv = 0;
|
int n_recv = 0;
|
||||||
@@ -193,6 +192,8 @@ constexpr prt_fn_t monetdbe_prtfns[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#include "monetdbe.h"
|
#include "monetdbe.h"
|
||||||
|
#undef max
|
||||||
|
#undef min
|
||||||
inline constexpr static unsigned char monetdbe_type_szs[] = {
|
inline constexpr static unsigned char monetdbe_type_szs[] = {
|
||||||
sizeof(monetdbe_column_bool::null_value), sizeof(monetdbe_column_int8_t::null_value),
|
sizeof(monetdbe_column_bool::null_value), sizeof(monetdbe_column_int8_t::null_value),
|
||||||
sizeof(monetdbe_column_int16_t::null_value), sizeof(monetdbe_column_int32_t::null_value),
|
sizeof(monetdbe_column_int16_t::null_value), sizeof(monetdbe_column_int32_t::null_value),
|
||||||
@@ -626,7 +627,7 @@ int launcher(int argc, char** argv){
|
|||||||
str = std::string("cd ") + pwd + std::string("&& python3 ./prompt.py ") + str;
|
str = std::string("cd ") + pwd + std::string("&& python3 ./prompt.py ") + str;
|
||||||
return system(str.c_str());
|
return system(str.c_str());
|
||||||
}
|
}
|
||||||
|
#if !( defined(_MSC_VER) && defined(_DEBUG) )
|
||||||
extern "C" int __DLLEXPORT__ main(int argc, char** argv) {
|
extern "C" int __DLLEXPORT__ main(int argc, char** argv) {
|
||||||
#ifdef __AQ_BUILD_LAUNCHER__
|
#ifdef __AQ_BUILD_LAUNCHER__
|
||||||
return launcher(argc, argv);
|
return launcher(argc, argv);
|
||||||
@@ -680,3 +681,4 @@ extern "C" int __DLLEXPORT__ main(int argc, char** argv) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // MSCDBG
|
||||||
+1
-1
@@ -24,7 +24,7 @@ namespace types {
|
|||||||
enum Type_t;
|
enum Type_t;
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct Types;
|
struct Types;
|
||||||
template <class T1, class T2>
|
template <class T1, class T2, class ...Ts>
|
||||||
struct Coercion;
|
struct Coercion;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+6
-3
@@ -1,7 +1,8 @@
|
|||||||
#ifndef _WINHELPER_H
|
#ifndef _WINHELPER_H
|
||||||
#define _WINHELPER_H
|
#define _WINHELPER_H
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
static constexpr int RTLD_LAZY = 1;
|
static constexpr int RTLD_LAZY = 1, RTLD_NOW = 1;
|
||||||
void* dlopen(const char*, int);
|
void* dlopen(const char*, int);
|
||||||
void* dlsym(void*, const char*);
|
void* dlsym(void*, const char*);
|
||||||
int dlclose(void*);
|
int dlclose(void*);
|
||||||
@@ -20,11 +21,13 @@ class A_Semaphore {
|
|||||||
private:
|
private:
|
||||||
void* native_handle;
|
void* native_handle;
|
||||||
public:
|
public:
|
||||||
A_Semaphore();
|
A_Semaphore(bool);
|
||||||
void acquire();
|
void acquire();
|
||||||
void release();
|
void release();
|
||||||
~A_Semaphore();
|
~A_Semaphore();
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif // WIN32
|
||||||
|
|
||||||
|
#endif // WINHELPER
|
||||||
|
|||||||
Reference in New Issue
Block a user