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

Function GetFormatType

storage/connect/value.cpp:188–206  ·  view source on GitHub ↗

/ GetFormatType: returns the FORMAT character(s) according to type. */ /

Source from the content-addressed store, hash-verified

186/* GetFormatType: returns the FORMAT character(s) according to type. */
187/***********************************************************************/
188const char *GetFormatType(int type)
189{
190 const char *c = "X";
191
192 switch (type) {
193 case TYPE_STRING: c = "C"; break;
194 case TYPE_SHORT: c = "S"; break;
195 case TYPE_INT: c = "N"; break;
196 case TYPE_BIGINT: c = "L"; break;
197 case TYPE_DOUBLE: c = "F"; break;
198 case TYPE_DATE: c = "D"; break;
199 case TYPE_TINY: c = "T"; break;
200 case TYPE_DECIM: c = "F"; break;
201 case TYPE_BIN: c = "B"; break;
202 case TYPE_PCHAR: c = "P"; break;
203 } // endswitch type
204
205 return c;
206} // end of GetFormatType
207
208/***********************************************************************/
209/* GetFormatType: returns the FORMAT type according to character. */

Callers 7

AllocateBufferMethod · 0.85
SetConstFormatMethod · 0.85
AllocateResultMethod · 0.85
AllocateResultMethod · 0.85
GetResultMethod · 0.85
MYSQLCOLMethod · 0.85
DefineMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected