Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Renamed pass to password, added exec to PGScala, added sslmode to PGC…

…redentials.
  • Loading branch information...
commit 5d8fee7371a143ca66c636069d965ded6f843f2c 1 parent 17f31da
Marko Elezović authored
View
5 pgscala/src/main/scala/org/pgscala/PGCredentials.scala
@@ -2,8 +2,9 @@ package org.pgscala
case class PGCredentials(
host: String
-, port: Int
+, port: Int = 5432
, dbName: String
, user: String
-, pass: String
+, password: String
+, sslMode: String = "require"
)
View
7 pgscala/src/main/scala/org/pgscala/PGScala.scala
@@ -89,6 +89,13 @@ class PGScala(con: java.sql.Connection) {
}
/**
+ * Query the database and discard the result.
+ */
+
+ def exec(query: String, params: ParamText[_]*): Unit =
+ qry(query, params: _*){ _ => }
+
+ /**
* Query one database tuple.
*/
View
2  pgscala/src/main/scala/org/pgscala/PGSimple.scala
@@ -13,5 +13,5 @@ class PGSimple(creds: PGCredentials) extends PGSimpleDataSource
setPortNumber(creds.port)
setDatabaseName(creds.dbName)
setUser(creds.user)
- setPassword(creds.pass)
+ setPassword(creds.password)
}
View
2  pool/src/main/scala/org/pgscala/PGPool.scala
@@ -12,7 +12,7 @@ class PGPool(creds: PGCredentials) extends PGSessionFactory {
format(creds.host, creds.port, creds.dbName))
cpds.setUser(creds.user)
- cpds.setPassword(creds.pass)
+ cpds.setPassword(creds.password)
cpds
}
View
11 project/PGScalaBuild.scala
@@ -16,9 +16,6 @@ object BuildSettings {
name := "pgscala-iorc"
, version := "0.1.7"
, initialCommands := "import org.pgscala.iorc._"
- , crossScalaVersions := Seq(
- "2.9.0", "2.9.0-1", "2.9.1", "2.9.1-1", "2.9.2", "2.9.3"
- )
)
// ===========================================================================
@@ -57,13 +54,14 @@ object BuildSettings {
val bsPGScala = scalaSettings ++ Seq(
name := "pgscala"
- , version := "0.7.22"
+ , version := "0.7.23"
, initialCommands := "import org.pgscala._"
)
val bsPool = scalaSettings ++ Seq(
name := "pgscala-pool"
- , version := "0.2.15"
+ , version := "0.2.16"
+ , initialCommands := "import org.pgscala._"
)
}
@@ -75,7 +73,7 @@ object Dependencies {
lazy val postgres = "postgresql" % "postgresql" % "9.2-1002.jdbc4"
- lazy val c3p0 = "c3p0" % "c3p0" % "0.9.2"
+ lazy val c3p0 = "com.mchange" % "c3p0" % "0.9.2"
lazy val slf4j = "org.slf4j" % "slf4j-api" % "1.7.2"
lazy val log4jOverSlf4j = "org.slf4j" % "log4j-over-slf4j" % "1.7.2"
@@ -84,6 +82,7 @@ object Dependencies {
lazy val scalaIo = (sV: String) =>
"com.github.scala-incubator.io" % "scala-io-file_".+(sV match {
case "2.9.2" | "2.9.3" => "2.9.2"
+ case x if x startsWith "2.10" => "2.10"
case x => "2.9.1"
}) % "0.4.1-seq"
Please sign in to comment.
Something went wrong with that request. Please try again.