mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/DBLayer: Support retrieving DATE/DATETIME/TIMESTAMP column values directly without casting in sql
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
#include "Field.h"
|
||||
#include "Errors.h"
|
||||
#include "FieldValueConverter.h"
|
||||
#include "Log.h"
|
||||
#include <cstring>
|
||||
|
||||
Field::Field() : _value(nullptr), _length(0), _meta(nullptr)
|
||||
@@ -107,6 +106,14 @@ double Field::GetDouble() const
|
||||
return _meta->Converter->GetDouble(_value, _length, _meta);
|
||||
}
|
||||
|
||||
SystemTimePoint Field::GetDate() const
|
||||
{
|
||||
if (!_value)
|
||||
return SystemTimePoint::min();
|
||||
|
||||
return _meta->Converter->GetDate(_value, _length, _meta);
|
||||
}
|
||||
|
||||
char const* Field::GetCString() const
|
||||
{
|
||||
if (!_value)
|
||||
|
||||
Reference in New Issue
Block a user