项目作者: PerfectlySoft

项目描述 :
A stand-alone Swift wrapper around the MySQL client library, enabling access to MySQL servers.
高级语言: Swift
项目地址: git://github.com/PerfectlySoft/Perfect-MySQL.git
创建时间: 2016-04-04T13:49:26Z
项目社区:https://github.com/PerfectlySoft/Perfect-MySQL

开源协议:Apache License 2.0

下载


Perfect - MySQL Connector



Get Involed with Perfect!



Star Perfect On Github


Stack Overflow


Follow Perfect on Twitter


Join the Perfect Slack



Swift 4.1


Platforms OS X | Linux


License Apache


PerfectlySoft Twitter


Slack Status

This project provides a Swift wrapper around the MySQL client library, enabling access to MySQL database servers.

This package builds with Swift Package Manager and is part of the Perfect project. It was written to be stand-alone and so does not require PerfectLib or any other components.

Ensure you have installed and activated the latest Swift 4.1.2 tool chain.

macOS Build Notes

This package requires the Home Brew build of MySQL.

To install Home Brew:

  1. /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

To install MySQL:

  1. brew install mysql@5.7

Unfortunately, at this point in time you will need to edit the mysqlclient.pc file located here:

  1. /usr/local/lib/pkgconfig/mysqlclient.pc

Remove the occurrance of “-fno-omit-frame-pointer”. This file is read-only by default so you will need to change that first.

If you get a link error while build in Xcode, please, close XCode, open a New terminal, go to the place where you have your Packages.swift and build the project again:

  1. swift package generate-xcodeproj

After this you have to set the path for libraries again.

Linux Build Notes

Ensure that you have installed libmysqlclient-dev for MySQL version 5.6 or greater.

  1. sudo apt-get install libmysqlclient-dev

Please note that Ubuntu 14 defaults to including a version of MySQL client which will not compile with this package. Install MySQL client version 5.6 or greater.

Building

Add this project as a dependency in your Package.swift file.

  1. .package(url:"https://github.com/PerfectlySoft/Perfect-MySQL.git", from: "3.0.0")

Documentation

For more information, please visit perfect.org.