Changes for page Blockly Editor
Last modified by Admin on 2022/02/21 00:26
Change comment:
There is no comment for this version
Summary
-
Objects (1 modified, 0 added, 0 removed)
Details
- ExtensionCode.ExtensionClass[0]
-
- Description
-
... ... @@ -31,6 +31,8 @@ 31 31 32 32 == Categories == 33 33 34 +There are two categories in the XML Toolbox, the default categories like logic, loops, variables, text, colour, lists etc which are there by default in the Blockly toolbox developed by Google, and the custom categories which have been added to meet XWiki-specific requirements and use cases, like macros, queries, XWiki Bindings etc 35 + 34 34 === Default Categories === 35 35 36 36 The [[blockly documentation>>https://github.com/google/blockly/wiki]] contains the documentation for the default categories such as logic (if-else), loops, variables, text, colour, lists etc ... ... @@ -37,25 +37,40 @@ 37 37 38 38 === Custom Categories === 39 39 42 +The following custom categories have been introduced: 43 + 40 40 ==== Queries ==== 41 41 42 42 {{image reference="Queries.png" |alt="The XWQL Queries category" width="150" height="395"}}{{/image}} 43 43 This category contains the following blocks: 44 44 49 + 45 45 ===== Execute Block ===== 46 46 47 47 * Takes the query string/variable as input 48 48 * Outputs $services.query.xwql(query).execute() 49 49 50 -===== Not Block =====55 +===== Select, From, Where Block ===== 51 51 52 -* The NOT operator is used to negate the predicate that follows it. 57 +* This is the main block that generates the query, and it has SELECT, FROM and WHERE clauses each of which takes arguments as input. These arguments can be constructed using the other blocks on this category. 58 +* The "SELECT" input block takes a list of attributes while "FROM" takes a list of objects to be selected "from" as input. 59 +* Where takes a boolean expression as input, which can be constructed using the AND/OR blocks and the comparison blocks, described below. 53 53 54 -===== Distinct Block =====61 +===== Arguments Block ===== 55 55 56 -* Returns only distinct, not duplicate, results 57 -* Takes an object attribute as input 63 + 58 58 65 +* Takes variable number of arguments as input, and the arguments can be added/removed by clicking the cog on the top left corner 66 +* Returns comma separated list of the arguments provided, which can be input to either the "SELECT" or the "FROM" input blocks. 67 + 68 + 69 +===== Get XObject Block ===== 70 + 71 + 72 + 73 +* Returns the specified XObject in the current document 74 +* The input is the XWiki Class Name (for example to get get the XObject of class ##XWiki.XWikiUsers##, the inputs in the two text fields will be XWiki and XWikiUsers. The code output for this example would be ##doc.object(XWiki.XWikiUsers)## 75 + 59 59 ===== Get Object Property Block ===== 60 60 61 61 * Returns the properties/attributes of an object ... ... @@ -63,11 +63,17 @@ 63 63 * For example, to get attribute ##space.name##, we do: 64 64 {{image reference="GetAttrib.png" |alt="Block to get Attribute of Object" width="350" height="91"}}{{/image}} 65 65 66 -===== GetXObjectBlock =====83 +===== Not Block ===== 67 67 68 -* Returns the specified XObject in the current document 69 -* The input is the XWiki Class Name (for example to get get the XObject of class ##XWiki.XWikiUsers##, the inputs in the two text fields will be XWiki and XWikiUsers. The code output for this example would be ##doc.object(XWiki.XWikiUsers)## 85 +* The NOT operator is used to negate the predicate that follows it. 70 70 87 +===== Distinct Block ===== 88 + 89 +* Returns only distinct, not duplicate, results 90 +* Takes an object attribute as input 91 + 92 + 93 + 71 71 == Features == 72 72 73 73 * A toolbox containing the default categories for loops, logic statements, variables, macros, math, text etc and the customly added categories for XWiki Script bindings and XWQL queries. (Check Categories section given above for more detail)