8000 GitHub - vapor-community/sqlite-provider: SQLite3 provider for Vapor
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

vapor-community/sqlite-provider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

SQLite3 provider for Vapor

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages

0