MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / cson_push_null

Function cson_push_null

lua/sp.c:5353–5376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5351}
5352
5353static int cson_push_null(Lua L, const char *type)
5354{
5355 int t;
5356 if (strcmp(type, "cstring") == 0)
5357 t = DBTYPES_CSTRING;
5358 else if (strcmp(type, "integer") == 0)
5359 t = DBTYPES_INTEGER;
5360 else if (strcmp(type, "double") == 0)
5361 t = DBTYPES_REAL;
5362 else if (strcmp(type, "blob") == 0)
5363 t = DBTYPES_BLOB;
5364 else if (strcmp(type, "datetime") == 0)
5365 t = DBTYPES_DATETIME;
5366 else if (strcmp(type, "decimal") == 0)
5367 t = DBTYPES_DECIMAL;
5368 else if (strcmp(type, "intervalds") == 0)
5369 t = DBTYPES_INTERVALDS;
5370 else if (strcmp(type, "intervalym") == 0)
5371 t = DBTYPES_INTERVALYM;
5372 else
5373 return 1;
5374 luabb_pushnull(L, t);
5375 return 0;
5376}
5377
5378static const char *json_type = "type";
5379static const char *json_value = "value";

Callers 1

Calls 1

luabb_pushnullFunction · 0.85

Tested by

no test coverage detected