Global

Members

sqlTestCases :Array.<TestedStatements>

Source:
Type:

Methods

SQLselfTest()

Description:
  • Runs all tests and reports back the result of the tests.

Source:

customMenuGenerateTests()

Description:
  • Expected to be run as a menu item. Runs all internal tests, collects the SQL from each test and generates a =gsSQL() string and writes it to the current active screen. Each customfunction is written in column A, starting two rows below the last row in the current sheet. Room is left after the expected results and the subsequent gsSQL() will be updated 3 rows after.

Source:

gsSQL(statement, …parms) → {Array.<Array.<any>>}

Description:
  • Query any sheet range using standard SQL SELECT syntax.

Source:
Example
gsSQL("select * from expenses where type = ?1", "expenses", A1:B, true, "travel")
Parameters:
Name Type Attributes Description
statement String

SQL string

parms any <repeatable>

"table name", SheetRange, [..."table name", SheetRange], OutputTitles (true/false), [...Bind Variable]

Returns:
  • Double array of selected data. First index ROW, Second index COLUMN.
Type
Array.<Array.<any>>

isEqual(functionName, array1, array2) → {Array.<Array.<String>>}

Description:
  • Needed by Google Sheets Testing app.

Source:
Parameters:
Name Type Description
functionName String
array1 Array.<Array.<any>>
array2 Array.<Array.<any>>
Returns:
Type
Array.<Array.<String>>

onOpen()

Description:
  • Function should be commented out when NOT running in a TEST SHEET. It will create a menu option that allows you to create a gsSQL() statement for every test SQL in TestSQL().

Source:

Type Definitions

FieldVariants

Source:
Properties:
Name Type Description
columnName String
fullColumnName String
fullColumnAliasName String
Type:
  • Object

JoinSideInfo

Source:
Properties:
Name Type Description
fieldInfo TableField
column String
Type:
  • Object

LeftRightJoinFields

Source:
Properties:
Name Type Description
leftSideInfo JoinSideInfo
rightSideInfo JoinSideInfo
Type:
  • Object

MatchingJoinRecordIDs

Source:
Properties:
Name Type Description
leftJoinRecordIDs Array.<Array.<Number>>
rightJoinRecordIDs Array.<Array.<Number>>
Type:
  • Object

ParsedSelectField

Source:
Properties:
Name Type Description
columnName String
aggregateFunctionName String
calculatedField Object
fieldDistinct String
Type:
  • Object

ResolvedFieldCondition

Source:
Properties:
Name Type Description
fieldConditionTableInfo Table
columnNumber Number

use column data from this column, unless -1.

constantData String

constant data used for column, unless null.

calculatedField String

calculation of data for column, unless empty.

subQuery CorrelatedSubQuery

use this correlated subquery object if not null.

Type:
  • Object

SelectFieldParameters

Source:
Properties:
Name Type Description
selField Object
parsedField Object
columnTitle String
nextColumnPosition Number
isTempField Boolean
Type:
  • Object