Created
January 23, 2015 19:36
-
-
Save maiamcc/f37909d7524a2353ce4a to your computer and use it in GitHub Desktop.
favourite query...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@staticmethod | |
def songs(where_clause): | |
query = ''' | |
SELECT DISTINCT | |
rdf:type(?song) | |
tracker:id(?song) AS id | |
nie:url(?song) AS url | |
nie:title(?song) AS title | |
nmm:artistName(nmm:performer(?song)) AS artist | |
nie:title(nmm:musicAlbum(?song)) AS album | |
nfo:duration(?song) AS duration | |
"true"^^xsd:boolean AS favourite | |
{ | |
%(where_clause)s | |
FILTER ( | |
... | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment