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.
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"
val client = Client(host, username, password, database)
val f = client.select("select * from users") {row =>
User(row.getString("email"), row.getString("name"))
}
logger.debug("Responded " + f.get)
- SSL support
- Prepared statements support
- Async responses logging
- Exceptions handling
- Create and drop table support
- Clear-text authentication support
- MD5 authentication support
- Select, update, insert, and delete queries
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.