Sun StorageTek 5800 System Client API Reference Manual Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054 U.S.A.
Copyright 2008 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 U.S.A. All rights reserved. Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without limitation, these intellectual property rights may include one or more U.S. patents or pending patent applications in the U.S. and in other countries. U.S. Government Rights – Commercial software.
Contents Preface ...................................................................................................................................................11 1 Sun StorageTek 5800 System Client API .......................................................................................... 15 Changes in Version 1.1 ....................................................................................................................... 15 5800 System Overview .........................................
Contents 3 4 Sun StorageTek 5800 System C Client API ....................................................................................... 39 Overview of the 5800 System C Client API ...................................................................................... 39 Architecture .................................................................................................................................. 40 Interfaces ............................................................................
Contents hc_session_get_platform_result ......................................................................................... 58 hc_session_get_archive .......................................................................................................... 59 Managing a Schema ..................................................................................................................... 59 hc_schema_get_type .......................................................................................
Contents Storing Data and Metadata ......................................................................................................... 87 hc_store_both_ez ...................................................................................................................... 87 hc_store_metadata_ez .............................................................................................................. 88 hc_check_indexed_ez .........................................................................
Contents Supported Data Types ....................................................................................................................... 116 Queries ................................................................................................................................................ 117 Translating a Query to the Underlying Database ................................................................... 117 Attribute Format in Queries .....................................................
Tables TABLE 4–1 Canonical String Representation of Data Types ..................................................
Preface The Sun StorageTek 5800 System Client API Reference Manual is written for programmers and application developers who develop custom applications for the Sun StorageTekTM 5800 System. This document, along with the Sun StorageTek 5800 SystemSDK Reference Manual, provides the information that you need to develop custom applications for the 5800 system.
Preface Related Third-Party Web Site References Third-party URLs are referenced in this document and provide additional, related information. Note – Sun is not responsible for the availability of third-party web sites mentioned in this document. Sun does not endorse and is not responsible or liable for any content, advertising, products, or other materials that are available on or through such sites or resources.
Preface TABLE P–1 Typographic Conventions (Continued) Typeface Meaning Example AaBbCc123 Book titles, new terms, and terms to be emphasized Read Chapter 6 in the User's Guide. A cache is a copy that is stored locally. Do not save the file. Note: Some emphasized items appear bold online. Shell Prompts in Command Examples The following table shows the default UNIX® system prompt and superuser prompt for the C shell, Bourne shell, and Korn shell.
1 C H A P T E R 1 Sun StorageTek 5800 System Client API The SunTM StorageTekTM 5800 system client API provides programmatic access to a 5800 system server to store, retrieve, query, and delete object data and metadata. Synchronous versions are provided in C and JavaTM languages. A future release will implement a non-blocking C API for use with POSIX operations. This chapter provides a summary of the changes for the Sun StorageTek 5800 System 1.
5800 System Overview In 5800 system version 1.1, an attempt to store a value that is longer than the associated field generates an immediate error. 5800 System Overview This section provides an overviews of the 5800 system, the 5800 system history, and a summaries of the key points of the 5800 system usage model.
5800 System Overview This chapter provides a summary of key points of the 5800 system usage model that are useful for understanding either API. In the following sections, the terms from the Java API are used as an aid to exposition. In all cases, a simple equivalent using the C API is available. ■ Chapter 4, “Sun StorageTek 5800 System Query Language,” provides a detailed description of query capabilties and query syntax.
5800 System Overview Read-Multiple (WORM) archive. Each object corresponds to a single stream of data and a single set of metadata; there are no “grouped objects” or “compound objects” other than by application convention. Each object corresponds to a single stream of data and a single set of metadata. There are no “grouped objects” or “compound objects” other than by application convention. Similarly, there are no “links” or “associations“ from one object to another.
5800 System Overview The 5800 System Metadata Model Metadata means “data about the data”; it describes the data and helps to determine how the data should be interpreted. In addition, metadata can be used to facilitate querying the 5800 system for objects that match a particular set of search criteria. For the 5800 system, the supported metadata option is in the form of name-value fields stored with each object. The set of possible fields is defined in the metadata schema.
5800 System Overview The metadata associated with an object is immutable. There is no operation to modify the metadata associated with an object after the object has been stored. Instead, the storeMetadata operation can be used to create a completely new object by associating new user metadata with the underlying data and system-metadata of an existing object.
5800 System Overview Query expressions can use much of the power of Structured Query Language (SQL). Each query expression combines SQL functions and operators, field names from the metadata schema, and literal values. There are no query expressions that select objects based on the data stored in the object itself; all queries apply only to the metadata fields associated with the object. Only queryable fields can be used in query expressions.
5800 System Overview Note – The format of records as stored in the reliable and scalable object archive is not suitable for fast query. To enable searching, the queryable fields from the metadata are indexed in a query engine that can provide fast and flexible query services. The query engine is basically an SQL database. This is why the 5800 system's query language can borrow so heavily from SQL.
5800 System Overview match the original object metadata. There are no transactional guarantees regarding ordering of queries and delete operations that are occurring at the same time. If an object is being deleted at the same time that a query that matches that object is being performed, then that object may or may not show up in the query result set, with no guarantee either way.
2 C H A P T E R 2 Sun StorageTek 5800 System Java Client API This chapter provides information on the 5800 system Java client API. The following topics are discussed: ■ “Overview of the 5800 System Java Client API” on page 25 ■ “Java Client Application Deployment” on page 27 ■ “Java API” on page 27 Note – You can find detailed information on the 5800 system Java client API in the Javadocs, which are located in the java/doc/htdocs directory.
Overview of the 5800 System Java Client API The 5800 system Java client library provides a platform-independent mechanism to upload data and metadata to a 5800 system, and to retrieve and query the data and metadata. The Java client library works with any implementation of J2SETM platform 4.0 or later with HTTP connectivity to the 5800 system cluster. Access is designed to be high-level and easy to use. Most operations are accomplished in a single (synchronous) function call.
Java API Updating Client View of the Schema In the Java client API, the schema is fetched when the NameValueObjectArchive class is instantiated. If the schema has changed, the client application needs to create a new NameValueArchive. A local copy of the schema is used for some metadata operations. Java Client Application Deployment Java applications using the 5800 system Java API reference the honeycomb-client.jar library. You must include this library in your classpath when running your application.
Java API Basic Concepts The root of the 5800 system Java client API is the NameValueObjectArchive class, which represents a connection to a single 5800 system server. All operations are initiated by invoking methods on a NameValueObjectArchive instance after initializing it with the address of a cluster. The fact that a cluster of machines, rather than a single server, is handling the requests is transparent to the application programmer.
Java API ■ ■ ■ ■ “ObjectIdentifier” on page 29 “QueryResultSet” on page 30 “SystemRecord” on page 30 “NameValueRecord” on page 30 For more information on using these classes, see “Basic Concepts” on page 28. NameValueObjectArchive The NameValueObjectArchive class is the main entry point into the 5800 system. Each instance of NameValueObjectArchive provides access to a specific 5800 system server, functioning as a proxy object on which operations can be performed.
Java API later for retrieving objects. External storage can be accomplished using an identifier's string representation by invoking the toString method. An instance of ObjectIdentifier can be reconstituted using the constructor that takes String as an argument. QueryResultSet Instances of QueryResultSet provide access to the objects and metadata matching a query. The query results can be stepped through using the next method.
Java API ■ ■ ■ ■ ■ ■ ■ ■ “query (with PreparedStatement)” on page 35 “query (with PreparedStatement and selectKeys)” on page 35 “PreparedStatement” on page 36 “QueryResultSet” on page 37 “getObjectIdentifier” on page 37 “isQueryComplete” on page 37 “getQueryIntegrityTime” on page 38 “QueryIntegrityTime” on page 38 NameValueObjectArchive Initializes a new NameValueObjectArchive with the address or host name of a 5800 system server, using the provided port. Synopsis public NameValueObjectArchive(java.
Java API Synopsis public SystemRecord storeObject(java.nio.channels.ReadableByteChannel dataChannel) public SystemRecord storeObject(ReadableByteChannel dataChannel,NameValueRecord record) throws ArchiveException,IOException Description Takes a ReadableByteChannel (and an optional NameValueRecord) and returns a SystemRecord instance containing the system metadata for the new object.
Java API checkIndexed returns an int value that indicates if the metadata for this object has been inserted into the query engine. The value is -1 if the metadata was already inserted before this operation was called, 0 if the metadata has still not been inserted, or 1 if the metadata was just now inserted. retrieveObject Writes all of the data for the specified object into the provided channel, returning the amount of data actually retrieved.
Java API Synopsis public NameValueSchema getSchema() throws ArchiveException, java.io.IOException Description Returns the runtime configuration of the name-value object archive as a NameValueSchema instance. query Returns a ResultSet of SystemRecord instances containing MetadataRecord OIDs. Synopsis public QueryResultSet query(java.lang.String query,int resultsPerFetch) throws ArchiveException, java.io.
Java API Description Takes a where clause and a select clause and returns a QueryResultSet of NameValueRecord instances containing the selected values. selectKeys identifies the values to be returned, functioning as an SQL select clause. The query parameter is a where clause in the 5800 system query syntax, which is a subset of SQL. Returns a QueryResultSet. The results are stepped through by calling the next method and using the getObjectIdentifier accessor.
Java API Synopsis public QueryResultSet query(PreparedStatement query, java.lang.String[] selectKeys, int resultsPerFetch) Description Takes a where clause and a select clause and returns a QueryResultSet of NameValueRecord instances containing the selected values. selectKeys identifies the values to be returned, functioning as an SQL select clause. The PreparedStatement parameter enables queries with dynamic parameters to pass typed data items to the query. Returns a QueryResultSet.
Java API stmt.bindParameter(date_value,1); QueryResultSet qrs = archive.query(stmt); QueryResultSet The QueryResultSet class is used to page through OIDs and associated metadata returned by NameValueObjectArchive.query. See the javadoc for the getXXX methods for getting typed metadata. next Sets the QueryResultSet to point at the next record. Synopsis boolean next() Description Sets the QueryResultSet to point at the next record. Returns true if there is a next record, false if not.
Java API getQueryIntegrityTime Returns the most recent time at which all store index exceptions are known to have been resolved. Synopsis long getQueryIntegrityTime() Description The query integrity time is a time such that all store index exceptions from before that time have been resolved. There is an ideal query integrity time, which is the time of the oldest still-unresolved store index exception: an ideal implementation when asked for the query integrity time would always report this ideal value.
3 C H A P T E R 3 Sun StorageTek 5800 System C Client API This chapter provides detailed information on the 5800 system C client API.
Overview of the 5800 System C Client API Architecture The 5800 system C API client supports two different access patterns: a synchronous “EZ” access very similar to the current Java implementation, and a more flexible, nonblocking access based on the POSIX model. Note – For this release, the nonblocking C API client is not implemented. Interfaces The C client library interacts with the 5800 system server entirely through an HTTP protocol.
Overview of the 5800 System C Client API Memory Usage The 5800 system C client library generally follows the model of populating externally allocated data structures such as handles, buffers, and result arrays. Some internal data structures are generated during XML document construction. These data structures are allocated and freed using the function pointers supplied to hc_init when initializing the library (see “Initializing a Global Session” on page 41).
Overview of the 5800 System C Client API hcerr_t hc_init(allocator_t, deallocator_t, reallocator_t); This function must be called once per process to initialize the memory functions used in the 5800 system C API. It also initializes global session properties. A global session is initialized once per process, regardless of how many threads in that process are using the C API. Note – hc_init should be called once per process before any thread calls “hc_session_create_ez” on page 53.
Nonblocking C API ■ oid — The objectid for this object, equivalent to the system.object_id field. ■ digest_algo — Always set to "sha1" for this release. Equivalent to the system.object_hash_alg field. ■ data_digest — An array of bytes that represent the content digest of this object's data. Equivalent to the system.object_hash field. ■ size — The size of the data in this object, in bytes. Equivalent to the system.object_size field.
Synchronous C API Synchronous C API A multiplatform synchronous C API in which operations are accomplished in a few simple function calls is provided for the 5800 system. The API calls include operations for storing, retrieving, deleting, and querying of data and metadata records. Multiple threads are supported, and operations block until they complete. You must call hc_init (once per process) and “hc_session_create_ez” on page 53 (once per thread) prior to making any other API calls.
Synchronous C API – – – – – – – – – – – – – – – “hc_nvr_get_time” on page 82 “hc_nvr_get_timestamp” on page 83 “hc_pstmt_create” on page 100 “hc_pstmt_free” on page 101 “hc_pstmt_set_string” on page 101 “hc_pstmt_set_char” on page 102 “hc_pstmt_set_double” on page 103 “hc_pstmt_set_long” on page 104 “hc_pstmt_set_date” on page 105 “hc_pstmt_set_time” on page 106 “hc_pstmt_set_timestamp” on page 107 “hc_pstmt_set_binary” on page 108 “hc_pstmt_query_ez” on page 109 “hc_qrs_is_query_complete” on page 97 “hc_
Synchronous C Data Types Synchronous C Data Types The following data types are defined for the C API: ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ “hc_string_t” on page 46 “hc_long_t” on page 46 “hc_double_t” on page 46 “hc_type_t” on page 47 “hc_value_t” on page 47 “hc_schema_t” on page 48 “hc_nvr_t” on page 48 “hc_session_t” on page 48 “hc_pstmt_t” on page 49 “read_from_data_source” on page 49 “write_to_data_destination” on page 50 “hcerr_t” on page 51 hc_string_t Type for holding Unicode (UTF-8) and Latin-1 null-terminate
Synchronous C Data Types Synopsis typedef double hc_double_t; Description Type for holding floating-point values. hc_type_t 5800 system name-value metadata type specifier.
Synchronous C Data Types hc_bytearray_t hcv_bytearray; struct tm hcv_tm; struct timespec hcv_timespec; } hcv; } hc_value_t; Description This tagged union type can be used to hold a reference to any of the 5800 system data types. hc_schema_t 5800 system name-value metadata schema. Synopsis typedef void hc_schema_t; Description An opaque structure that holds the names and data types of each element in the archive’s metadata schema. hc_nvr_t 5800 system name-value record.
Synchronous C Data Types Description An opaque structure to represent the session from one thread to one 5800 system server. It contains the schema used to interpret metadata store and retrieve operations to this 5800 system server. hc_pstmt_t Structure for holding a prepared statement. Synopsis typedef void hc_pstmt_t; Description An opaque structure representing a query, including the query text and bound fields. hc_query_result_set_t Structure used to hold the results of a query.
Synchronous C Data Types Description Function pointers of read_from_data_source type are used to upload object data. The function pointer and opaque cookie reference are supplied as arguments to “hc_store_both_ez” on page 87 and other functions that store object data. The data source reader function will be called repeatedly, with the supplied cookie as an argument, to gather the object data to upload into storage.
Synchronous C Data Types Description Function pointers of write_to_data_destination type are used to download object data to a network or other destination from the 5800 system server using “hc_retrieve_ez” on page 91. The function pointer and opaque cookie reference are supplied as arguments to “hc_retrieve_ez” on page 91, and the function will be called with the supplied cookie argument to deliver the downloaded data to a local data storage function.
Synchronous C Data Types HCERR_BAD_REQUEST, HCERR_NO_SUCH_OBJECT, HCERR_INTERNAL_SERVER_ERROR, HCERR_FAILED_GETTING_FDSET, HCERR_FAILED_CHECKING_FDSET, HCERR_MISSING_SELECT_CLAUSE, HCERR_URL_TOO_LONG, HCERR_COULD_NOT_OPEN_FILE, HCERR_FAILED_TO_WRITE_TO_FILE, HCERR_NULL_SESSION, HCERR_INVALID_SESSION, HCERR_INVALID_OID, HCERR_NULL_HANDLE, HCERR_INVALID_HANDLE, HCERR_INVALID_SCHEMA, HCERR_INVALID_RESULT_SET, HCERR_INVALID_NVR, HCERR_WRONG_HANDLE_FOR_OPERATION, HCERR_HANDLE_IN_WRONG_STATE_FOR_OPERATION, HCERR
Synchronous C API Functions Description This structure defines the 5800 system C client API error codes.
Synchronous C API Functions Description This function initializes the 5800 system API and must be called before calling any of the other functions in this API. It downloads a copy of the schema for a particular host or port. The schema is used to validate the name-value-type tuples that are added to metadata records. Both the synchronous and the nonsynchronous C APIs are fully thread-safe and can be used simultaneously in multiple threads from the same process.
Synchronous C API Functions hc_session_free Releases the session object. Synopsis hcerr_t hc_session_free (hc_session_t *session); Description This function releases the session object and recovers handles and memory for one connection. Parameters session IN: The session object to free. Return Codes HCERR_OK HCERR_BAD_REQUEST HCERR_OOM HCERR_NULL_SESSION HCERR_INVALID_SESSION hc_session_get_status Gets the session status.
Synchronous C API Functions response_codep OUT: Updated to be the HTTP response code. errstr IN: Updated to be the error returned in the response body if the response code is not 200 (OK). errstr should not be written to by the application (that is, it is read only), and will persist until the next request to the 5800 system server or until “hc_session_free” on page 55 is called, whichever comes first.
Synchronous C API Functions Return Codes HCERR_OK HCERR_BAD_REQUEST HCERR_OOM HCERR_NULL_SESSION HCERR_INVALID_SESSION hc_session_get_host Returns the host name and port number associated with the session. Synopsis hc_session_get_host(hc_session_t *session, char **hostp,int *portp); Description This function returns the host name and port number associated with the session. Parameters session IN: The session object. hostp OUT: Updated to point to host name (read-only string).
Synchronous C API Functions hc_session_get_platform_result Returns low-level error codes associated with the current session. Synopsis hcerr_t hc_session_get_platform_result(hc_session_t *session, int32_t *connect_errnop, int32_t *platform_resultp); Description This function returns low-level error codes associated with the current session. Note – The values returned by hc_session_get_platform_result will not be updated properly after calls to the functions hc_retrieve_ez and hc_delete_ez.
Synchronous C API Functions hc_session_get_archive Returns the current archive object associated with this session. Synopsis hcerr_t hc_session_get_archive(hc_session_t *session, hc_archive_t **archivep); Description This function returns the current archive object associated with this session. Note – The archive object is not needed for the synchronous C API, but is made available for interfacing with the lower-level (nondocumented) API. Parameters session IN: The session object.
Synchronous C API Functions ■ “hc_schema_get_type_at_index” on page 62 hc_schema_get_type Looks up type in schema. Synopsis hcerr_t hc_schema_get_type(hc_schema_t *schema, char *name, hc_type_t *typep); Description This function looks up the type associated with a given name in the current metadata schema, or returns an error if the name is not known. Parameters schema IN: The schema to interrogate. name IN: The attribute name to look up in the schema.
Synchronous C API Functions hc_schema_get_length Looks up length of char and string attribute fields. Synopsis hcerr_t hc_schema_get_length(hc_schema_t *schema, char *name, int *length); Description This function looks up the length of a char or string field associated with a given attribute name in the current metadata schema, or returns an error if the name is not known. Parameters schema IN: The schema to interrogate. name IN: The attribute name to look up in the schema.
Synchronous C API Functions Description This function returns the number of name-value pairs in the metadata schema. Parameters hsp IN: The schema to interrogate. countp OUT: Updated with the number of name-value pairs in the schema. Return Codes HCERR_OK HCERR_BAD_REQUEST HCERR_OOM HCERR_INVALID_SCHEMA See Also “hc_schema_get_type_at_index” on page 62 hc_schema_get_type_at_index Iterates through the name-value pairs in a schema.
Synchronous C API Functions IN: Should range from 0 up to the count-1 returned in “hc_schema_get_count” on page 61. namep OUT: Updated to point to a string that is an attribute name of one attribute in the schema. typep OUT: Updated to be the type associated with that name in the schema. If the server schema references a type that the client library does not support, then the type is returned as HC_UNKNOWN_TYPE.
Synchronous C API Functions ▼ To Use the API for Storing Name-Value Records 1 Call hc_init once per process. 2 Call “hc_session_create_ez”on page 53 to initialize the session and download the schema. 3 Create the metadata record with “hc_nvr_create”on page 65. 4 Fill the new metadata piece by piece with hc_nvr_add_metadata_* functions (see “Building Name-Value Records”on page 66) for each 5800 system type.
Synchronous C API Functions Creating and Freeing Name-Value Records The following functions are defined to create and free name-value records: ■ ■ “hc_nvr_create” on page 65 “hc_nvr_free” on page 66 hc_nvr_create Creates a name-value record. Synopsis hcerr_t hc_nvr_create(hc_session_t *session, hc_long_t nslots, hc_nvr_t **nvrp); Description This function creates a name-value record with a designated initial size that is associated with a particular session.
Synchronous C API Functions See Also “hc_nvr_free” on page 66 hc_nvr_free Frees a name-value record. Synopsis hcerr_t hc_nvr_free(hc_nvr_t *nvr); Description This function frees a name-value record that was created by “hc_nvr_create” on page 65. Parameter nvr IN: Points to the name-value-record to be freed.
Synchronous C API Functions ■ ■ “hc_nvr_add_timestamp” on page 74 “hc_nvr_add_from_string” on page 75 hc_nvr_add_value Adds a new metadata value. Synopsis hcerr_t hc_nvr_add_value(hc_nvr_t *nvr, char *name, hc_value_t value); Description This function adds a new metadata name-value-type tuple to a designated name-value record. The name-value record will automatically expand as needed. Parameters nvr Points to a name-value-record. name IN: Name for the tuple.
Synchronous C API Functions hc_nvr_add_long Adds a new metadata value of type hc_long_t. Synopsis hcerr_t hc_nvr_add_long(hc_nvr_t *nvr, char *name, hc_long_t value) Description This function adds a new metadata name-value-type tuple to a designated name-value record, where type is known to be hc_long_t (see “hc_type_t” on page 47). The name-value record will automatically expand as needed. Parameters nvr Points to a name-value-record. name IN: Name for the tuple. value IN: The hc_long_t value.
Synchronous C API Functions hc_nvr_add_double Adds a new metadata value of type hc_double_t. Synopsis hcerr_t hc_nvr_add_double(hc_nvr_t *nvr, char *name, hc_double_t value); Description This function adds a new metadata name-value-type tuple to a designated name-value record, where type is known to be hc_double_t (see “hc_type_t” on page 47). The name-value record will automatically expand as needed. Parameters nvr Points to a name-value-record. name IN: Name for the tuple.
Synchronous C API Functions hc_nvr_add_string Adds a new metadata value of type Unicode UTF-8 string. Synopsis hcerr_t hc_nvr_add_string(hc_nvr_t *nvr, char *name, hc_string_t value); Description This function adds a new metadata name-value-type tuple to a designated name-value record, where type is a Unicode UTF-8 string. The name-value record automatically expands as needed. The string is copied into the structure. Parameters nvr Points to a name-value-record. name IN: Name for the tuple.
Synchronous C API Functions hc_nvr_add_binary Adds new metadata value of type binary. Synopsis hcerr_t hc_nvr_add_binary(hc_nvr_t *nvr, hc_string_t name, int size, unsigned char *bytes); Description This function adds a new metadata name-value-type tuple to a designated name-value record, where type is binary data. The name-value record automatically expands as needed. The name and data are copied into the structure. Parameters nvr Points to a name-value-record. name IN: Name for the tuple.
Synchronous C API Functions hc_nvr_add_date Adds new metadata value of type date. Synopsis #include hcerr_t hc_nvr_add_date(hc_nvr_t *nvr, hc_string_t name,struct tm *value); Description This function adds a new metadata name-value-type tuple to a designated name-value record. The struct tm fields are as defined in the POSIX standard and interpreted by mktime(3C).
Synchronous C API Functions hc_nvr_add_time Adds new metadata value of type time. Synopsis #include hcerr_t hc_nvr_add_time(hc_nvr_t *nvr, hc_string_t name, time_t *value); Description This function adds a new metadata name-value-type tuple to a designated name-value record. The value represents seconds since midnight. The name-value record automatically expands as needed. The name and value are copied into the structure. Parameters nvr Points to a name-value-record.
Synchronous C API Functions hc_nvr_add_timestamp Adds new metadata value of type timestamp. Synopsis #include hcerr_t hc_nvr_add_timestamp(hc_nvr_t *nvr, hc_string_t name, struct timespec *value); Description This function adds a new metadata name-value-type tuple to a designated name-value record, where type is hc_timestamp_t.
Synchronous C API Functions hc_nvr_add_from_string Adds a new metadata value where the value always starts out as a string. Synopsis hcerr_t hc_nvr_add_from_string(hc_nvr_t *nvr, char *name, char *value); Description This is a convenient function for adding a new metadata name-value-type tuple to a designated name-value, where the value always starts out as a string. The correct metadata type for name must be looked up from the schema. The name-value record will automatically expand as needed.
Synchronous C API Functions Retrieving Name-Value Records The following functions are defined to retrieve name-value records: ■ ■ ■ ■ ■ ■ ■ ■ ■ “hc_nvr_get_count” on page 76 “hc_nvr_get_value_at_index” on page 77 “hc_nvr_get_long” on page 78 “hc_nvr_get_double” on page 79 “hc_nvr_get_string” on page 80 “hc_nvr_get_binary” on page 81 “hc_nvr_get_date” on page 82 “hc_nvr_get_time” on page 82 “hc_nvr_get_timestamp” on page 83 hc_nvr_get_count Retrieves the number of metadata name and value tuples in this na
Synchronous C API Functions hc_nvr_get_value_at_index Iterates through the names and values in a name-value record. Synopsis hc_nvr_get_value_at_index(hc_nvr_t *nvr, hc_long_t index, char **namep, hc_value_t *valuep); Description This function iterates through the names and values in a name-value record. The returned names are read-only.
Synchronous C API Functions hc_nvr_get_long Retrieves a value of type hc_long_t. Synopsis hcerr_t hc_nvr_get_long(hc_nvr_t *nvr, char *name, hc_long_t *retlong); Description This function retrieves the value of type hc_long_t (see “hc_type_t” on page 47) associated with an indicated attribute name in a name-value record. Parameters nvr Points to a name-value-record. name IN: Attribute name to look for. retlong OUT: Updated to contain the hc_long_t value.
Synchronous C API Functions hc_nvr_get_double Retrieves a value of type hc_double_t. Synopsis hcerr_t hc_nvr_get_double(hc_nvr_t *nvr, char *name, hc_double_t *retdouble); Description This function retrieves the value of type hc_double_t (see “hc_type_t” on page 47) associated with an indicated attribute name in a name-value record. Parameters nvr Points to a name-value-record. name IN: Attribute name to look for. retdouble OUT: Updated to contain the hc_double_t value.
Synchronous C API Functions hc_nvr_get_string Retrieves a value of a Unicode UTF-8 string. Synopsis hcerr_t hc_nvr_get_string(hc_nvr_t *nvr, char *name, hc_string_t *retstring); Description This function retrieves the value of a Unicode UTF-8 string associated with an indicated attribute name in a name-value record. Note that the memory pointed to will be freed when the record is freed. Parameters nvr Points to a name-value-record. name IN: Attribute name to look for.
Synchronous C API Functions hc_nvr_get_binary Retrieves a metadata value of type binary. Synopsis hcerr_t hc_nvr_get_binary(hc_nvr_t *nvr, hc_string_t name, int *size, unsigned char **bytes); This function retrieves the value of type binary associated with an indicated attribute name in a name-value record. The binary data is not copied and is freed when the name-value record is freed. Parameters nvr Points to a name-value-record. name IN: Name for the tuple. size OUT: Updated with the size of the data.
Synchronous C API Functions hc_nvr_get_date Retrieves metadata value of type date. Synopsis #include hcerr_t hc_nvr_get_date(hc_nvr_t *nvr, hc_string_t name, struct tm *value); Description This function retrieves the value of type struct tm associated with an indicated attribute name in a name-value record. Parameters nvr Points to a name-value-record. name IN: Name for the tuple. value OUT: Updated with the struct tm (time.h) value.
Synchronous C API Functions Synopsis #include hcerr_t hc_nvr_get_time(hc_nvr_t *nvr, hc_string_t name, time_t *value); This function retrieves the value of type time_t (seconds since midnight) associated with an indicated attribute name in a name-value record. Parameters nvr Points to a name-value-record. name IN: Name for the tuple. value OUT: Updated with the time_t (time.h) value.
Synchronous C API Functions This function retrieves the value of type struct timespec associated with an indicated attribute name in a name-value record. Parameters nvr Points to a name-value-record. name IN: Name for the tuple. value OUT: Updated with the struct timespec (time.h) value.
Synchronous C API Functions char **names, char **values, hc_long_t nitems); Description This function creates a name-value-record from parallel tables of string names and string values. The correct metadata type for each name must be looked up from the schema associated with this session. The name-value record will automatically expand as needed. The names and data values are copied into the “hc_nvr_t” on page 48 structure, so the original names table and values table are left unchanged.
Synchronous C API Functions hc_nvr_convert_to_string_arrays Converts name-value-record to string names and string values. Synopsis hcerr_t hc_nvr_convert_to_string_arrays(hc_nvr_t *nvr, char ***namesp, char ***valuesp, int *nitemsp); Description This function converts a name-value-record into parallel tables of string names and string values. This destructively modifies the name-value record and frees it, so do not call “hc_nvr_free” on page 66 after calling this function.
Synchronous C API Functions HCERR_OOM HCERR_INVALID_NVR HCERR_ILLEGAL_ARGUMENT Storing Data and Metadata The following functions are defined to store data and metadata and to enforce indexing of metadata where necessary: ■ ■ ■ “hc_store_both_ez” on page 87 “hc_store_metadata_ez” on page 88 “hc_check_indexed_ez” on page 89 Note – The is_indexed value in the returned system record (hc_system_record_t) indicates whether this record was successfully inserted in the query engine at the time of store, and is
Synchronous C API Functions Parameters session IN: The session for the host and port to talk to. data_source_reader IN: The source of data to be stored. See “read_from_data_source” on page 49. cookie IN: An opaque data structure (cookie) to be provided to data_source_reader. For example, this could be a file descriptor. nvr IN: Pointer to a name-value record with the metadata. system_record OUT: Returned descriptor of a stored metadata record.
Synchronous C API Functions Description This function adds a metadata record for the specified OID and returns a system_record descriptor. Parameters session IN: The session for the host and port to talk to. oid IN: An identifier of object data to which the metadata record is attached. nvr IN: Pointer to a name-value record with the metadata. system_record OUT: Returned descriptor of a stored metadata record.
Synchronous C API Functions Description checkIndexed is intended as way to resolve a store index exception under program control (see “The 5800 System Query Integrity Model” on page 21). Once a store index exception occurs (as indicated by a non-zero value of the is_indexed field in the hc_system_record_t returned from a store operation) then hc_check_indexed_ez can be called repeatedly until it returns with *resultp set to any non-zero value.
Synchronous C API Functions Retrieving Data and Metadata The following functions are defined to retrieve data and metadata: ■ ■ ■ “hc_retrieve_ez” on page 91 “hc_retrieve_metadata_ez” on page 92 “hc_range_retrieve_ez” on page 93 hc_retrieve_ez Retrieves data for the specified OID. Synopsis hcerr_t hc_retrieve_ez(hc_session_t *session, *data_writer, void *cookie, hc_oid *oid); Description This function retrieves data for the specified OID.
Synchronous C API Functions HCERR_OOM HCERR_NULL_SESSION HCERR_INVALID_SESSION HCERR_INVALID_OID hc_retrieve_metadata_ez Retrieves a metadata record for the specified OID. Synopsis hcerr_t hc_retrieve_metadata_ez (hc_session_t *session, hc_oid *oid, hv_nvr_t **nvrp); Description This function retrieves a metadata record for the specified OID. When it has finished, you should call “hc_nvr_free” on page 66 to free the name-value-record. Parameters session IN: The session for the host and port to talk to.
Synchronous C API Functions hc_range_retrieve_ez Retrieves a specified range of data for a specified OID. Synopsis hc_range_retrieve_ez(hc_session_t *session, write_to_data_destination data_writer, void *cookie, hc_oid *oid, hc_long_t; firstbyte, hc_long_t lastbyte); Description This function retrieves a specified range of data for a specified OID. Parameters session IN: The session for the host and port to talk to. data_writer IN: Function callback to store the retrieved data locally.
Synchronous C API Functions HCERR_NULL_SESSION HCERR_INVALID_SESSION HCERR_INVALID_OID HCERR_ILLEGAL_ARGUMENT Querying Metadata The following functions are defined for simple queries: ■ ■ ■ ■ ■ “hc_query_ez” on page 94 “hc_qrs_next_ez” on page 96 “hc_qrs_is_query_complete” on page 97 “hc_qrs_get_query_integrity_time” on page 98 “hc_qrs_free” on page 99 The following functions are defined for prepared statement queries: ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ “hc_pstmt_create” on page 100 “hc_pstmt_free” on page 101 “hc_
Synchronous C API Functions int results_per_fetch, hc_query_result_set_t **rsetp); Description This function retrieves OIDs and optionally name-value records matching a query. If the selects list is NULL, only OIDs are retrieved. If selects is not NULL, name-value records are also retrieved and should each be freed using “hc_nvr_free” on page 66. In both cases the result set should be freed using “hc_qrs_free” on page 99.
Synchronous C API Functions Return Codes HCERR_OK HCERR_OOM HCERR_BAD_REQUEST HCERR_NULL_SESSION HCERR_INVALID_SESSION HCERR_ILLEGAL_ARGUMENT See Also “hc_qrs_free” on page 99 hc_qrs_next_ez Fetches the next OID and optionally name-value record from the QueryResultSet. Synopsis hcerr_t hc_qrs_next_ez(**rset, hc_oid *oid, hc_nvr_t **nvrp, int *finishedp); Description This function fetches an OID and optionally name-value record from the query result set.
Synchronous C API Functions finishedp OUT: Points to an int that is updated to 0 if query data has been returned and to 1 if the result set is empty.
Synchronous C API Functions Return Codes HCERR_OK HCERR_BAD_REQUEST HCERR_OOM HCERR_INVALID_RESULT_SET hc_qrs_get_query_integrity_time Returns a time that helps get more detail on which store index exceptions might still be unresolved. Synopsis hcerr_t hc_qrs_get_query_integrity_time(hc_query_result_set_t *rset, hc_long_t *query_timep); Description If the query integrity time is non-zero, then all store index exceptions whose object creation time falls before the query integrity time have been resolved.
Synchronous C API Functions HCERR_OOM HCERR_INVALID_RESULT_SET hc_qrs_free Releases the resources associated with this QueryResultSet. Synopsis hcerr_t hc_qrs_free (**rsetp); Description This function releases the resources associated with this QueryResultSet. Note – When a query is incorrect and elicits an error from the server, the error is often reported after hc_qrs_free and not from “hc_query_ez” on page 94. Your application should be prepared to receive and report an error from either place.
Synchronous C API Functions hc_pstmt_create Creates an “hc_pstmt_t” on page 49 for use with the “hc_pstmt_query_ez” on page 109 function. Synopsis hcerr_t hc_pstmt_create(hc_session_t *session, hc_string_t query, hc_pstmt_t **ptr); Description This function creates a prepared statement for use with the “hc_pstmt_query_ez” on page 109 function. Parameters session IN: session that this query will be used with. query IN: Query (where clause with ”?’ for values).
Synchronous C API Functions hc_pstmt_free Frees a “hc_pstmt_t” on page 49 with all its bindings. Synopsis hcerr_t hc_pstmt_free(hc_pstmt_t *pstmt); Description This function frees a prepared statement. Parameters pstmt Prepared statement to be freed. Return Codes HCERR_OK See Also “hc_pstmt_create” on page 100 hc_pstmt_set_string Adds a string binding to a “hc_pstmt_t” on page 49.
Synchronous C API Functions Parameters pstmt Prepared statement to add the binding to. which IN: Variable (”?’) in the prepared statement, numbered from 1. value IN: String to bind. Return Codes HCERR_OK HCERR_OOM See Also “hc_pstmt_create” on page 100 hc_pstmt_set_char Adds a char binding to a “hc_pstmt_t” on page 49. Synopsis hcerr_t hc_pstmt_set_char(hc_pstmt_t *pstmt, int which,char *value); Description This function binds a char * Latin-1 string to one of the variables in a prepared statement.
Synchronous C API Functions IN: Variable (”?’) in the prepared statement, numbered from 1. value IN: char * string to bind. Return Codes HCERR_OK HCERR_OOM See Also “hc_pstmt_create” on page 100 hc_pstmt_set_double Adds a double precision binding to a “hc_pstmt_t” on page 49. Synopsis hcerr_t hc_pstmt_set_double(hc_pstmt_t *pstmt, int which, hc_double_t value) Description This function binds an “hc_double_t” on page 46 to one of the variables in a prepared statement.
Synchronous C API Functions Return Codes HCERR_OK HCERR_OOM See Also “hc_pstmt_create” on page 100 hc_pstmt_set_long Adds a “hc_long_t” on page 46 binding to a “hc_pstmt_t” on page 49. Synopsis hcerr_t hc_pstmt_set_long(hc_pstmt_t *pstmt, int which, hc_long_t value); Description This function binds an “hc_long_t” on page 46 to one of the variables in a prepared statement. The variable must be of the appropriate type in the database.
Synchronous C API Functions See Also “hc_pstmt_create” on page 100 hc_pstmt_set_date Adds a date binding to a “hc_pstmt_t” on page 49. Synopsis #include hcerr_t hc_pstmt_set_date(hc_pstmt_t *pstmt, int which, struct tm *value); Description This function binds a date in the form of the POSIX struct to one of the variables in a prepared statement. The variable must be of the appropriate type in the database.
Synchronous C API Functions See Also “hc_pstmt_create” on page 100 hc_pstmt_set_time Adds a time-of-day binding to a “hc_pstmt_t” on page 49. Synopsis #include hcerr_t hc_pstmt_set_time(hc_pstmt_t *pstmt, int which, time_t *value); Description This function binds a time of day in seconds to one of the variables in a prepared statement. The variable must be of the appropriate type in the database.
Synchronous C API Functions hc_pstmt_set_timestamp Adds a timestamp binding to a “hc_pstmt_t” on page 49. Synopsis #include hcerr_t hc_pstmt_set_timestamp(hc_pstmt_t *pstmt, int which, struct timespec *value); Description This function binds a timestamp in the form of the POSIX struct timespec to one of the variables in a prepared statement. The variable must be of the appropriate type in the database.
Synchronous C API Functions hc_pstmt_set_binary Adds a binary binding to a “hc_pstmt_t” on page 49. Synopsis hcerr_t hc_pstmt_set_binary(hc_pstmt_t *pstmt, int which, unsigned char *data,int size); Description This function binds a binary array to one of the variables in a prepared statement. The variable must be of the appropriate type in the database. Errors in binding and type are returned when the “hc_pstmt_t” on page 49 is used to query the server.
Synchronous C API Functions hc_pstmt_query_ez Retrieves OIDs and optionally name-value records matching a prepared statement. Synopsis hcerr_t hc_pstmt_query_ez(*pstmt,hc_string_t selects[], int n_selects, int results_per_fetch, hc_query_result_set_t **rsetp); Description This function retrieves OIDs and optionally name-value records matching a prepared statement. “hc_qrs_next_ez” on page 96 is used to access the results in the result set. If the selects list is NULL, only OIDs are retrieved.
Querying With a Prepared Statement Return Codes HCERR_OK HCERR_OOM HCERR_BAD_REQUEST HCERR_NULL_SESSION HCERR_INVALID_SESSION HCERR_ILLEGAL_ARGUMENT See Also “hc_pstmt_create” on page 100 Querying With a Prepared Statement The following code is an example of querying with a prepared statement. Error handling is omitted.
Querying With a Prepared Statement // list all OIDs from yesterday with test_status t = 86400; // 86400 sec/day date = gmtime(&t); res = hc_pstmt_set_date(pstmt, 1, date); res = hc_pstmt_query_ez(pstmt, selects, 1, 2000, &rset); while (1) { hc_oid oid; hc_nvr_t *nvr int finished; hc_string_t test_status; res = hc_qrs_next_ez(rset, &oid, &nvr, &finished); if (finished) break; res = hc_nvr_get_string(nvr, "test_status", &test_status); printf("yesterday’s oid & test_status: %s %s\n", oid, test_status); hc_nvr
Querying With a Prepared Statement Parameters session IN: Pointer to the session. oid IN: The specified OID. Return Codes HCERR_OK HCERR_BAD_REQUEST HCERR_OOM HCERR_NULL_SESSION HCERR_INVALID_SESSION HCERR_INVALID_OID Translating Error and Type Codes The following functions are defined for translating error codes and type codes into strings: ■ ■ “hc_decode_hcerr” on page 112 “hc_decode_hc_type” on page 113 hc_decode_hcerr Translates an error code into a string.
Querying With a Prepared Statement hc_decode_hc_type Translates a type code into a string. Synopsis char *hc_decode_hc_type(hc_type_t type); Description Translates a type code into a string. Parameters type IN: The type code to translate.
4 C H A P T E R 4 Sun StorageTek 5800 System Query Language This chapter provides information on the 5800 system query language. Note – For details of the metadata system and how it is configured, see Chapter 8, “Configuring Metadata and Virtual File System Views” in Sun StorageTek 5800 Storage System Administration Guide.
Operation Operation The query format is similar to the where clause of an SQL query. The two main differences are that 5800 system queries do not contain embedded subqueries, and that the only “columns” that are available are the attributes defined in the 5800 system schema. Many features of the underlying metadata database’s own query language can be used in queries.
Queries Queries A query in the 5800 system query language is translated into an equivalent query for the underlying database that implements the query engine. The database used in a live 5800 system is Sun's High Availability Database (HADB). The database used by the 5800 system emulator is ApacheTM Derby.
Literals In Queries SQL Syntax in 5800 System Queries General Unicode characters outside of the ASCII range in queries are allowed in only two places to the 5800 system. Specifically, both attribute names and literal values may contain general Unicode characters. All text that is not either an attribute name nor a literal value is passed unchanged to the underlying query engine, and must consist of ASCII characters only. An attempt to pass non-ASCII characters in a query will result in an error.
Canonical String Format Literals for 5800 System Data Types For each 5800 system data type, there is a syntax to include literals of that type in a query string. The syntax is {type_name ’stringliteral’}. For example, consider the query: timestamp_field<{timestamp ’2006-10-26T12:00:00Z’} In particular, this syntax can be used to query for a particular object ID: system.
JDBC and HADB Date and Time Operations ■ When converting a typed value to a string as the result of the getAsString operation on a NameValueRecord or a QueryResultSet operation ■ When parsing a literal value as described in “Literals for 5800 System Data Types” on page 119 to create a typed query value from a string representation of that value.
Supported Expression Types ■ The following JDBC function escapes supported: TIMESTAMPDIFF, TIMESTAMPADD, CURRENT_TIMESTAMP, CURRENT_TIME, CURRENT_DATE, HOUR, MINUTE, SECOND. Reserved Words Some SQL reserved words (such as BETWEEN or LIKE) are allowed in queries and are expected to occur. An SQL reserved word cannot be used as an attribute name unless it is enclosed in double quotes (for example, "FIRST").
Supported Expression Types ■ expr [NOT] IN (valueslist). Note – The 5800 system emulator supports (but the cluster database does not) a JDBC “escape” clause that allows you to treat either % or _ as constant characters. There is currently no way to accomplish this in a LIKE clause in a query on a live cluster. ■ The following JDBC function escapes have been tested and are supported: – {fn UCASE(string)} to convert a string to uppercase. – {fn LCASE(string)} to convert a string to lowercase.
Queries Not Supported in Version 1.1 Examples of Supported Query Expressions ■ {fn LCASE(mp3.artist)} LIKE ’%floyd%’ AND system.object_size > 2000000 ■ (object_size < 200) OR "Collation" = ’en-US’ ■ {fn TIMESTAMPDIFF(SQL_TSI_YEAR, system.test.type_timestamp, ’2007-04-02 01:50:50.999’)} < 3 ■ {fn TIMESTAMPADD(SQL_TSI_YEAR, 2, system.test.type_timestamp )} > ’2007-04-03 01:50:50.999’ Queries Not Supported in Version 1.
SQL Words That Are Allowed in Queries ■ ■ ■ SIN(float) SQRT(float) TAN(float) SQL Words That Are Allowed in Queries Some SQL reserved words (such as BETWEEN or LIKE) are allowed in queries and are expected to occur. An SQL reserved word cannot be used as an attribute name unless it is enclosed in double quotes (for example, "FIRST").
SQL Words That Are Not Allowed in Queries DEALLOCATE, DECLARE, DEFAULT, DEFERRABLE, DEFERRED, DELETE, DESC, DESCRIBE, DESCRIPTOR, DETERMINISTIC, DIAGNOSTICS, DIRECTORY, DISCONNECT, DISTINCT, DO, DOMAIN, DOUBLEATTRIBUTE, DROP, EACH, EXCEPT, EXCEPTION, EXEC, EXECUTE, EXTERNAL, FETCH, FLOAT, FOREIGN, FOUND, FULL, FUNCTION, GET, GLOBAL, GO, GOTO, GRANT, GROUP, HANDLER, HAVING, IDENTITY, IMMEDIATE, INDEX, INDEXED, INDICATOR, INITIALLY, INNER, INOUT, INPUT, INSENSITIVE, INSERT, INTERSECT, INTO, ISOLATION, JOIN,
5 C H A P T E R 5 Programming Considerations and Best Practices This chapter provides considerations and practices that can help you create efficient 5800 system applications.
Limit the Size of Schema Query Parameters and Literals field consumes the same number of bytes as the length of the value. A string value consumes twice as many bytes as the length of the value. These sizes are similar to what is described in the Sun StorageTek 5800 System Administration Guide, Table 7-6, Number of Bytes Used by Each Element Type in a Schema Table. For example, assume dynamic parameter 1 is bound to string "Hello" in the query system.test.type_string=?.
Index Numbers and Symbols best practices max results per fetch, 128 retries and timeouts, 127 schema query size, 128 C client API (Continued) session management, 41-43, 53 synchronous, 44-45 system record, 42-43 updating schema definitions, 41 C client library, 40 canonical string decode operation, 120 format, 119-120 changes for this release, 44-45 checkIndexed method, 32-33 creating, prepared statement, 100 C D C client API application deployment, 43 architecture, 40 failure and recovery, 43 hc_clea
Index data type, synchronous C API (Continued) hc_string_t, 46 hc_value_t, 47-48 hcerr_t, 51-53 read_from_data_source, 49-50 write_to_data_destination, 50-51 deleting, objects, overview, 22-23 E error codes list of, 51-53 translating into a string hc_decode_hcerr, 112 F J Java client API application deployment, 27 basic concepts, 28 classes, 28 NameValueObjectArchive, 29, 30-38 NameValueRecord, 30 NameValueSchema, 29-30 ObjectIdentifier, 29-30 QueryResultSet, 30 SystemRecord, 30 interfaces, 26 Javadoc t
Index metadata (Continued) retrieving, 91 storing, 87 hc_store_both_ez, 87-88 metadata model, overview, 19-20 models data, 17-19 deleting objects, 22-23 metadata, 19-20 query, 20-21 query integrity, 21-22 multithreaded access, 40 N name-value records, 63 building, 66-67 hc_nvr_add_binary, 71 hc_nvr_add_date, 72 hc_nvr_add_double, 69 hc_nvr_add_from_string, 75 hc_nvr_add_long, 68 hc_nvr_add_string, 70 hc_nvr_add_time, 73 hc_nvr_add_timestamp, 74 hc_nvr_add_value, 67 converting to string arrays, 84 creating
Index OID (Continued) retrieve metadata for hc_retrieve_metadata_ez, 92 retrieve range of data for hc_range_retrieve_ez, 93-94 operations retrying, 26, 40 overview, 16-23 5800 system, 16-17 data model, 17-19 Honeycomb project, 17 metadata model, 19-20 query integrity model, 21-22 query model, 20-21 P prepared statement add binary binding to hc_pstmt_set_binary, 108 add char binding to hc_pstmt_set_char, 102-103 add date binding to hc_pstmt_set_date, 105-106 add double precision binding to hc_pstmt_set_dou
Index R retries, 127 retrieveMetadata method, 33 retrieveObject method, 33 retrying operations, 26, 40 S schema managing, 59-60 hc_schema_get_count, 61-62 hc_schema_get_length, 61 hc_schema_get_type, 60 hc_schema_get_type_at_index, 62-63 schema definitions, updating, 41 session management allocator_t, 41 deallocator_t, 41 failure and recovery, 43 hc_cleanup, 42 hc_init, 41-42 hc_system_record_t, 42-43 reallocator_t, 41 sessions C client API hc_session_create_ez, 53-54 hc_session_free, 55 hc_session_get_ar
Index synchronous C API (Continued) error codes translating into a string, 112 fetch next OID hc_qrs_next_ez, 96-97 free prepared statement hc_pstmt_free, 101 functions, 53-110 hc_nvr_get_count, 76 hc_pstmt_create, 100 hc_pstmt_free, 101 hc_pstmt_query_ez, 109-110 hc_pstmt_set_binary, 108 hc_pstmt_set_char, 102-103 hc_pstmt_set_date, 105-106 hc_pstmt_set_double, 103-104 hc_pstmt_set_long, 104-105 hc_pstmt_set_string, 101-102 hc_pstmt_set_time, 106 hc_pstmt_set_timestamp, 107 hc_qrs_free, 99 hc_qrs_get_quer
Index T timeouts, 127 135