Browse Source

Sql feeds to search function

HelloZeroNet 8 years ago
parent
commit
c8e2c75eae
1 changed files with 4 additions and 0 deletions
  1. 4 0
      dbschema.json

+ 4 - 0
dbschema.json

@@ -60,5 +60,9 @@
 			"indexes": ["CREATE INDEX post_vote_post_id ON post_vote(post_id)", "CREATE INDEX post_vote_json_id ON post_vote(post_id)"],
 			"schema_changed": 1426195826
 		}
+	},
+	"feeds": {
+		"Comments": "SELECT 'comment' AS type, date_added, post.title AS title, keyvalue.value || ': ' || comment.body AS body, '?Post:' || comment.post_id || '#Comments' AS url FROM comment LEFT JOIN json USING (json_id) LEFT JOIN json AS json_content ON (json_content.directory = json.directory AND json_content.file_name='content.json') LEFT JOIN keyvalue ON (keyvalue.json_id = json_content.json_id AND key = 'cert_user_id') LEFT JOIN post ON (comment.post_id = post.post_id)",
+		"Posts": "SELECT post_id AS event_uri, 'post' AS type, date_published AS date_added, title AS title, body AS body, '?Post:' || post_id AS url FROM post"
 	}
 }