CellSpace/Manual (draft)
by CellWorks
Home
  
Table of Contents
  
Glossary
Queries
Queries
define a set of extracted from an
enterprise database
query.
  • Queries
    are used to inject enterprise data into the model.
  • The SQL SELECT and CALL statements are supported.
  • Any stored procedure that are executed must be 'read-only'.
  • INSERT, UPDATE, DELETE and the other 'write' SQL statements are not supported.
  • Queries
    are referenced in , or .
  • Queries
    are often wrapped by that pre-process arguments and aggregate`results.
  • For example a function named TotalDeposits with the parameters (year, month day) is written as:
  • 	var total = 0
    	for (MyRecord transaction: MyTransactionsQuery(Date(year, month, day))) {
    		if (transaction.isDeposit) {
    			total = total + transaction.amount
    		}
    	}
    	return total
  • It is important to note that the appropriate and a must be available before a
    Query
    is created.
  • A may support many
    Queries
    and a can be used with different
    Queries
    .
  • See the
    New
    -->
    Add
    Query
    to '
    Folder
    '
    menu item.
  • See .