trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaveBirdsall <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #837: [TRAFODION-2355] document about IP ad...
Date Tue, 22 Nov 2016 17:46:20 GMT
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/837#discussion_r89171248
  
    --- Diff: docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc
---
    @@ -3596,6 +3647,144 @@ SALES REP
     ```
     
     <<<
    +[[is_ipv4_function]]
    +== IS_IPV4 Function
    +
    +For a given argument, if it is a valid IPV4 string, IS_IPV4() returns 1 else returns
0. 
    +```
    +IS_IPV4( expression )
    +```
    +
    +* `_expression_`
    ++
    +specifies an expression that determines the values to include in the
    +computation of the minimum. The _expression_ cannot contain an aggregate
    +function or a subquery. The DISTINCT clause specifies that the MIN
    +function operates on distinct values from the one-column table derived
    +from the evaluation of _expression_. All nulls are eliminated before
    +the function is applied to the set of values. If the result table is
    +empty, IS_IPV4 returns NULL.
    +See <<expressions,Expressions>>.
    +
    +[[examples_of_is_ipv4]]
    +=== Examples of IS_IPV4
    +
    +This function returns 1 for the first input argument, since it is a valid IPV4 string;

    +0 for the second input argument, since it is an invalid IPV4 string.
    +
    +```
    +>>SELECT IS_IPV4('10.0.5.9'), IS_IPV4('10.0.5.256') from dual;
    +
    +(EXPR)   (EXPR)
    +-------  -------
    +1        0
    +```
    +<<<
    +[[is_ipv6_function]]
    +== IS_IPV6 Function
    +
    +Returns 1 if the argument is a valid IPv6 address specified as a string, 0 otherwise.

    +This function does not consider IPv4 addresses to be valid IPv6 addresses.
    +
    +```
    +IS_IPV6( expression )
    +```
    +
    +* `_expression_`
    ++
    +specifies an expression that determines the values to include in the
    +computation of the minimum. The _expression_ cannot contain an aggregate
    +function or a subquery. The DISTINCT clause specifies that the MIN
    +function operates on distinct values from the one-column table derived
    +from the evaluation of _expression_. All nulls are eliminated before
    +the function is applied to the set of values. If the result table is
    +empty, IS_IPV6 returns NULL.
    +See <<expressions,Expressions>>.
    +
    +[[examples_of_is_ipv6]]
    +=== Examples of IS_IPV6
    +
    +This function returns 0 for the second input argument, since it is a valid IPV6 string;

    +1 for the second input argument, since it is an invalid IPVr6 string.
    +
    +```
    +>>SELECT IS_IPV6('10.0.5.9'), IS_IPV6('::1') from dual;
    +(EXPR)   (EXPR)
    +-------- -------
    +1         0
    +```
    +<<<
    +[[inet_aton_function]]
    +== INET_ATON Function
    +
    +Given the dotted-quad representation of an IPv4 network address as a string, 
    +returns an integer that represents the numeric value of the address in network 
    +byte order (big endian). INET_ATON() returns NULL if it does not understand its argument.
    +
    +```
    +INET_ATON( expression )
    +```
    +
    +* `_expression_`
    ++
    +specifies an expression that determines the values to include in the
    +computation of the minimum. The _expression_ cannot contain an aggregate
    +function or a subquery. The DISTINCT clause specifies that the MIN
    +function operates on distinct values from the one-column table derived
    +from the evaluation of _expression_. All nulls are eliminated before
    +the function is applied to the set of values. If the result table is
    +empty, INET_ATON returns NULL.
    +See <<expressions,Expressions>>.
    +
    +[[examples_of_inet_aton]]
    +=== Examples of INET_ATON
    +
    +
    +```
    +>>SELECT INET_ATON('10.0.5.9') from dual;
    +
    +(EXPR)
    +-----------
    +167773449 
    +```
    +<<<
    +[[inet_ntoa_function]]
    +== INET_NTOA Function
    +
    +Given a numeric IPv4 network address in network byte order, returns the 
    +dotted-quad string representation of the address as a nonbinary string in 
    +the connection character set. INET_NTOA() returns NULL if it does 
    +not understand its argument.
    +
    +```
    +INET_NTOA( expression )
    +```
    +
    +* `_expression_`
    ++
    +specifies an expression that determines the values to include in the
    --- End diff --
    
    Similar comment as before.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message