Class Reference
IRIS for UNIX 2024.1.2
InterSystems: The power behind what matters   
Documentation  Search
  [USER] >  [%Library] >  [NetworkAddress]
Private  Storage   

datatype class %Library.NetworkAddress extends %Library.String

ODBC Type: VARCHAR

This datatype class validates IP addresses and ports in the format IP|Port. The IP address can either be an IPV4, IPV6, or DNS name. For example:

127.0.0.1|1972
fe80::20c:29ff:fe21:20cf|1972
hostname|1972

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
2


Summary

Methods
DisplayToLogical FormatForHttp IsValid JSONToLogical
LogicalToDisplay LogicalToJSON LogicalToOdbc LogicalToXSD
Normalize XSDToLogical


Methods

• classmethod FormatForHttp(Address) as %String
Method to Get the address in a format usable with an http url. The format of %NetworkAddress is address_"|"_port, while the address required for a url is address_":"_port. Furthermore, if the address is an IPV6 colon separated hex representation, the address must be enclosed with [].
• classmethod IsValid(%Val As %RawString) as %Status
Tests if the logical value %val, which is a string, is valid. The validation is based on the class parameter settings used for the class attribute this data type is associated with. In this case, MINLEN, MAXLEN, VALUELIST, and PATTERN.


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.