mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-22 15:37:59 +00:00
assertX iterate
This commit is contained in:
parent
dc10f926aa
commit
d39ab121f8
2 changed files with 20 additions and 10 deletions
|
|
@ -285,16 +285,22 @@ static function_lookup_t FUNCTION_LOOKUP_TABLE[] = {
|
|||
{FUNC_CLASS_TYPING, "ispresent", 1,0, "True if field is present in input, false otherwise."},
|
||||
{FUNC_CLASS_TYPING, "isstring", 1,0, "True if field is present with string (including empty-string) value"},
|
||||
|
||||
{FUNC_CLASS_TYPING, "assert_bool", 1,0, "Returns argument if present with boolean value, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_boolean", 1,0, "Returns argument if present with boolean value, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_empty", 1,0, "Returns argument if present in input with empty value, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_float", 1,0, "Returns argument if present with float value, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_int", 1,0, "Returns argument if present with int value, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_notempty", 1,0, "Returns argument if present in input with non-empty value, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_notnull", 1,0, "Returns argument if non-null (non-empty and non-absent), else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_numeric", 1,0, "Returns argument if present with int or float value, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_present", 1,0, "Returns argument if present in input, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_string", 1,0, "Returns argument if present with string (including empty-string) value, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_absent", 1,0, "Returns argument if it is absent in the input ata, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_bool", 1,0, "Returns argument if it is present with boolean value, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_boolean", 1,0, "Returns argument if it is present with boolean value, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_empty", 1,0, "Returns argument if it is present in input with empty value, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_emptymap", 1,0, "Returns argument if it is a map with empty value, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_float", 1,0, "Returns argument if it is present with float value, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_int", 1,0, "Returns argument if it is present with int value, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_map", 1,0, "Returns argument if it is a map, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_nonemptymap", 1,0, "Returns argument if it is a non-empty map, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_notempty", 1,0, "Returns argument if it is present in input with non-empty value, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_notmap", 1,0, "Returns argument if it is not a map, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_notnull", 1,0, "Returns argument if it is non-null (non-empty and non-absent), else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_null", 1,0, "Returns argument if it is null (empty or absent), else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_numeric", 1,0, "Returns argument if it is present with int or float value, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_present", 1,0, "Returns argument if it is present in input, else throws an error."},
|
||||
{FUNC_CLASS_TYPING, "assert_string", 1,0, "Returns argument if it is present with string (including empty-string) value, else throws an error."},
|
||||
|
||||
{FUNC_CLASS_CONVERSION, "boolean", 1,0, "Convert int/float/bool/string to boolean."},
|
||||
{FUNC_CLASS_CONVERSION, "float", 1,0, "Convert int/float/bool/string to float."},
|
||||
|
|
|
|||
|
|
@ -35,6 +35,10 @@ MAPVAR CHECKLIST:
|
|||
! UT cases detailed below
|
||||
|
||||
! assert_map/assert_scalar/etc.
|
||||
- impl
|
||||
- UTs
|
||||
- mlh
|
||||
- mld
|
||||
|
||||
* emittable/dumpable/etc md_rhs -> more specific fcn-call.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue