PostgreSQL(2)Using of postgresql-async
1. Introduce and Configuration
"com.github.mauricio" %% "mysql-async" % "0.2.12",
"com.github.mauricio" %% "postgresql-async" % "0.2.12",
Connection
PostgreSQLConnection, MySQLConnection, ConnectionPool
QueryResult
sendQuery, sendPreparedStatement, ResultSet
ResultSet
IndexedSeq[Array[Any]]
smallint ——> Short
numeric ———>BigDecimal
varchar ———> String
Prepared Statements
val connection = Connection = …
val future = connection.sendPreparedStatement( “ SELECT * FROM usertable WHERE usertable.name = ? “, Array( “sillycat” ) )
Transactions
inTransaction
UI Client Tool
http://www.pgadmin.org/
References:
https://github.com/mauricio/postgresql-async
http://www.pgadmin.org/
http://sillycat.iteye.com/blog/2035746
1. Introduce and Configuration
"com.github.mauricio" %% "mysql-async" % "0.2.12",
"com.github.mauricio" %% "postgresql-async" % "0.2.12",
Connection
PostgreSQLConnection, MySQLConnection, ConnectionPool
QueryResult
sendQuery, sendPreparedStatement, ResultSet
ResultSet
IndexedSeq[Array[Any]]
smallint ——> Short
numeric ———>BigDecimal
varchar ———> String
Prepared Statements
val connection = Connection = …
val future = connection.sendPreparedStatement( “ SELECT * FROM usertable WHERE usertable.name = ? “, Array( “sillycat” ) )
Transactions
inTransaction
UI Client Tool
http://www.pgadmin.org/
References:
https://github.com/mauricio/postgresql-async
http://www.pgadmin.org/
http://sillycat.iteye.com/blog/2035746