2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License, Version 1.0 only 2N/A * (the "License"). You may not use this file except in compliance 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * db_index_entry_c.x 2N/A * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A%#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A%
/* db_index_entry is an entry in the hashtable. db_index_entries can be 2N/A% linked in one of two ways: 2N/A% * via the 'next' pointer and form the hash bucket 2N/A% * via the 'nextresult' pointer and form a chain of results. 2N/A% Each entry contains the key, the hash value of key, and location 2N/A% information 'entryp' 2N/A% entryp is location information. 2N/A% It might be pointer to an in core entry, or an indirect pointer 2N/A% identifying the location of an entry somewhere in memory (e.g. 2N/A% if there was a table where all complete entries are stored) --- this 2N/A% is desirable, for example, for XDR operations on a multi-indexed table; 2N/A% or, if used in conjunction with NetISAM, it may be the record number. */ 2N/A%
/* remember to set next_result to null first if using XDR. */ 2N/A%
/* Constructor: create an entry using given string and location info. */ 2N/A%
/* Constructor: create an entry using the given info. 2N/A% A copy of the key is made. New entry is added to head of list of 'n'. */ 2N/A%
/* Destructor: deletes key and itself. Assumes that deletion of 2N/A% object at location is done elsewhere (beforehand) */ 2N/A%
/* Relocate bucket starting with this entry to new hashtable 'new_tab'. */ 2N/A%
/* Join two lists (entry as identified by its 'location' occurs on both list, 2N/A% then it is included in the list returned). 2N/A% Returns pointer to resulting list; size of list 2N/A% returned in 'newsize'. List is chained using the 'nextresult' pointer. */ 2N/A%
/* Returns pointer to a list of index entries with the same hash value and 2N/A% key as those given. Returns in 'how_many' the number of entries in the 2N/A% list returned. The list is linked by the 'next_result' field of the 2N/A% index entries. These may be changed after the next call to 'lookup' 2N/A%
/* Return pointer to index entry with same hash value, same key, 2N/A% and same record number as those supplied. Returns NULL if not found. */ 2N/A%
/* Return the next entry in the bucket starting with this entry 2N/A% with the same hashvalue, key and location as this entry. */ 2N/A%
/* Return the next entry in the bucket. */ 2N/A%
/* Return the next entry in the 'next_result' chain. */ 2N/A%
/* Return the location field of this entry. */ 2N/A%
/* Assign the given pointer as the next result after this entry. */ 2N/A%
/* Return the pointer to the key of this entry. */ 2N/A%
/* Remove entry with the specified hashvalue, key, and record number. 2N/A% Returns 'TRUE' if successful, FALSE otherwise. 2N/A% If the entry being removed is at the head of the list, then 2N/A% the head is updated to reflect the removal. The storage for the index 2N/A% entry is freed. The record pointed to by 'recnum' must be removed 2N/A% through another means. All that is updated in this operation is the 2N/A%
/* Replace the 'location' field of the index entry with the given one. */ 2N/A%
/* Create and add an entry with the given hashvalue, key value, and record 2N/A% location, to the bucket pointed to by 'hashvalue'. 2N/A% If an entry with the same identical information is found, no addition 2N/A% is done. If an entry with the same hashvalue and key value is found, 2N/A% the entry is added after the first entry with this property. Otherwise, 2N/A% the entry is added to the head of the bucket. This way, entries 2N/A% with the same hashvalue and key are not scattered throughout the bucket 2N/A% but they occur together. Copy is made of given key. */ 2N/A%
/* Print this entry to stdout. */ 2N/A%
/* Print bucket starting with this entry. */ 2N/A%
/* Print result list starting with this entry. */ 2N/A%#
endif /* _DB_INDEX_ENTRY_H */