Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/perfectlysoft/perfect-mariadb
A stand-alone Swift wrapper around the MariaDB client library, enabling access to MariaDB servers. http://www.perfect.org
https://github.com/perfectlysoft/perfect-mariadb
database mariadb mariadb-connector mysql perfect server-side-swift swift
Last synced: 4 days ago
JSON representation
A stand-alone Swift wrapper around the MariaDB client library, enabling access to MariaDB servers. http://www.perfect.org
- Host: GitHub
- URL: https://github.com/perfectlysoft/perfect-mariadb
- Owner: PerfectlySoft
- License: apache-2.0
- Created: 2016-10-04T16:41:27.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-07-03T13:33:21.000Z (over 4 years ago)
- Last Synced: 2024-10-11T00:04:00.852Z (about 1 month ago)
- Topics: database, mariadb, mariadb-connector, mysql, perfect, server-side-swift, swift
- Language: Swift
- Homepage: https://www.perfect.org
- Size: 68.4 KB
- Stars: 9
- Watchers: 4
- Forks: 8
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Perfect - MariaDB Connector [简体中文](README.zh_CN.md)
This project provides a Swift wrapper around the MariaDB client library, enabling access to MariaDB database servers.
This package builds with Swift Package Manager and is part of the [Perfect](https://github.com/PerfectlySoft/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 tool chain.
## OS X Build Notes
### To install MariaDB connector:
```bash
brew install mariadb-connector-c
```## Linux Build Notes
Tests performed on Ubuntu 18.04. Prior to building this library, please ensure you install the required MariaDB library:
```bash
sudo apt-get install pkg-config libmariadb-dev
```On older distros (like 16.04), you may need to install libmariadb-client-lgpl-dev instead of libmariadb-dev. On older versions, you will also need to create a pkg-config file. In such cases, create /usr/lib/pkgconfig/libmariadb.pc and make it look something like this:
```
libdir=/usr/lib/x86_64-linux-gnu
includedir=/usr/include/mariadbName: libmariadb
Description: MariaDB Connector/C
Version: 5.5.0
Requires:
Cflags: -I${includedir}
Libs: -L${libdir} -lmariadb
Libs.private: -ldl -lm -lpthread
```To test if pkg-config is working, try running the command:
```bash
pkg-config libmariadb --cflags --libs
```## Building
Add this project as a dependency in your Package.swift file.
```
.package(url:"https://github.com/PerfectlySoft/Perfect-MariaDB.git", from: "3.0.0")
...
dependencies: ["MariaDB"]),
```Import required libraries:
```
import MariaDB
import PerfectCRUD
```Perfect-MariaDB supports the Perfect-CRUD protocol. Please check [Perfect-CRUD](https://github.com/PerfectlySoft/Perfect-CRUD.git) for more information.
## Further Information
For more information on the Perfect project, please visit [perfect.org](http://perfect.org).