{
  "db_name": "SQLite",
  "query": "SELECT t.did AS \"did!\", t.rkey AS \"rkey!\", t.uri AS \"uri!\", t.cid AS \"cid!\",\n                      t.name AS \"name!\", t.summary, t.license AS \"license!\", t.tags_json, t.cover_json,\n                      t.derived_from_uri, t.created_at AS \"created_at!\", t.indexed_at AS \"indexed_at!\",\n                      t.record_json,\n                      COALESCE(cs.like_count, 0) AS \"like_count!: i64\",\n                      COALESCE(cs.save_count, 0) AS \"save_count!: i64\",\n                      (SELECT COUNT(*) FROM thing_models tm WHERE tm.thing_uri = t.uri) AS \"model_count!: i64\",\n                  (SELECT COUNT(*) FROM thing_models tm JOIN model_parts mp ON mp.model_uri = tm.model_uri WHERE tm.thing_uri = t.uri) AS \"part_count!: i64\"\n               FROM things t LEFT JOIN content_stats cs ON cs.uri = t.uri\n               WHERE t.did = ? AND (? IS NULL OR t.rkey < ?) ORDER BY t.rkey DESC LIMIT ?",
  "describe": {
    "columns": [
      {
        "name": "did!",
        "ordinal": 0,
        "type_info": "Text",
        "origin": {
          "Table": {
            "table": "things",
            "name": "did"
          }
        }
      },
      {
        "name": "rkey!",
        "ordinal": 1,
        "type_info": "Text",
        "origin": {
          "Table": {
            "table": "things",
            "name": "rkey"
          }
        }
      },
      {
        "name": "uri!",
        "ordinal": 2,
        "type_info": "Text",
        "origin": {
          "Table": {
            "table": "things",
            "name": "uri"
          }
        }
      },
      {
        "name": "cid!",
        "ordinal": 3,
        "type_info": "Text",
        "origin": {
          "Table": {
            "table": "things",
            "name": "cid"
          }
        }
      },
      {
        "name": "name!",
        "ordinal": 4,
        "type_info": "Text",
        "origin": {
          "Table": {
            "table": "things",
            "name": "name"
          }
        }
      },
      {
        "name": "summary",
        "ordinal": 5,
        "type_info": "Text",
        "origin": {
          "Table": {
            "table": "things",
            "name": "summary"
          }
        }
      },
      {
        "name": "license!",
        "ordinal": 6,
        "type_info": "Text",
        "origin": {
          "Table": {
            "table": "things",
            "name": "license"
          }
        }
      },
      {
        "name": "tags_json",
        "ordinal": 7,
        "type_info": "Text",
        "origin": {
          "Table": {
            "table": "things",
            "name": "tags_json"
          }
        }
      },
      {
        "name": "cover_json",
        "ordinal": 8,
        "type_info": "Text",
        "origin": {
          "Table": {
            "table": "things",
            "name": "cover_json"
          }
        }
      },
      {
        "name": "derived_from_uri",
        "ordinal": 9,
        "type_info": "Text",
        "origin": {
          "Table": {
            "table": "things",
            "name": "derived_from_uri"
          }
        }
      },
      {
        "name": "created_at!",
        "ordinal": 10,
        "type_info": "Integer",
        "origin": {
          "Table": {
            "table": "things",
            "name": "created_at"
          }
        }
      },
      {
        "name": "indexed_at!",
        "ordinal": 11,
        "type_info": "Integer",
        "origin": {
          "Table": {
            "table": "things",
            "name": "indexed_at"
          }
        }
      },
      {
        "name": "record_json",
        "ordinal": 12,
        "type_info": "Text",
        "origin": {
          "Table": {
            "table": "things",
            "name": "record_json"
          }
        }
      },
      {
        "name": "like_count!: i64",
        "ordinal": 13,
        "type_info": "Integer",
        "origin": "Expression"
      },
      {
        "name": "save_count!: i64",
        "ordinal": 14,
        "type_info": "Integer",
        "origin": "Expression"
      },
      {
        "name": "model_count!: i64",
        "ordinal": 15,
        "type_info": "Integer",
        "origin": "Expression"
      },
      {
        "name": "part_count!: i64",
        "ordinal": 16,
        "type_info": "Integer",
        "origin": "Expression"
      }
    ],
    "parameters": {
      "Right": 4
    },
    "nullable": [
      false,
      false,
      false,
      false,
      false,
      true,
      false,
      true,
      true,
      true,
      false,
      false,
      true,
      false,
      false,
      false,
      false
    ]
  },
  "hash": "4cefaf929713ed0fc4c580c56bfc02b836d301622afe5171a96f8fe1fdb86516"
}
