Simple case for arrays of a simple type. */
| 1906 | |
| 1907 | /* Simple case for arrays of a simple type. */ |
| 1908 | static void add_table_singleton(struct table_desc *td, |
| 1909 | const jsmntok_t *name, |
| 1910 | const jsmntok_t *tok) |
| 1911 | { |
| 1912 | struct column *col = tal(td->columns, struct column); |
| 1913 | const jsmntok_t *type; |
| 1914 | |
| 1915 | /* FIXME: We would need to return false here and delete table! */ |
| 1916 | assert(!ignore_column(td, tok)); |
| 1917 | type = json_get_member(schemas, tok, "type"); |
| 1918 | |
| 1919 | col->ftype = find_fieldtype(type); |
| 1920 | col->sub = NULL; |
| 1921 | /* We name column after the JSON parent field; but jsonname is NULL so we |
| 1922 | * know to expect an array not a member. */ |
| 1923 | col->dbname = db_column_name(col, td, name); |
| 1924 | col->jsonname = NULL; |
| 1925 | tal_arr_expand(&td->columns, col); |
| 1926 | } |
| 1927 | |
| 1928 | static bool add_deprecated(const char *buffer, const jsmntok_t *tok, |
| 1929 | struct column *col) |
no test coverage detected