| 5351 | } |
| 5352 | |
| 5353 | static 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 | |
| 5378 | static const char *json_type = "type"; |
| 5379 | static const char *json_value = "value"; |
no test coverage detected