This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import WhileZ._ | |
| whileZ(somethting) { | |
| println("!!!!") | |
| doSomething() | |
| } | |
| object WhileZ { | |
| def whileZ(b: =>Boolean)(u: Unit) = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.squeryl.PrimitiveTypeMode._ | |
| import org.squeryl.{KeyedEntity, Schema} | |
| class Artist(var name:String) extends MusicDbObject { | |
| // this returns a Query[Song] which is also an Iterable[Song] : | |
| def songs = from(MusicDb.songs)(s => where(s.artistId =? id) select(s)) | |
| def newSong(title: String, filePath: Option[String]) = | |
| MusicDb.songs.insert(new Song(title, id, filePath)) |
NewerOlder