Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vapor-community/sqlite-provider
SQLite3 provider for Vapor
https://github.com/vapor-community/sqlite-provider
deprecated
Last synced: 3 months ago
JSON representation
SQLite3 provider for Vapor
- Host: GitHub
- URL: https://github.com/vapor-community/sqlite-provider
- Owner: vapor-community
- License: mit
- Created: 2016-07-11T23:19:55.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-04T20:10:28.000Z (almost 8 years ago)
- Last Synced: 2024-05-18T22:53:13.344Z (6 months ago)
- Topics: deprecated
- Language: Swift
- Size: 29.3 KB
- Stars: 11
- Watchers: 6
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- TheList - SQLite3 provider for Vapor
README
# Vapor SQLite
Adds SQLite support to the Vapor web framework.
## Install
```swift
import Vapor
import VaporSQLitelet drop = Droplet()
try drop.addProvider(VaporSQLite.Provider.self)
```## Config
Be sure to have a `sqlite.json` config file in your Config directory, the path is set relatively from the Droplet's working directory
```json
{
"path": "/path/to/database.sqlite"
}
```## Raw Queries
```swift
let result = try drop.database?.driver.raw("SELECT sqlite_version()")
print(result)
```## Dependencies
### OS X
```shell
brew install sqlite3
```### Linux
```shell
sudo apt-get update
sudo apt-get install sqlite3 libsqlite3-dev
```