The MACADDR
SQL type. This type can only be used with feature = "network-address"
table! {
devices {
id -> Integer,
macaddr -> MacAddr,
}
}
let inserted_macaddr = insert_into(devices)
.values(macaddr.eq([0x08, 0x00, 0x2b, 0x01, 0x02, 0x03]))
.returning(macaddr)
.get_result(&connection);
assert_eq!(Ok([0x08, 0x00, 0x2b, 0x01, 0x02, 0x03]), inserted_macaddr);
A type which uniquely represents Self
in a SQL query. Read more
HAS_STATIC_QUERY_ID: bool = true
Can the SQL generated by Self
be uniquely identified by its type? Read more
Returns the type id of Self::QueryId
if Self::HAS_STATIC_QUERY_ID
. Returns None
otherwise. Read more
Fetch the metadata for the given type Read more
Formats the value using the given formatter. Read more
Performs copy-assignment from source
. Read more
Returns the "default value" for a type. Read more