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

Method SetValue_char

storage/connect/value.cpp:721–740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

719/***********************************************************************/
720template <class TYPE>
721bool TYPVAL<TYPE>::SetValue_char(const char *p, int n)
722{
723 bool rc, minus;
724 ulonglong maxval = MaxVal();
725 ulonglong val = CharToNumber(p, n, maxval, Unsigned, &minus, &rc);
726
727 if (minus && val < maxval)
728 Tval = (TYPE)(-(signed)val);
729 else
730 Tval = (TYPE)val;
731
732 if (trace(2)) {
733 char buf[64];
734 htrc(strcat(strcat(strcpy(buf, " setting %s to: "), Fmt), "\n"),
735 GetTypeName(Type), Tval);
736 } // endif trace
737
738 Null = false;
739 return rc;
740} // end of SetValue
741
742template <>
743bool TYPVAL<double>::SetValue_char(const char *p, int n)

Callers 7

ReadColumnMethod · 0.80
CntIndexReadFunction · 0.80
CntIndexRangeFunction · 0.80
ReadColumnMethod · 0.80
GetCatInfoMethod · 0.80
MakeJsonMethod · 0.80
ReadColumnMethod · 0.80

Calls 5

CharToNumberFunction · 0.85
GetTypeNameFunction · 0.85
ExtractDateFunction · 0.85
htrcFunction · 0.70
ResetFunction · 0.70

Tested by

no test coverage detected