gnc-sql-column-table-entry.cpp (gnucash-5.0.tar.bz2) | : | gnc-sql-column-table-entry.cpp (gnucash-5.1.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 101 | skipping to change at line 101 | |||
} | } | |||
void | void | |||
GncSqlColumnTableEntry::add_objectref_guid_to_query (QofIdTypeConst obj_name, | GncSqlColumnTableEntry::add_objectref_guid_to_query (QofIdTypeConst obj_name, | |||
const void* pObject, | const void* pObject, | |||
PairVec& vec) const noexcep t | PairVec& vec) const noexcep t | |||
{ | { | |||
auto inst = get_row_value_from_object<QofInstance*>(obj_name, pObject); | auto inst = get_row_value_from_object<QofInstance*>(obj_name, pObject); | |||
if (inst == nullptr) return; | if (inst == nullptr) return; | |||
auto guid = qof_instance_get_guid (inst); | auto guid = qof_instance_get_guid (inst); | |||
if (guid != nullptr) | if (guid != nullptr) { | |||
vec.emplace_back (std::make_pair (std::string{m_col_name}, | gchar *guid_s = guid_to_string(guid); | |||
quote_string(guid_to_string(guid)))); | vec.emplace_back (std::make_pair (std::string{m_col_name}, quote_string( | |||
guid_s))); | ||||
g_free(guid_s); | ||||
} | ||||
} | } | |||
void | void | |||
GncSqlColumnTableEntry::add_objectref_guid_to_table (ColVec& vec) const noexcept | GncSqlColumnTableEntry::add_objectref_guid_to_table (ColVec& vec) const noexcept | |||
{ | { | |||
GncSqlColumnInfo info{*this, BCT_STRING, GUID_ENCODING_LENGTH, FALSE}; | GncSqlColumnInfo info{*this, BCT_STRING, GUID_ENCODING_LENGTH, FALSE}; | |||
vec.emplace_back(std::move(info)); | vec.emplace_back(std::move(info)); | |||
} | } | |||
/* ----------------------------------------------------------------- */ | /* ----------------------------------------------------------------- */ | |||
skipping to change at line 357 | skipping to change at line 359 | |||
template<> void | template<> void | |||
GncSqlColumnTableEntryImpl<CT_GUID>::add_to_query(QofIdTypeConst obj_name, | GncSqlColumnTableEntryImpl<CT_GUID>::add_to_query(QofIdTypeConst obj_name, | |||
const gpointer pObject, | const gpointer pObject, | |||
PairVec& vec) const noexcept | PairVec& vec) const noexcept | |||
{ | { | |||
auto s = get_row_value_from_object<GncGUID*>(obj_name, pObject); | auto s = get_row_value_from_object<GncGUID*>(obj_name, pObject); | |||
if (s != nullptr) | if (s != nullptr) | |||
{ | { | |||
gchar *guid_s = guid_to_string(s); | ||||
vec.emplace_back (std::make_pair (std::string{m_col_name}, | vec.emplace_back (std::make_pair (std::string{m_col_name}, quote_string( | |||
quote_string(guid_to_string(s)))); | guid_s))); | |||
g_free(guid_s); | ||||
return; | return; | |||
} | } | |||
} | } | |||
/* ----------------------------------------------------------------- */ | /* ----------------------------------------------------------------- */ | |||
typedef time64 (*Time64AccessFunc) (const gpointer); | typedef time64 (*Time64AccessFunc) (const gpointer); | |||
typedef void (*Time64SetterFunc) (const gpointer, time64); | typedef void (*Time64SetterFunc) (const gpointer, time64); | |||
constexpr int TIME_COL_SIZE = 4 + 3 + 3 + 3 + 3 + 3; | constexpr int TIME_COL_SIZE = 4 + 3 + 3 + 3 + 3 + 3; | |||
template<> void | template<> void | |||
GncSqlColumnTableEntryImpl<CT_TIME>::load (const GncSqlBackend* sql_be, | GncSqlColumnTableEntryImpl<CT_TIME>::load (const GncSqlBackend* sql_be, | |||
End of changes. 2 change blocks. | ||||
6 lines changed or deleted | 10 lines changed or added |