Functions

The following functions are available globally.

  • Parses input parameters and returns appropriate character set string.

    Declaration

    Objective-C

    NSString *_Nullable MySQLCharsetForEncoding(CharsetEncoding encoding)

    Swift

    func MySQLCharsetForEncoding(_ encoding: CharsetEncoding) -> String?

    Parameters

    encoding

    Defined OHMySQL encoding to use.

    Return Value

    Name of the encoding. The behavior is undefined if an invalid string encoding is passed.

  • Converts library’ encoding to the Cocoa encoding.

    Declaration

    Objective-C

    NSStringEncoding NSStringEncodingFromCharsetEncoding(CharsetEncoding encoding)

    Swift

    func NSStringEncodingFromCharsetEncoding(_ encoding: CharsetEncoding) -> UInt

    Parameters

    encoding

    Defined OHMySQL encoding to use.

    Return Value

    The Cocoa encoding (of type NSStringEncoding) that is closest to the Core Foundation encoding encoding. The behavior is undefined if an invalid string encoding is passed.

  • Undocumented

    Declaration

    Objective-C

    OHResultErrorType ResultErrorConvertion(NSInteger input) NS_REFINED_FOR_SWIFT