Skip to content

evnm/finagle-postgres

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Finagle Postgres

Build status

This library provides PostgreSQL database support for Finagle. It was originally developed by Mairbek Khadikov, with subsequent work by The Factory, Vladimir Kostyukov, and others. In early 2015 Twitter began using the library, and this repository reflects the most recent changes (as of March 2015) from The Factory's fork together with changes from Twitter's internal fork (including new SSL support).

The library is currently cross-built for Scala 2.10 and 2.11 using SBT.

Using the Postgres client

Installation

Earlier versions of the library were published to a Maven repository maintained by Mairbek Khadikov, but these are no longer available. We are planning to publish releases to Maven Central, but for now you can use the library in your own projects by running sbt +publishLocal and then adding the following dependency to your SBT configuration:

"com.twitter" %% "finagle-postgres" % "0.1.0-SNAPSHOT"

Connecting to the DB

val client = Client(host, username, password, database)

Selecting with simple query

val f = client.select("select * from users") {row =>
	User(row.getString("email"), row.getString("name"))
}
logger.debug("Responded " + f.get)

Changelog

0.1.0

  • SSL support

0.0.2

  • Prepared statements support
  • Async responses logging
  • Exceptions handling
  • Create and drop table support

0.0.1

  • Clear-text authentication support
  • MD5 authentication support
  • Select, update, insert, and delete queries

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

PostgreSQL protocol support for Finagle

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 100.0%