51.列出一个用户发送的消息

在jungleville,玩家可以将消息发送到其他玩家。

查找出玩家"zid-jungle-0001"发送的消息.

SELECT player.name, inbox.messages
FROM jungleville AS player 
     USE KEYS "zid-jungle-0001" 
LEFT JOIN jungleville_inbox AS inbox 
     ON KEYS "zid-jungle-inbox-" || SUBSTR(player.uuid, 11)

结果:

{
  "results": [
    {
      "messages": [
        {
          "content": "more work",
          "message": "more help for you ",
          "type": "gift",
          "user": "zid-jungle-0002"
        },
        {
          "content": null,
          "message": "1.2.3.Go",
          "type": "help-needed",
          "user": "zid-jungle-0002"
        },
        {
          "content": "meat-cleaver",
          "message": "hungry like the wolf",
          "type": "help-needed",
          "user": "zid-jungle-0003"
        }
      ],
      "name": "Don Pinto"
    }
  ]
}

Last updated

Was this helpful?