Module: WikiAvro::Avro

Defined in:
lib/wikiavro/avro.rb

Defined Under Namespace

Classes: AvroWriter, LqtWriter, NamespaceWriter, PageWriter, RevisionWriter

Constant Summary collapse

NAMESPACE_SCHEMA =
"{\n  \"namespace\": \"org.rationalwiki\",\n  \"name\": \"Namespace\",\n  \"type\": \"record\",\n  \"fields\": [\n    {\"name\": \"key\", \"type\": \"int\"},\n    {\"name\": \"case\", \"type\": \"string\"},\n    {\"name\": \"name\", \"type\": \"string\"}\n  ]\n}\n"
PAGE_SCHEMA =
"{\n  \"namespace\": \"org.rationalwiki\",\n  \"name\": \"Page\",\n  \"type\": \"record\",\n  \"fields\": [\n    {\"name\": \"id\", \"type\": \"long\"},\n    {\"name\": \"ns\", \"type\": \"long\"},\n    {\"name\": \"title\", \"type\": \"string\"},\n    {\"name\": \"redirect\", \"type\": [\"null\", \"string\"]},\n    {\"name\": \"sha1\", \"type\": [\"null\", \"string\"]}\n  ]\n}\n"
REVISION_SCHEMA =
"{\n  \"namespace\": \"org.rationalwiki\",\n  \"name\": \"Revision\",\n  \"type\": \"record\",\n  \"fields\": [\n    {\"name\": \"id\", \"type\": \"long\"},\n    {\"name\": \"page_id\", \"type\": \"long\"},\n    {\"name\": \"n\", \"type\": \"long\"},\n    {\"name\": \"timestamp\", \"type\": \"string\"},\n    {\"name\": \"contributor\", \"type\": [\"null\", {\n      \"namespace\": \"org.rationalwiki\",\n      \"name\": \"Contributor\",\n      \"type\": \"record\",\n      \"fields\": [\n  {\"name\": \"id\", \"type\": [\"null\", \"long\"]},\n  {\"name\": \"username\", \"type\": [\"null\", \"string\"]},\n  {\"name\": \"ip\", \"type\": [\"null\", \"string\"]}\n      ]\n    }]},\n    {\"name\": \"minor\", \"type\": \"boolean\"},\n    {\"name\": \"comment\", \"type\": [\"null\", {\n      \"namespace\": \"org.rationalwiki\",\n      \"name\": \"Comment\",\n      \"type\": \"record\",\n      \"fields\": [\n  {\"name\": \"comment\", \"type\": [\"null\", \"string\"]}\n      ]\n    }]},\n    {\"name\": \"bytes\", \"type\": \"long\"},\n    {\"name\": \"textid\", \"type\": [\"null\", \"string\"]},\n    {\"name\": \"text\", \"type\": [\"null\", \"string\"]}\n  ]\n}\n"
LQT_SCHEMA =
"{\n  \"namespace\": \"org.rationalwiki\",\n  \"name\": \"Threading\",\n  \"type\": \"record\",\n  \"fields\": [\n    {\"name\": \"subject\", \"type\": \"string\"},\n    {\"name\": \"parent\", \"type\": [\"null\", \"long\"]},\n    {\"name\": \"ancestor\", \"type\": [\"null\", \"long\"]},\n    {\"name\": \"page\", \"type\": \"string\"},\n    {\"name\": \"id\", \"type\": \"long\"},\n    {\"name\": \"summary_page\", \"type\": [\"null\", \"string\"]},\n    {\"name\": \"author\", \"type\": \"string\"},\n    {\"name\": \"edit_status\", \"type\": \"string\"},\n    {\"name\": \"type\", \"type\": \"string\"},\n    {\"name\": \"signature\", \"type\": [\"null\", \"string\"]}\n  ]\n}\n"