MCPcopy
hub / github.com/sequelize/sequelize / INET

Class INET

src/data-types.js:921–928  ·  view source on GitHub ↗

* The INET type holds an IPv4 or IPv6 host address, and optionally its subnet. Takes 7 or 19 bytes * * Only available for Postgres

Source from the content-addressed store, hash-verified

919 * Only available for Postgres
920 */
921class INET extends ABSTRACT {
922 validate(value) {
923 if (typeof value !== 'string' || !Validator.isIP(value)) {
924 throw new sequelizeErrors.ValidationError(util.format('%j is not a valid INET', value));
925 }
926 return true;
927 }
928}
929
930/**
931 * The MACADDR type stores MAC addresses. Takes 6 bytes

Callers 1

data-types.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected