Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Parameter name

Type

Required

Description

datasourceName

string

yes

The datasource Datasource name or JNDI name. For JIRA Jira database, this is set to "jdbc/JiraDS" by default.

sqlstring

string

yes

the SQL string.

Starting with katl-commons 2.5.8, the routine accepts multiple parameters, in this case the sql statement being pushed as prepared into the database (check the second example below for right syntax). The old syntax is still functional too.

...

Code Block
struct Person {
  string fName;
  string lName;
  number age;
}

Person [] results = sql("datasourceName", "SELECT fName, lName, age FROM person WHERE group_member = 'Y'");

//checks to see if there are results there are skipped for brevity, but
//now you can iterate over and use the dot notation, and 'age' is really a number.
string firstResult = results[0].fName + " " + results[0].lName + " " + results[0].age;

 

Notes

Note

To see how you should configure the data source, check the corresponding configuration chapter: SQL data sources configuration chapter.

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "sql_support"
labelssql_support

...