Swift PostgreSQL driver

3997
    


来源:
Licence:
联系:
分类:
平台:
环境:
大小:
更新:
标签:
联系方式 :
免费下载 ×

下载APP,支持永久资源免费下载

限免产品服务请联系qq:1585269081

下载APP
免费下载 ×

下载APP,支持永久资源免费下载

下载APP 免费下载
下载 ×

下载APP,资源永久免费


如果出现不能下载的情况,请联系站长,联系方式在下方。

免费下载 ×

下载论文助手APP,资源永久免费

免费获取

如果你已经登录仍然出现不能下载的情况,请【点击刷新】本页面或者联系站长


Connect to your PostgreSQL database. Run queries. All natively in Swift. Installation Install via swift-package-manager by adding a depdendency to your Package.swift . . Package ( url : " https://github.com/stepanhruda/PostgreSQL-Swift.git " , majorVersion : 0 ) Usage Connection let parameters = ConnectionParameters ( host : " 123.123.123.123 " , port : " 9000 " , databaseName : " banana_pantry " , login : " mehungry " , password : " reallyhungrygotnopatience " ) let connection = try Database. connect ( parameters : parameters) Environment variables Your database configuration should not be in your applications source. Connecting to the database becomes as easy as: let connection = try Database. connect () Configuration is automatically loaded from default PostgreSQL environment variables. export PGHOST 123.123.123.123 export PGPORT 9000 export PGDATABASE banana_pantry export PGUSER mehungry export PGPASSWORD reallyhungrygotnopatience Queries and results let result = try connection. execute ( " SELECT color, is_tasty, length FROM bananas " ) for row in result. rows { let color = row[ " color " ] as! String let isTasty = row[ " is_tasty " ] as! Bool let length = row[ " length " ] as! Int let banana = Banana ( color : color, isTasty : isTasty, length : length) } Development on OS X Install dependencies Xcode 7+ (Swift 2.x) brew cask install dockertoolbox make development.setup Starts a PostgreSQL container that tests can be run against. Before running make sure your docker-machine environment variables are available (usually you run eval $(docker-machine env default) ) development.setup also adds handy opinionated environment variables to your Xcode scheme that connect to the container. If you are using a custom setup rather than what docker-machine gives you out of the box, you might need to tweak them. Also, please dont commit any changes to the .xcscheme file. make test to run tests or run them through Xcode


免费下载 ×

下载APP,支持永久资源免费下载

下载APP 免费下载
温馨提示
请用电脑打开本网页,即可以免费获取你想要的了。
扫描加我微信 ×

演示

×
登录 ×


下载 ×
论文助手网
论文助手,最开放的学术期刊平台
				暂无来源信息			 
回复
来来来,吐槽点啥吧

作者联系方式

×

向作者索要->