PostgresMacAddress class final
A hardware address, the value of a Postgres macaddr column with six
bytes or of a macaddr8 column with eight.
A macaddr column rejects an address of eight bytes. A macaddr8 column
stores an address of six bytes in the EUI-64 form, with ff:fe inserted
in the middle, so it reads back as a different, eight byte address.
PostgresMacAddress.parse('08:00:2b:01:02:03').bytes // [8, 0, 43, 1, 2, 3]
PostgresMacAddress([8, 0, 43, 1, 2, 3]).literal // 08:00:2b:01:02:03
- Implemented types
- Annotations
-
- @experimental
Constructors
-
PostgresMacAddress(List<
int> bytes) -
The address made of
bytes, six for amacaddrand eight for amacaddr8. - PostgresMacAddress.parse(String literal)
-
Parses a MAC address of six or eight bytes written as hexadecimal
digits in groups of whole bytes, separated by one of
:,-or.throughout or not at all, as in08:00:2b:01:02:03,08-00-2B-01-02-03,08002b:010203or0800.2b01.0203.factory
Properties
- bytes → Uint8List
-
The six or eight bytes of the address, in transmission order.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- literal → String
-
The literal Postgres emits: the bytes in lowercase hexadecimal separated
by colons,
08:00:2b:01:02:03.no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override