📄 atlrt.h
字号:
// then any results of the stored procedure will be stored by a default name. Specifiying more than one value for 'results' implies
// that the stored procedure will return multiple results.
//
// 'params' is used to pass parameters to the stored procedures. Parameters values are take from the same places as {{GetValue}} or
// are used as literal values, if surrounded by single quotes. For example, if params is specified as follows:
//
// params=name, 'testing'
//
// 'name' would be considered a variable, and its value would be resolved from the same places as {{GetValue}}
// (variable map, request param, server variables). 'testing' is surrounded by single quotes, so it's literal
// value will be passed to the stored procedure.
//
// 'output_params' are use to name any output parameters that the stored procedure my return. The values will
// be stored in the variable map.
[ tag_name(name="Execute")]
HTTP_CODE OnExecute(TCHAR *szArgs);
// Tag Syntax: {{MoveNextRow([result name])}}
// Description:
// Execute has to be called before calling MoveNextRow. Results from executing a stored procedure
// are stored in tables. MoveNextRow advances the current row in the table. 'result name' is an
// optional parameter specifying what result to advance. MoveNextRow has no replacement value, but
// it will return boolean depending on whether there are more rows in the results or not. MoveNextRow
// should be used in a {{while}} or {{if}} statement.
[ tag_name(name="MoveNextRow")]
HTTP_CODE OnMoveNextRow(TCHAR *szArgs);
// Tag Syntax: {{MoveNextColumn([result name])}}
// Description:
// Execute has to be called before calling MoveNextColumn. MoveNextColumn moves over the column values
// stored in the results of executing a stored procedure. 'result name' is an optional parameter
// specifying what column to advance. MoveNextColumn has no replacement value, but
// it will return boolean depending on whether there are more columns in the current row or not. MoveNextColumn
// should be used in a {{while}} or {{if}} statement.
[ tag_name(name="MoveNextColumn")]
HTTP_CODE OnMoveNextColumn(TCHAR *szArgs);
// Tag Syntax: {{GetColumnValue([result name] |
// [name=value] |
// [name=value;column=col] |
// column index)}}
// Description:
// Execute has to be called before calling GetColumnValue. GetColumnValue is used to get the
// value of a specific column from a set of results. The parameters to GetColumnValue determine
// which column is used. The following are the possible ways to call GetColumnValue:
//
// {{GetColumnValue()}}
// - Use the default result name and the current column
// value stored for that result.
//
// {{GetColumnValue(name=value)}}
// - Use the specified result name and the current
// value stored for that result
//
// {{GetColumnValue(name=value;column=col)}}
// - Use the specified result name and the
// specified column value.
//
// {{GetColumnValue(column index)}}
// - Use the default result name and the specified column
// value
[ tag_name(name="GetColumnValue")]
HTTP_CODE OnGetColumnValue(TCHAR *szArgs);
// Tag Syntax: {{SaveColumnValue([name=result name;column=column index;save_as=save as name] |
// [name=result name;column=column index] |
// [save_as=save as name] |
// [column=column index;save_as=save as name])}}
// Description:
// Execute has to be called before calling SaveColumnValue. SaveColumnValue is
// similiar to GetColumnValue except that it will store the specified column value
// into the variable map. The following are the possible ways to call SaveColumnValue:
//
// {{SaveColumnValue(name=result name;column=column index;save_as=save as name)}}
// - Use the result specified by 'result name' and the column specified by 'column index'
// and save that value into the variable map under the name 'save as name'.
//
// {{SaveColumnValue(name=result name;column=column index)}}
// - Use the result specified by 'result name' and the column specified by 'column index'
// and save the value into the variable map under the name 'result name'
//
// {{SaveColumnValue()}}
// - Use the default result name, current column and save that value into the variable map
// under the default result name
//
// {{SaveColumnValue(save_as=save as name)}}
// - Use the default result name, the current column and save that value into the variable map
// under the name specified by 'save as name;.
//
// {{SaveColumnValue(column=column index;save_as=save as name)}}
// - Use the default result name, the column specified by 'column index' and save that value into
// the variable map under the name specified by 'save as name'.
[ tag_name(name="SaveColumnValue")]
HTTP_CODE OnSaveColumnValue(TCHAR *szArgs);
// Tag Syntax: {{GetRowNumber([result name])}}
// Description:
// Execute has to be called before calling GetRowNumber. GetRowNumber is replaced by the row number
// of the current row. 'result name' is optional and can be used to specify the result from which to get the
// row number. The default result name is used if this parameter is not specified.
[ tag_name(name="GetRowNumber")]
HTTP_CODE OnGetRowNumber(TCHAR *szArgs);
// Tag Syntax: {{GetColumnNumber([result name])}}
// Description:
// Execute has to be called before calling GetColumnNumber. GetColumnNumber is replaced by the column number
// of the current column. 'result name' is optional and can be used to specify the result from which to get the
// column number. The default result name is used if this parameter is not specified.
[ tag_name(name="GetColumnNumber")]
HTTP_CODE OnGetColumnNumber(TCHAR *szArgs);
// Tag Syntax: {{ResetResults([result name])}}
// Description:
// Execute has to be called before calling ResetResults. ResetResults is used to reset the current row and
// column number of a result. 'result name' can be used to specify the result. The default name is used if
// this parameter is not specified.
[ tag_name(name="ResetResults")]
HTTP_CODE OnResetResults(TCHAR *szArgs);
// Tag Syntax: {{CloseResults([result name])}}
// Description:
// Execute has to be called before calling CloseResults. CloseResults is used to erase the values of a result.
// 'result name' can be used to specify the result. The default name is used if
// this parameter is not specified.
[ tag_name(name="CloseResults")]
HTTP_CODE OnCloseResults(TCHAR *szArgs);
// Tag Syntax: {{RowCount([result name])}}
// Description:
// Execute has to be called before calling RowCount. RowCount is replaced by the number of rows in a result.
// 'result name' can be used to specify the result. The default name is used if
// this parameter is not specified.
[ tag_name(name="RowCount")]
HTTP_CODE OnRowCount(TCHAR *szArgs);
/////////////////////////////////////////////////////////////////////
// HTTP Operations
/////////////////////////////////////////////////////////////////////
// Tag Syntax: {{SetContentType(<content type>)}}
// Description:
// SetContentType is used to emit a Content-Type: <content-type> header into the response stream. This tag
// lets you specify the type of document you want to generate.
[ tag_name(name="SetContentType")]
HTTP_CODE OnSetContentType(TCHAR *szContentType);
private:
StringMap *m_variableMap;
StringMap *m_connectionMap;
CmdResultsMap m_resultsMap;
// blob cache support
CComPtr<IMemoryCache> m_spBinaryCache;
// data source cache support
CComPtr<IDataSourceCache> m_spDataSrcCache;
// utility functions
LPCSTR _GetValue(CStringA& szName);
bool _CheckForResults(CString& resultsName);
int _ResolveParameters(Params params, StringList& values);
}; // class CatlrtHandler
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -