Skip to content
SQLite3 provider for Vapor
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Sources/VaporSQLite
Tests
.gitignore
.travis.yml
LICENSE
Package.swift
README.md

README.md

Vapor SQLite

Adds SQLite support to the Vapor web framework.

Install

import Vapor
import VaporSQLite

let 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

{
  "path": "/path/to/database.sqlite"
}

Raw Queries

let result = try drop.database?.driver.raw("SELECT sqlite_version()")
print(result)

Dependencies

OS X

brew install sqlite3

Linux

sudo apt-get update
sudo apt-get install sqlite3 libsqlite3-dev
You can’t perform that action at this time.