diff --git a/README.markdown b/README.markdown index b15d4885..79f4b057 100644 --- a/README.markdown +++ b/README.markdown @@ -1,7 +1,7 @@ -- [[![Build Status](https://travis-ci.org/mauricio/postgresql-async.png)](https://travis-ci.org/mauricio/postgresql-async) postgresql-async & mysql-async - async, Netty based, database drivers for MySQL and PostgreSQL written in Scala 2.10, 2.11 and 2.12](#!build-statushttpstravis-ciorgmauriciopostgresql-asyncpnghttpstravis-ciorgmauriciopostgresql-async-postgresql-async-&-mysql-async---async-netty-based-database-drivers-for-mysql-and-postgresql-written-in-scala-210-and-211) +- This project is not being maintained anymore, feel free to fork and work on it - [Abstractions and integrations](#abstractions-and-integrations) - [Include them as dependencies](#include-them-as-dependencies) - [Database connections and encodings](#database-connections-and-encodings) @@ -22,7 +22,7 @@ -# [![Build Status](https://travis-ci.org/mauricio/postgresql-async.png)](https://travis-ci.org/mauricio/postgresql-async) postgresql-async & mysql-async - async, Netty based, database drivers for MySQL and PostgreSQL written in Scala 2.10, 2.11 and 2.12 +# [![Build Status](https://travis-ci.org/mauricio/postgresql-async.png)](https://travis-ci.org/mauricio/postgresql-async) This project is not being maintained anymore, feel free to fork and work on it The main goal for this project is to implement simple, async, performant and reliable database drivers for PostgreSQL and MySQL in Scala. This is not supposed to be a JDBC replacement, these drivers aim to cover the common diff --git a/mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/codec/DecoderRegistry.scala b/mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/codec/DecoderRegistry.scala index 798f9231..ad79fed4 100644 --- a/mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/codec/DecoderRegistry.scala +++ b/mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/codec/DecoderRegistry.scala @@ -36,7 +36,8 @@ class DecoderRegistry(charset: Charset) { (columnType: @switch) match { case ColumnTypes.FIELD_TYPE_VARCHAR | - ColumnTypes.FIELD_TYPE_ENUM => this.stringDecoder + ColumnTypes.FIELD_TYPE_ENUM | + ColumnTypes.FIELD_TYPE_JSON => this.stringDecoder case ColumnTypes.FIELD_TYPE_BLOB | ColumnTypes.FIELD_TYPE_LONG_BLOB | ColumnTypes.FIELD_TYPE_MEDIUM_BLOB | diff --git a/mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/column/ColumnTypes.scala b/mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/column/ColumnTypes.scala index b8bc89f7..81abb196 100644 --- a/mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/column/ColumnTypes.scala +++ b/mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/column/ColumnTypes.scala @@ -74,6 +74,8 @@ object ColumnTypes { final val FIELD_TYPE_YEAR = 13 + final val FIELD_TYPE_JSON = 245 + final val Mapping = Map( FIELD_TYPE_BIT -> "bit", FIELD_TYPE_BLOB -> "blob", @@ -102,7 +104,8 @@ object ColumnTypes { FIELD_TYPE_TINY_BLOB -> "tiny_blob", FIELD_TYPE_VAR_STRING -> "var_string", FIELD_TYPE_VARCHAR -> "varchar", - FIELD_TYPE_YEAR -> "year" + FIELD_TYPE_YEAR -> "year", + FIELD_TYPE_JSON -> "json" ) } diff --git a/postgresql-async/src/main/scala/com/github/mauricio/async/db/postgresql/column/PostgreSQLColumnEncoderRegistry.scala b/postgresql-async/src/main/scala/com/github/mauricio/async/db/postgresql/column/PostgreSQLColumnEncoderRegistry.scala index c9f95f43..144b9531 100644 --- a/postgresql-async/src/main/scala/com/github/mauricio/async/db/postgresql/column/PostgreSQLColumnEncoderRegistry.scala +++ b/postgresql-async/src/main/scala/com/github/mauricio/async/db/postgresql/column/PostgreSQLColumnEncoderRegistry.scala @@ -31,14 +31,14 @@ object PostgreSQLColumnEncoderRegistry { class PostgreSQLColumnEncoderRegistry extends ColumnEncoderRegistry { private val classesSequence_ : List[(Class[_], (ColumnEncoder, Int))] = List( - classOf[Int] -> (IntegerEncoderDecoder -> ColumnTypes.Numeric), - classOf[java.lang.Integer] -> (IntegerEncoderDecoder -> ColumnTypes.Numeric), + classOf[Int] -> (IntegerEncoderDecoder -> ColumnTypes.Integer), + classOf[java.lang.Integer] -> (IntegerEncoderDecoder -> ColumnTypes.Integer), - classOf[java.lang.Short] -> (ShortEncoderDecoder -> ColumnTypes.Numeric), - classOf[Short] -> (ShortEncoderDecoder -> ColumnTypes.Numeric), + classOf[java.lang.Short] -> (ShortEncoderDecoder -> ColumnTypes.Smallint), + classOf[Short] -> (ShortEncoderDecoder -> ColumnTypes.Smallint), - classOf[Long] -> (LongEncoderDecoder -> ColumnTypes.Numeric), - classOf[java.lang.Long] -> (LongEncoderDecoder -> ColumnTypes.Numeric), + classOf[Long] -> (LongEncoderDecoder -> ColumnTypes.Bigserial), + classOf[java.lang.Long] -> (LongEncoderDecoder -> ColumnTypes.Bigserial), classOf[String] -> (StringEncoderDecoder -> ColumnTypes.Varchar), classOf[java.lang.String] -> (StringEncoderDecoder -> ColumnTypes.Varchar), diff --git a/project/Build.scala b/project/Build.scala index b543b050..76598262 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -49,7 +49,7 @@ object ProjectBuild extends Build { object Configuration { - val commonVersion = "0.2.22-SNAPSHOT" + val commonVersion = "0.3.0-rogach" val projectScalaVersion = "2.12.1" val specs2Version = "3.8.6" diff --git a/project/build.properties b/project/build.properties index e0cbc71d..cd7364c1 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version = 0.13.13 \ No newline at end of file +sbt.version = 0.13.17 \ No newline at end of file