Skip to content

Latest commit

 

History

History
40 lines (34 loc) · 2 KB

README.md

File metadata and controls

40 lines (34 loc) · 2 KB

BriskMySQL

build-macOS build-linux lint license semver Swift

os os MySQL MariaDB ProxySQL

Development Status

Protocols and Authentication

Feature ProxySQL MariaDB MySQL Notes
Auth - mysql_native_password ✔️ ✔️ ✔️
Auth - caching_sha2_password N/A N/A ✔️* Requires SSL/TLS.
SSL/TLS - Protocol Encryption ✔️ ✔️ ✔️
Packet compression ✔️ ✔️ ✔️

Features

Feature ProxySQL MariaDB MySQL Notes
COM_PING aka isConnected() ✔️ ✔️ ✔️
COM_QUERY Target 0.1.2

Sample Usage

import Foundation
import NIO
import BriskMySQL

var eventLoopGroup: MultiThreadedEventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 1)
let eventLoop = eventLoopGroup.next()

do {
    try MySQLConnection.withDatabase(to: URL(string: "mysql://root:@127.0.0.1:3306/mysql")!, on: eventLoop) { conn in
        conn.isConnected()
    }.map { result in
        print(result)
    }.wait()
}
catch {
    print(error.localizedDescription)
}