Innov-AI     Services     Supporters     Contact     About    
Type

Like all languages, you have a few data manipulation functions.

type is_booltype is_enumtype is_chartype is_datetype is_decimaltype is_emailtype is_hourtype is_timetype is_hour_without_sectype is_integertype is_numbertype is_bytetype is_small_inttype is_medium_inttype is_inttype is_big_inttype is_floattype is_doubletype is_timestamptype is_valid_datetype is_valid_datetype is_valid_timetype is_valid_timestamptype is_valid_timestamptype is_varchar

type is_bool <value> <bool1> <bool2>


Description

    This function will check if a value is equal to 'bool1' or 'bool2' and return a boolean as a result.

Parameters

    value:   The value - String - required
    bool1:   The first boolean - String - required
    bool2:   The second boolean - String - required
admin
type is_bool 1 1 0
mentdb
1

type is_enum <value> <values>


Description

    This function will check if a value corresponds to one of the value from the enum and return a boolean as a result.

Parameters

    value:   The value - String - required
    values:   The values - String - required
admin
type is_enum 1 1,2,3
mentdb
1

type is_char <value> <size>


Description

    This function will check if the size of the string or char sent by the user as parameter is correct.

Parameters

    value:   The value - String - required
    size:   The char size authorized - Number - required
admin
type is_char 1 1
mentdb
1

type is_date <date>


Description

    check if a value is a valid date (example: 1980-06-18) in english format, returning a boolean with 0 as false and 1 as true.

Parameters

    date:   The date - String - required
admin
type is_date "1980-06-18"
mentdb
1

type is_decimal <stringDecimal> <digitBeforeTheDecimalPoint> <digitAfterTheDecimalPoint>


Description

    check if a value is a decimal number and returns a boolean as a result.

Parameters

    stringDecimal:   The string in decimal format - String - required
    digitBeforeTheDecimalPoint:   The number of digit before the decimal point - Number - required
    digitAfterTheDecimalPoint:   The number of digit after the decimal point - Number - required
admin
type is_decimal 12.23 4 5
mentdb
1

type is_email <emailAddress>


Description

    This function will check if a value is an email address and will return a boolean

Parameters

    emailAddress:   The email - String - required
admin
type is_email "jim@innov-ai.com"
mentdb
1

type is_hour <stringHour>


Description

    check if a value is in hour format (example: 12:35:56)

Parameters

    stringHour:   The hour - String - required
admin
type is_hour "12:35:56"
mentdb
1

type is_time <stringHour>


Description

    check if a value is in hour format (example: 12:35:56)

Parameters

    stringHour:   The hour - String - required
admin
type is_time "12:35:56"
mentdb
1

type is_hour_without_sec <stringHour>


Description

    check if a value is in hour format (example: 12:35). If the value is not in hour format or if seconds are in the string sent by the user this function will return false.

Parameters

    stringHour:   The hour - String - required
admin
type is_hour_without_sec "12:35:56"
mentdb
0

type is_integer <value> <size>


Description

    This function will return true if the 'size' variable is equal to the number of characters given by the variable 'value'.(with size)

Parameters

    value:   The value - String - required
    size:   The char size authorized - Number - required
admin
type is_integer 1456 5
mentdb
1

type is_number <value>


Description

    This function will return true if 'value' is a number else it will return 0.

Parameters

    value:   The value - String - required
admin
type is_number 1456
mentdb
1

type is_byte <value>


Description

    This function will check if a value is a byte and will return a boolean.

Parameters

    value:   The value - String - required
admin
type is_byte 13
mentdb
1

type is_small_int <value>


Description

    This function will check if a value is a small integer and will return a boolean.

Parameters

    value:   The value - String - required
admin
type is_small_int 13000
mentdb
1

type is_medium_int <value>


Description

    This function will check if a value is a medium integer and will return a boolean.

Parameters

    value:   The value - String - required
admin
type is_medium_int 130000
mentdb
1

type is_int <value>


Description

    This function will check if a value is an integer and will return a boolean.

Parameters

    value:   The value - String - required
admin
type is_int 1300000
mentdb
1

type is_big_int <value>


Description

    This function will check if a value is a big integer and will return a boolean.

Parameters

    value:   The value - String - required
admin
type is_big_int 1300000
mentdb
1

type is_float <value>


Description

    This function will check if a value is a float number and will return a boolean.

Parameters

    value:   The value - String - required
admin
type is_float 1300000.4
mentdb
1

type is_double <value>


Description

    This function will check if a value is a double number and will return a boolean.

Parameters

    value:   The value - String - required
admin
type is_double 1300000.4
mentdb
1

type is_timestamp <value>


Description

    This function will check if a value is a timestamp format (example: '2009-06-18 12:00:00') and will return a boolean.

Parameters

    value:   The value - String - required
admin
type is_timestamp "2009-06-18 12:00:00"
mentdb
1

type is_valid_date <dateToValidate>


Description

    This function will check if a date is valid and will return a boolean.

Parameters

    dateToValidate:   The date - String - required
admin
type is_valid_date "1980-06-18"
mentdb
1

type is_valid_date <dateToValidate> <format>


Description

    This fucntion will check if a date is valid a boolean..

Parameters

    dateToValidate:   The date - String - required
    format:   The date format - String - required
admin
type is_valid_date "1980-06-18" "yyyy-MM-dd"
mentdb
1

type is_valid_time <timeToValidate>


Description

    This function will check if a time is valid and will return a boolean.

Parameters

    timeToValidate:   The time (12:00:01) - String - required
admin
type is_valid_time "12:00:01"
mentdb
1

type is_valid_timestamp <timestampToValidate>


Description

    This function will check if a timestamp is valid and will return a boolean.

Parameters

    timestampToValidate:   The timestamp - String - required
admin
type is_valid_timestamp "1980-06-18 12:00:01"
mentdb
1

type is_valid_timestamp <timestampToValidate> <format>


Description

    This function will check if a timestamp is valid and will return a boolean..

Parameters

    timestampToValidate:   The timestamp - String - required
    format:   The format (ex: yyyy MM dd HH:mm:ss) - String - required
admin
type is_valid_timestamp "1980-06-18 12:00:01" "yyyy-MM-dd HH:mm:ss"
mentdb
1

type is_varchar <value> <size>


Description

    This function will check if the size of the string or char sent by the user as parameter is correct.

Parameters

    value:   The value - String - required
    size:   The char size authorized - Number - required
admin
type is_varchar 1 1
mentdb
1




© 2012 - 2023