SIMPOL Documentation

Chapter 89. sql1

This is the main interface to the SQL92 query engine for running reports against SIMPOL databases (both SBME and PPCS). The sqlq1 type is used to create and run queries.

sqlq1

Description

Type Tags

sqlq1

Object Value

Objects of type sqlq1 have no value, and it is an error to try to get or set this value.

sqlq1.new()

Description

Prototype

sqlq1.new ( sqlq1 me )

Parameters

ParameterDefault valueType nameDescription
meNonesqlq1

Properties

PropertyTypeDescription
__createcolumnnodetreesfunction
__createkeywordsfunction
__createnodetreefunction
__makeplanfunction
__preparecolumnarrayfunction
__tokenizeclausefunction
adddb1tablefunction
clearsettingsfunction
columnsarray
defdisplayformatsarray
filterfalseboolean
findcolumndatatypefunction
findcolumnsourcefunction
firstcolumn__sql__column
firstsql1tablesql1_table
firstsqltable__sql__table
getcolumncountfunction
getcolumndatatypefunction
getcolumndisplayformatfunction
getcolumntableandfieldnamesfunction
getcolumntitlefunction
getcolumnvaluefunction
getrowfunction
gettableindexfunction
gotallrowsboolean
gotrowboolean
hastablefunction
keywordsarray
lastsql1tablesql1_table
newfunction
nulliszeroboolean
preparefunction
preparedboolean
q1piq1planinst
retrieverecordfunction
selectclausestring
selecttokensarray
setcolumndisplayformatfunction
setdefaultformatsfunction
setnulliszerofunction
setselectclausefunction
setwhereclausefunction
sqlnode__sql__parsetreenode
typetype
whereclausestring
wheretokensarray

Methods

__createcolumnnodetrees()

Description

Prototype

sqlq1var.__createcolumnnodetrees ( sqlq1 me, array tokens, __sql__table firstsqltable, string errormessage, integer errorindex )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
tokensNonearray
firstsqltableNone__sql__table
errormessageNonestring
errorindexNoneinteger

__createkeywords()

Description

Prototype

sqlq1var.__createkeywords ( sqlq1 me )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1

__createnodetree()

Description

Prototype

sqlq1var.__createnodetree ( sqlq1 me, array tokens, __sql__table firstsqltable, __sql__column firstcolumn, string errormessage, integer errorindex )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
tokensNonearray
firstsqltableNone__sql__table
firstcolumnNone__sql__column
errormessageNonestring
errorindexNoneinteger

__makeplan()

Description

Prototype

sqlq1var.__makeplan ( sqlq1 me, __sql__table firstsqltable, __sql__parsetreenode sqlnode, __sql__column firstcolumn )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
firstsqltableNone__sql__table
sqlnodeNone__sql__parsetreenode
firstcolumnNone__sql__column

__preparecolumnarray()

Description

Prototype

sqlq1var.__preparecolumnarray ( sqlq1 me )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1

__tokenizeclause()

Description

Prototype

sqlq1var.__tokenizeclause ( sqlq1 me, string clause, array tokens, string clausename, string errormessage, integer errorindex )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
clauseNonestring
tokensNonearray
clausenameNonestring
errormessageNonestring
errorindexNoneinteger

adddb1table()

Description

Prototype

sqlq1var.adddb1table ( sqlq1 me, type(db1table) table, string aliasname )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
tableNonetype(db1table)
aliasnameNonestring

clearsettings()

Description

Prototype

sqlq1var.clearsettings ( sqlq1 me, boolean gotrow, boolean gotallrows, boolean prepared )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
gotrow.falseboolean
gotallrows.falseboolean
prepared.falseboolean

findcolumndatatype()

Description

Prototype

sqlq1var.findcolumndatatype ( sqlq1 me, integer colno )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
colnoNoneinteger

findcolumnsource()

Description

Prototype

sqlq1var.findcolumnsource ( sqlq1 me, integer colno )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
colnoNoneinteger

getcolumncount()

Description

Prototype

sqlq1var.getcolumncount ( sqlq1 me )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1

getcolumndatatype()

Description

Prototype

sqlq1var.getcolumndatatype ( sqlq1 me, integer colno, string errormessage )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
colnoNoneinteger
errormessageNonestring

getcolumndisplayformat()

Description

Prototype

sqlq1var.getcolumndisplayformat ( sqlq1 me, integer colno, string errormessage )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
colnoNoneinteger
errormessageNonestring

getcolumntableandfieldnames()

Description

Prototype

sqlq1var.getcolumntableandfieldnames ( sqlq1 me, integer colno, string tablename, string fieldname, string errormessage )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
colnoNoneinteger
tablenameNonestring
fieldnameNonestring
errormessageNonestring

getcolumntitle()

Description

Prototype

sqlq1var.getcolumntitle ( sqlq1 me, integer colno, string errormessage )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
colnoNoneinteger
errormessageNonestring

getcolumnvalue()

Description

Prototype

sqlq1var.getcolumnvalue ( sqlq1 me, integer colno, string errormessage )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
colnoNoneinteger
errormessageNonestring

getrow()

Description

Prototype

sqlq1var.getrow ( sqlq1 me, string errormessage, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
errormessageNonestring
errorNoneinteger

gettableindex()

Description

Prototype

sqlq1var.gettableindex ( sqlq1 me, string tablename )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
tablenameNonestring

hastable()

Description

Prototype

sqlq1var.hastable ( sqlq1 me, string tablename )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
tablenameNonestring

prepare()

Description

Prototype

sqlq1var.prepare ( sqlq1 me, string errormessage, integer errorindex )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
errormessageNonestring
errorindexNoneinteger

retrieverecord()

Description

Prototype

sqlq1var.retrieverecord ( sqlq1 me, integer tableindex, string errormessage )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
tableindex1integer
errormessageNonestring

setcolumndisplayformat()

Description

Prototype

sqlq1var.setcolumndisplayformat ( sqlq1 me, integer colno, string displayformat, string errormessage )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
colnoNoneinteger
displayformatNonestring
errormessageNonestring

setdefaultformats()

Description

Prototype

sqlq1var.setdefaultformats ( sqlq1 me, string defnumberformat, string defdateformat, string deftimeformat, string defdatetimeformat, string defintegerformat, string defbooleanformat )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
defnumberformatNonestring
defdateformatNonestring
deftimeformatNonestring
defdatetimeformatNonestring
defintegerformatNonestring
defbooleanformatNonestring

setnulliszero()

Description

Prototype

sqlq1var.setnulliszero ( sqlq1 me, boolean nulliszero )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
nulliszero.trueboolean

setselectclause()

Description

Prototype

sqlq1var.setselectclause ( sqlq1 me, string selectclause, string errormessage, integer errorindex )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
selectclauseNonestring
errormessageNonestring
errorindexNoneinteger

setwhereclause()

Description

Prototype

sqlq1var.setwhereclause ( sqlq1 me, string whereclause, string errormessage, integer errorindex )

Parameters
ParameterDefault valueType nameDescription
meNonesqlq1
whereclauseNonestring
errormessageNonestring
errorindexNoneinteger