1 | ServerConnection serverConnection = new ServerConnection() |
2 | |
3 | daten = serverConnection.doSQLQuery([[select sn_id, sn_text from tb_snippet |
4 | join nt_live on sn_id=nt_snippetid |
5 | where live_retired = 0 |
6 | and author_ok(live_author) |
7 | or sql_statement_ok(sn_text) == 'definitely';]]) |
8 | |
9 | for each d in daten do |
10 | title = "Result of #"..d.sn_id; |
11 | if not serverConnection.hasNTTitle(title) then |
12 | try |
13 | result = serverConnection.doSQLQuery(d.sn_text).toJSON() |
14 | catch e |
15 | result = "Error: "..e |
16 | end |
17 | serverConnection.createNTSnippet(title, result) |
18 | end |
19 | end |
Snippet is not live.
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #2000005 |
Snippet name: | An executor for SQL statements (pseudo-code) |
Eternal ID of this version: | #2000005/1 |
Text MD5: | b29d5771ff4230a06e5140aa98f1c611 |
Author: | stefan |
Category: | |
Type: | New Tinybrain snippet |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-03-10 20:29:03 |
Source code size: | 585 bytes / 19 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 629 / 130 |
Referenced in: | [show references] |