On Jul 29, 10:38 pm, "fernanda.aispuro" <
fernanda.aisp...@gmail.com>
wrote:
> Noob trying out both AWS simpleDb and scala.
> I'm trying to simply create a domain, attach some properties and then
> read all the data.
> Here is what I have:
>
I think this line:
> import org.sublime.amazon.simpleDB.api.SimpleAPI
Should be like this:
import org.sublime.amazon.simpleDB.api._
You can then omit these two lines:
> import org.sublime.amazon.simpleDB.api.SimpleDBAccount
> import org.sublime.amazon.simpleDB._
>
> object MyApp extends Application {
> val account = new SimpleDBAccount("XXXXXXXXXXX", "XXXXXXXXXXX")
> domain ("test") create
> domain ("test") item ("robin") += ("role" -> "author")
> domain ("test") item ("landon") += ("role" -> "reviewer")
> select ("select * from test where role='reviewer'") foreach ( e
> => println(
e.name))
> select ("select * from test where role='reviewer'") foreach ( e
> => domain ("test") item (e) set ("score" -> "2"))
>
> }
>
> The problem is that it does not find domain. What am I doing wrong?
Thanks for trying it. Let me know how you get on. I have added some
interesting new features since I wrote up the example. In particular
there are now type-safe conversions for things like numbers and dates,
and a dsl for constructing queries in a composable and type safe
manner. Currently these are only documented in the source though. I
plan to update the examples and scaladoc on github soon.
-Robin