MCPcopy Create free account
hub / github.com/MariaDB/server / SetFormat

Method SetFormat

storage/connect/value.cpp:2386–2393  ·  view source on GitHub ↗

/ Set format so formatted dates can be converted on input/output. */ /

Source from the content-addressed store, hash-verified

2384/* Set format so formatted dates can be converted on input/output. */
2385/***********************************************************************/
2386bool DTVAL::SetFormat(PGLOBAL g, PCSZ fmt, int len, int year)
2387{
2388 Pdtp = MakeDateFormat(g, fmt, true, true, (year > 9999) ? 1 : 0);
2389 Sdate = (char*)PlugSubAlloc(g, NULL, len + 1);
2390 DefYear = (int)((year > 9999) ? (year - 10000) : year);
2391 Len = len;
2392 return false;
2393} // end of SetFormat
2394
2395/***********************************************************************/
2396/* Set format from the format of another date value. */

Callers 8

MakeWQLMethod · 0.45
ConvertMethod · 0.45
GetResultMethod · 0.45
ScanRecordMethod · 0.45
ConvertMethod · 0.45
SetJsonValueMethod · 0.45
OpenDBMethod · 0.45
SetJsonValueMethod · 0.45

Calls 3

MakeDateFormatFunction · 0.85
PlugSubAllocFunction · 0.85
GetTypeMethod · 0.45

Tested by

no test coverage detected