QScript SQLSummaryTableDataSource

From Q
Jump to navigation Jump to search

This is only available in Displayr.

SQLSummaryTableDataSource

Represents a SQL connection in the document. A SQL connection appears as a top-level summary table data source and contains one or more SQL queries.

equals(obj)

Whether two objects are the same.
objThe object to compare against.
Returns:true or false
Example:
data_file.getQuestionByName('Q2').equals(data_file.questions()[0])

error

Errors associated with this item as a string. Returns null if there are no errors. Warnings are excluded. Errors only surface on individual tables (Excel tables, SQL tables, summary tables); workbooks, worksheets, queries and SQL connections return null.

getQueryByName(name)

Finds a SQL query by name.
nameThe name of the query.
Returns:A SQLSummaryTableQuery object, or null if no matching query exists.

guid

Get the internal identifier for this SQL connection, which is unique for all items in the document.

name

Get/set the name of this SQL connection.

queries

Gets an array containing all SQL queries under this connection. The first query is [0].

referenceName

Get/set the reference name for this item, used to refer to it in the source code of other items. Setting is only supported on individual tables (Excel tables, SQL tables, summary tables); on workbooks, worksheets, SQL queries and SQL connections the setter is a silent no-op.

subItems

Returns an array containing all SQL queries under this connection.

type

Returns SQLSummaryTableDataSource.