通過ScalaQuery源代碼徘徊,我發現這樣的聲明(很多的那種其實):Scala中的protected [session]是什麼意思?
private[session] val dyn = new DynamicVariable[Session](null)
和
def forDataSource(ds: DataSource): Database = new Database {
protected[session] def createConnection(): Connection = ds.getConnection
}
是什麼[session]
是什麼意思?而且我認爲一個函數中定義不能protected
功能...
在這種情況下的會話是包的範圍 – virtualeyes 2012-04-08 07:08:24