【问题标题】:Amazon SimpleDB for Scala Language适用于 Scala 语言的 Amazon SimpleDB
【发布时间】:2014-01-06 14:25:45
【问题描述】:

是否有任何适用于 Scala 语言的 Amazon SimpleDB API 实施/客户端?

给我简单的例子,说明如何使用 Scala 访问 SimpleDB 数据

【问题讨论】:

    标签: scala amazon-web-services amazon amazon-simpledb


    【解决方案1】:

    一种选择是使用simplistic

    import simplistic._
    
    val account = new SimpleDBAccount(System.getenv("AWS_ACCESS_KEY_ID"), System.getenv("AWS_SECRET_ACCESS_KEY"))
    
    // List all domains
    account.domains.toList
    
    // List all items in mydomain
    account.domain("mydomain").items.toList
    
    // Create a new item with a single attribute "bar" and value "baz"
    account.domain("mydomain") item ("foo") += ("bar" -> "baz")
    
    // Query mydomain and print results
    account.select ("select * from mydomain") foreach { e => println(e.name) }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-03
      • 1970-01-01
      • 1970-01-01
      • 2011-03-20
      • 1970-01-01
      • 1970-01-01
      • 2014-09-23
      • 1970-01-01
      相关资源
      最近更新 更多