pub struct Collation<'a> {
pub id: CollationId,
pub charset: &'a str,
pub collation: &'a str,
pub is_default: bool,
pub padding: PadAttribute,
pub is_compiled: bool,
pub sort_len: u8,
pub max_len: u8,
}Expand description
MySQL server collation
Fields§
§id: CollationId§charset: &'a str§collation: &'a str§is_default: bool§padding: PadAttribute§is_compiled: bool§sort_len: u8§max_len: u8Implementations§
Source§impl Collation<'_>
Constants are generated using the following statement:
impl Collation<'_>
Constants are generated using the following statement:
SELECT CONCAT(
0x5c5c5c20, DESCRIPTION, 0x0a,
'const ', UPPER(COLLATION_NAME), '_COLLATION: Collation<''static> = Collation {',
'id: CollationId::', UPPER(COLLATION_NAME), ',',
'charset: "', CHARACTER_SET_NAME, '",',
'collation: "', COLLATION_NAME, '",',
'is_default: ', IF(IS_DEFAULT = 'Yes', 'true', 'false'), ',',
'padding: PadAttribute::', IF(PAD_ATTRIBUTE = 'PAD SPACE', 'PadSpace', 'PadZero'), ',',
'is_compiled: ', IF(IS_COMPILED = 'Yes', 'true', 'false'), ',',
'sort_len: ', SORTLEN, ',',
'max_len: ', MAXLEN,
'};')
FROM INFORMATION_SCHEMA.COLLATIONS
JOIN INFORMATION_SCHEMA.CHARACTER_SETS
USING(CHARACTER_SET_NAME) ORDER BY ID;Sourcepub fn id(&self) -> CollationId
pub fn id(&self) -> CollationId
Get the collation ID.
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Is the collation default?
Sourcepub fn padding(&self) -> PadAttribute
pub fn padding(&self) -> PadAttribute
Get the padding attribute.
Sourcepub fn is_compiled(&self) -> bool
pub fn is_compiled(&self) -> bool
Is the collation compiled?
Sourcepub const fn resolve(id: CollationId) -> Collation<'static>
pub const fn resolve(id: CollationId) -> Collation<'static>
Resolve collation id into a collation.
Trait Implementations§
Source§impl From<CollationId> for Collation<'static>
impl From<CollationId> for Collation<'static>
Source§fn from(value: CollationId) -> Self
fn from(value: CollationId) -> Self
Convert a collation ID to a collation.
impl<'a> Eq for Collation<'a>
impl<'a> StructuralPartialEq for Collation<'a>
Auto Trait Implementations§
impl<'a> Freeze for Collation<'a>
impl<'a> RefUnwindSafe for Collation<'a>
impl<'a> Send for Collation<'a>
impl<'a> Sync for Collation<'a>
impl<'a> Unpin for Collation<'a>
impl<'a> UnwindSafe for Collation<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more