Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [ENSLIB] >  [%SQL] >  [DynamicStatement]
Private  Storage   

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


Prepare findStatement swap


• classmethod Prepare(pStatementId As %String = "", ByRef pStatementText As %RawString = "", pStatementImports As %RawString = "", pSchemaPath As %RawString = "", 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 pObjectMode : Object Select Mode pDialect : The statement dialect, CACHE, MSSQL[SERVER], Sybase;
• classmethod findStatement(pStatementLR, pStatementImports As %RawString = "", pSchemaPath As %RawString = "", 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
• classmethod swap(extent, irn, exp, visited)

Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.