WikiNebula:AccessLog.json

提供:WikiNebula
2025年9月12日 (金) 09:57時点におけるHiratatomotaka (トーク | 投稿記録)による版
ナビゲーションに移動 検索に移動
  <!-- AccessLog -->
  {
    "queries": {
      "last_viewed" : [
        {"params": {
          "before": ["9999-12-31 23:59:59"],
          "0a": ["3"]
        }},
        "WITH last_access AS (                     ",
        "  SELECT title, MAX(datetime) as datetime ",
        "  FROM AccessLog                          ",
        "  GROUP BY title                          ",
        ")                                         ",
        "SELECT                                    ",
        "  title, datetime,                        ",
        "  'case0' as result_type                  ",
        "FROM last_access                          ",
        "WHERE datetime <= '{$params['before']}'   ",
        "ORDER BY datetime DESC                    ",
        "LIMIT {$params['n']}                      "
      ]
    },
    "outputs": {
      "last_viewed" : {
        "case0": {
          "head": [
            "{| class=\"wikitable\" style=\"margin:auto\"          ",
            "|-                                                    ",
            "!          記事          !!      最終アクセス日時     "
          ],
          "record": [
            "|-                                                    ",
            "| [[{$record['title']}]] || [[{$record['datetime']}]] "
          ],
          "foot": [
            "|}"
          ]
        }
      }
    }
  }
  <!-- /AccessLog -->