[Top] [Prev] [Next] [Bottom] [Contents]

SgeSetCallDetail

Sets caching and index values and options for an allocated data structure which is used to execute a stored procedure or DSQL object. This function is used in generating Sapphire/Web code and probably will not be used by application programmers. It is documented here so that you can understand Sapphire/Web generated code.

Synopsis

#include "WorkingDialog.h"
void SgeSetCallDetail(pSgeWorkCallData p, int cache_flag, 
								void* cache_key, int index_type, 
								void* index_value, void* 
index_key, 
								int queue_file_flag);

Arguments

p
An allocated pSgeWorkCallData structure.
cache_flag
Specifies whether the data is read from a cache item, from the database server, or whether the data is sent to cache.
cache_key
Specifies a unique cache key to write to or read from cache.
index_type
Specifies what kind of index type to use.
index_value
A value for an index.
index_key
Which index on that cache to use.
queue_file_flag
For future use.

Return Values

None.

Description

SgeSetCallDetail sets caching and index values and options for an allocated pSgeWorkCallData structure.

If p is NULL, no action is taken.

The parameter cache_flag specifies how the cache is used.Valid values are given by the defined constants:

NO_CACHE
TO_CACHE
FROM_CACHE
These indicate the cache is not used and the stored procedure or DSQL object is run on the database server, the stored procedure or DSQL object is run on the database server and stored in the cache, or the data is retrieved from the client's cache and not run on the Server, respectively.

The parameter cache_key specifies which cache to use. If NULL, the stored procedure or DSQL object triplet determines the cache. This is not used if NO_CACHE is specified as the cache_flag.

The parameter index_type specifies what kind of index to use for FROM_CACHE operations. Valid values are given by the defined constants:

ROW_INDEX (specifies row number, 0 relative)
WIDGET_INDEX (the widget determines and updates index value)
NEXT_INDEX (increment index value)
PREV_INDEX (decrement index value)
PAGEUP_INDEX (decrement index value by page size)
PAGEDW_INDEX (increment index value by page size)
HOME_INDEX (set index value to 0)
LAST_INDEX (set index value to number of rows in cache minus 1).
The index_value is interpreted and used according to the index type. For a ROW_INDEX, the value is the row desired. For a WIDGET_INDEX, the value must be a valid Widget or NULL. For PAGEUP_INDEX and PAGEDOWN_INDEX, the value specifies the page size. If the page size is not greater than 1, a default of 20 is used. For the other index types, the index value is not used.

The parameter index_key specifies which index or iterator for that cache item. Multiple indices are possible. The queue_file_flag is not yet implemented. Valid constants are:

NO_QUEUE_FILE
QUEUE_TO_FILE
If this function is not used then NO_CACHE and NO_QUEUE_FILE are used and the remaining are not used when executing the stored procedure or DSQL object.

Example

pSgeWorkCallData pSgeWCD;
....
SgeSetCallDetail(pSgeWCD, FROM_CACHE, 0, ROW_INDEX, 2, 0, 
NO_QUEUE_FILE);

See Also



[Top] [Prev] [Next] [Bottom] [Contents]

info@bluestone.com
Copyright © 1997, Bluestone. All rights reserved.