50 lines
1,023 B
C++
50 lines
1,023 B
C++
#include "DefaultConfigs.h"
|
|
#include "LanguageConfig.h"
|
|
#include "TypeMappings.h"
|
|
#include "Pgsql_oids.h"
|
|
|
|
using namespace Pgsql;
|
|
|
|
TypeMappings GetDefaultCppTypeMappings()
|
|
{
|
|
TypeMappings result = {
|
|
{ bool_oid, "bool" },
|
|
{ char_oid, "char" },
|
|
{ name_oid, "std::string" },
|
|
{ int8_oid, "int64_t" },
|
|
{ int2_oid, "int16_t" },
|
|
{ int4_oid, "int32_t" },
|
|
{ text_oid, "std::string" },
|
|
{ oid_oid, "Oid" },
|
|
{ float4_oid, "float" },
|
|
{ float8_oid, "double" }
|
|
};
|
|
return result;
|
|
}
|
|
|
|
|
|
std::shared_ptr<LanguageConfig> buildDefaultCppLanguageConfig()
|
|
{
|
|
return std::make_shared<LanguageConfig>();
|
|
}
|
|
|
|
std::shared_ptr<const LanguageConfig> getDefaultCppLanguageConfig()
|
|
{
|
|
static auto config = buildDefaultCppLanguageConfig();
|
|
return config;
|
|
}
|
|
|
|
std::shared_ptr<const LanguageConfig> buildPgLabCppLanguageConfig()
|
|
{
|
|
auto cfg = buildDefaultCppLanguageConfig();
|
|
|
|
return cfg;
|
|
}
|
|
|
|
std::shared_ptr<const LanguageConfig> getPgLabCppLanguageConfig()
|
|
{
|
|
static auto config = buildPgLabCppLanguageConfig();
|
|
return config;
|
|
}
|
|
|
|
|