Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding text table

  • Loading branch information...
commit 37382ce16afd186709002f2ccc93eb96e376930b 1 parent 0fc8cff
@sh1mmer sh1mmer authored
Showing with 37 additions and 0 deletions.
  1. +37 −0 text/text.text.xml
View
37 text/text.text.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
+ <meta>
+ <sampleQuery>select * from {table} where text.key1 = "http://farm" and text.key3 = ".static.flickr.com/" and text.key5 = "/" and text.key7 = "_" and text.key9 = ".jpg" and (text.key2, text.key4, text.key6, text.key8) in (select farm, server, id, secret from flickr.photos.search where text = "fish");</sampleQuery>
+ <author>Tom Hughes-Croucher (@sh1mmer) croucher@yahoo-inc.com</author>
+ </meta>
+ <bindings>
+ <select itemPath="" produces="XML">
+ <urls>
+ <url></url>
+ </urls>
+ <inputs>
+ <map id='text' type='xs:string' paramType='variable' required="true" />
+ </inputs>
+ <execute><![CDATA[
+ var results = "";
+ var keys = [];
+
+ for (k in text) {
+ keys.push(k);
+ }
+
+ keys.sort();
+
+ for (var i=0;i<keys.length;i++) {
+ key = keys[i];
+ value = text[key];
+ results += value;
+ }
+
+ results = <text>{results}</text>;
+
+ response.object = results;
+ ]]></execute>
+ </select>
+ </bindings>
+</table>
Please sign in to comment.
Something went wrong with that request. Please try again.