Patch level : 12.0 no-patch

Files correlati     : tsdb
Commento            : aggiunto rtrim in get
This commit is contained in:
Simone Palacino 2019-02-11 15:01:27 +01:00
parent 658cd4098c
commit 82b0e636b2
2 changed files with 23 additions and 4 deletions

View File

@ -10,4 +10,23 @@ const TDate SSimple_query::sq_get_date(const char * field)
{
const TDate app(_rec.get_date(field));
return app;
}
}
TString SSimple_query::sq_get(const char* field, bool rtrim)
{
TString fld = _rec.get(field);
if (rtrim)
fld.rtrim();
return fld;
}
TString SSimple_query::sq_get(string field, bool rtrim)
{
return sq_get(field.c_str(), rtrim);
}
TString SSimple_query::sq_get(TString& field, bool rtrim)
{
return sq_get(static_cast<const char*>(field), rtrim);
}

View File

@ -166,11 +166,11 @@ public:
/**< Ritorna il valore nel campo (field) in formato (SADateTime), Campo non gestisce le ore */
//SADateTime sqGetDateTime(const char* field) { get_short(field); }
/**< Ritorna il valore nel campo (field) passato come (const char *) in formato (const char *) */
const char* sq_get(const char* field) { return _rec.get(field); }
TString sq_get(const char* field, bool rtrim = true);
/**< Ritorna il valore nel campo (field) passato come (string) in formato (const char *) */
const char* sq_get(string field) { return _rec.get(field.c_str()); }
TString sq_get(string field, bool rtrim = true);
/**< Ritorna il valore nel campo (field) passato come (TString) in formato (const char *) */
const char* sq_get(TString& field) { return _rec.get(static_cast<const char*>(field)); }
TString sq_get(TString& field, bool rtrim = true);
/**< Ritorna il valore nel campo (field) in formato (char) */
const char sq_get_char(const char* field) { return _rec.get_char(field); }
/**< Ritorna la posizione attuale */