MentDB, The digital brain.  About us Home
Back / All functions / 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

    check if a value is equal than two booleans

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

    check if a value is a valid enum

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

    check if a value is char type (with size)

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

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 or not

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

    check if a value is an email address

Parameters

    emailAddress:   The email - String - required
admin
type is_email "contact@jpayet.re"
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) without seconds

Parameters

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

type is_integer <value> <size>

Description

    check if a value is an integer or not (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

    check if a value is a number

Parameters

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

type is_byte <value>

Description

    check if a value is a byte

Parameters

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

type is_small_int <value>

Description

    check if a value is a small integer

Parameters

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

type is_medium_int <value>

Description

    check if a value is a medium integer

Parameters

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

type is_int <value>

Description

    check if a value is an integer

Parameters

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

type is_big_int <value>

Description

    check if a value is a big integer

Parameters

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

type is_float <value>

Description

    check if a value is a float number

Parameters

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

type is_double <value>

Description

    check if a value is a double number

Parameters

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

type is_timestamp <value>

Description

    check if a value is a timestamp format (example: '2009-06-18 12:00:00')

Parameters

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

type is_valid_date <dateToValidate>

Description

    check if a date is valid.

Parameters

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

type is_valid_date <dateToValidate> <format>

Description

    check if a date is valid.

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

    check if a time is valid.

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

    check if a timestamp is valid.

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

    check if a timestamp is valid.

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

    check if a value is varchar type (with size)

Parameters

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




© 2012 - 2018 - Innov-AI.