Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

this table only can work in the yql console but it would allow a user…

… to delete a maximum of 5000 posts ,or as many posts under 5000 within 30 seconds, from their yahoo meme.
  • Loading branch information...
commit 5413cc8b9d8bf1a8886705feeb031e65473e3df9 1 parent 2ab20c3
@houyhnhnm authored
Showing with 57 additions and 0 deletions.
  1. +57 −0 hmeme/hmeme.delete.xml
View
57 hmeme/hmeme.delete.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd" securityLevel="any">
+ <meta>
+ <author>HOUYHNHNM</author>
+ <description> Deletes multiple entries from your Meme account NOTE: count is default maximum allowed 5000 entries or as many within 30 seconds under 5000</description>
+ <documentationURL></documentationURL>
+ <sampleQuery>select * from {table} where count="The number of entries to be deleted"</sampleQuery>
+ </meta>
+ <bindings>
+ <select itemPath="" produces="XML">
+ <inputs>
+ <key id='count' type='xs:string' paramType='variable' required="false"/>
+ </inputs>
+ <execute>
+ <![CDATA[
+
+
+ var str1="SELECT * FROM meme.posts(0";
+ var str3="WHERE owner_guid=me;";
+ if(count)
+ {
+ str1=str1.concat(",",count,") ",str3);
+ }
+ else
+ {
+ str1=str1.concat(") ",str3);
+ }
+ var yqlquery=y.query(str1);
+ var yqlresults=yqlquery.results;
+ var yqlcounter=parseInt(yqlresults.post.length());
+ var index=0;
+ var xmlret=new XML();
+ xmlret=<root><count>{yqlcounter}</count></root>;
+ var pvar;
+ var str2="DELETE FROM meme.user.posts WHERE pubid = \"";
+ var yqlquery2;
+ var yqlresults2;
+ while(index<yqlcounter)
+ {
+ pvar=yqlresults.post[index].pubid;
+ yqlquery2=y.query(str2.concat(pvar,"\""));
+ yqlresults2=yqlquery2.results;
+
+ xmlret.root+=<returnvalues>
+ <index>{index+1}</index>
+ <code>{yqlresults2.status.code}</code>
+ <message>{yqlresults2.status.message}</message>
+ </returnvalues>
+
+ index++;
+ }
+ response.object=xmlret;
+ ]]>
+ </execute>
+ </select>
+ </bindings>
+</table>

1 comment on commit 5413cc8

@houyhnhnm
Owner

Can someone please tell me how to delete a commit or do it for me please. I am having an issue figuring out how to do it myself

Please sign in to comment.
Something went wrong with that request. Please try again.