abstract class %SQL.DynamicStatement
This is the Dynamic Statement Library Manager class. It implements the cached
statement LookupCache method and automatically dispatches to generate a new
cached statement implementation if an existing statement implementation is not found.
Parameters
|
Properties
|
Methods
|
Queries
|
Indices
|
ForeignKeys
|
Triggers
|
|
|
5
|
|
|
|
|
classmethod Prepare(pStatementId As %String = "", ByRef pStatementText As %CacheString = "", pStatementImports As %CacheString = "", pSchemaPath As %CacheString = "", ByRef pStatementHash As %Binary = "", ByRef pStatementType As %Library.Integer, pObjectMode As %Library.Boolean = 0, pDialect As %Library.String = "", pStatement As %SQL.Statement = $$$NULLOREF)
as %Library.ObjectHandle
Prepare() - this method must be invoked within a try/catch bas it throws an exception.
This method is responsible for accepting an SQL statement and preparing an implementation of that statement.
The implementation is an instance of a class that is a subclass of the statement type class (CURSOR = result set, non-cursor is a simple statement class, etc)
The first task of prepare is to lookup the statement in the prepared statement cache by calling findStatement.
Parameters:
pStatementId
pStatementText
pStatementImports
pSchemaPath : this is a comma delimited list of schema names. Generic tokens such as CURRENT_PATH and CURRENT_SCHEMA have been replaced with actual names
pStatementHash : the hash key computed from the prequalifiers and the statement text (pStatementText)
pStatementType : the integer identifying the type of statement contained in pStatementText
classmethod findStatement(pStatementLR, pStatementImports As %CacheString = "", pSchemaPath As %CacheString = "", ByRef pTableList As %Library.List = "", ByRef pStatementHash As %Binary = "", ByRef pStatementType As %Integer = 99, pObjectMode As %Library.Boolean = 0, pDialect As %Library.String = "", pStatement As %SQL.Statement)
as %String