270 Error(method,
"Code: %d Msg: %s", code, (msg ? msg :
"No message"));
313 Int_t year, month, day, hour, min, sec;
315 if (!
GetDatime(npar, year, month, day, hour, min, sec))
319 SetError(-1,
"Date before year 1995 does not supported by TDatime type",
"GetDatime");
323 return TDatime(year, month, day, hour, min, sec);
331 Int_t year, month, day, hour, min, sec, frac;
332 if (
GetDate(npar, year, month, day))
return year;
333 if (
GetTimestamp(npar, year, month, day, hour, min, sec, frac))
return year;
342 Int_t year, month, day, hour, min, sec, frac;
343 if (
GetDate(npar, year, month, day))
return month;
344 if (
GetTimestamp(npar, year, month, day, hour, min, sec, frac))
return month;
353 Int_t year, month, day, hour, min, sec, frac;
354 if (
GetDate(npar, year, month, day))
return day;
355 if (
GetTimestamp(npar, year, month, day, hour, min, sec, frac))
return day;
364 Int_t year, month, day, hour, min, sec, frac;
365 if (
GetTime(npar, hour, min, sec))
return hour;
366 if (
GetTimestamp(npar, year, month, day, hour, min, sec, frac))
return hour;
375 Int_t year, month, day, hour, min, sec, frac;
376 if (
GetTime(npar, hour, min, sec))
return min;
377 if (
GetTimestamp(npar, year, month, day, hour, min, sec, frac))
return min;
386 Int_t year, month, day, hour, min, sec, frac;
387 if (
GetTime(npar, hour, min, sec))
return sec;
388 if (
GetTimestamp(npar, year, month, day, hour, min, sec, frac))
return sec;
397 Int_t year, month, day, hour, min, sec, frac;
398 if (
GetTimestamp(npar, year, month, day, hour, min, sec, frac))
return frac;
408 Int_t year, month, day, hour, min, sec, frac;
410 if (!
GetTimestamp(npar, year, month, day, hour, min, sec, frac))
414 SetError(-1,
"Date before year 1995 does not supported by TDatime type",
"GetTimestamp");
418 return TDatime(year, month, day, hour, min, sec);
434 Warning(
"SetTimestamp",
"Not implemented for TTimeStamp");
451 Warning(
"GetTimestamp",
"Not implemented for TTimeStamp");
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual Int_t GetErrorCode() const
Abstract base class defining SQL statements, which can be submitted in bulk to DB server.
virtual Bool_t GetDatime(Int_t, Int_t &, Int_t &, Int_t &, Int_t &, Int_t &, Int_t &)
void SetError(Int_t code, const char *msg, const char *method=nullptr)
set new values for error fields if method specified, displays error message
Int_t GetDay(Int_t)
return day value for parameter (if applicable)
virtual Bool_t SetTimestamp(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t=0)
Set parameter as timestamp.
virtual Bool_t SetDatime(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t)
virtual Bool_t GetDate(Int_t, Int_t &, Int_t &, Int_t &)
void ClearError()
reset error fields
Int_t GetMonth(Int_t)
return month value for parameter (if applicable)
Int_t GetSecondsFraction(Int_t)
return seconds fraction value for parameter (if applicable)
virtual Bool_t SetTime(Int_t, Int_t, Int_t, Int_t)
virtual Bool_t GetTime(Int_t, Int_t &, Int_t &, Int_t &)
Int_t GetSecond(Int_t)
return seconds value for parameter (if applicable)
Int_t GetMinute(Int_t)
return minutes value for parameter (if applicable)
virtual const char * GetErrorMsg() const
returns error message of last operation if no errors, return 0 Each specific implementation of TSQLSt...
Int_t GetYear(Int_t)
return year value for parameter (if applicable)
virtual Bool_t SetDate(Int_t, Int_t, Int_t, Int_t)
virtual Bool_t GetTimestamp(Int_t, Int_t &, Int_t &, Int_t &, Int_t &, Int_t &, Int_t &, Int_t &)
Get parameter as timestamp.
Int_t GetHour(Int_t)
return hours value for parameter (if applicable)
The TTimeStamp encapsulates seconds and ns since EPOCH.