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
本文介绍了如何使用postgresql-async库版本0.2.12进行异步操作PostgreSQL数据库,包括连接配置、查询发送、预编译语句执行及事务处理等内容,并推荐了pgAdmin作为客户端工具。
1787

被折叠的 条评论
为什么被折叠?



