%SQL.FDW.Wrapper.SqlWrapper
class %SQL.FDW.Wrapper.SqlWrapper extends %SQL.FDW.Wrapper.BaseWrapper
FOR INTERNAL USE - do not invoke directlyMethod Inventory
Methods
method %OnNew(config As %DynamicObject) as %Status
Constructor for wrappers that would like to receive SQL statements that potentially encapsulate pushed down query
logic from the query that the corresponding foreign tables are involved in.
The config object is a JSON object containing the standard 'server' and 'table' keys. For SQL wrappers, the wrapper
execution should rely on the following special keys:
{
"sql": string, SQL text parameterized with ?
"sqlParameters": array, contains subarrays where each subarray corresponds positionally to a ? parameter in
the SQL text and represents information about that parameter. The subarrays are of the
format [type, value] where type is an integer representing the data type of that
parameter, in case relevant for binding, e.g. with Java setInt() etc binding methods.
The type values are as follows:
-7 : BOOLEAN
-6 : TINYINT (1 byte)
-5 : BIGINT
2 : NUMERIC
4 : INT (4 bytes)
5 : SMALLINT (2 bytes)
8 : DOUBLE, FLOAT, REAL
9 : DATE
10 : TIME
11 : TIMESTAMP
12 : VARCHAR (STRING)
For example a query like:
SELECT * FROM mytab WHERE myint = 10 AND mystring = 'cat'
would, aftering being parameterized, receive a parameters argument of:
[[4, 10], [12, "cat"]]
}
This method overrides the method defined in the parent BaseWrapper class and provides a default implementation
for all SQL-enabled wrappers. The default behavior is to return each period-delimited portion of the identifier
wrapped in double quotes.
Inherited Members
Inherited Properties
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OnClose()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()
- close()
- execute()
- get()
- getMetadata()
- next()
- reset()
- validateServerConfig()
- validateTableConfig()
- validateTablesConfigArray()