Skip to content

ckmjreynolds/BriskMySQL

Repository files navigation

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)
}

About

Swift-NIO based MySQL/MariaDB/ProxySQL library.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages