db_dictionary_c.x revision 2
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 * 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/* Defining own version of xdr_db_dict_version */ 2N/A/* Defining own version of xdr_db_dict_desc */ 2N/A%
/* Dump contents of this dictionary (minus the database representation) 2N/A% to its file. Returns 0 if operation succeeds, -1 otherwise. */ 2N/A%
/* Delete old log file and descriptor */ 2N/A%
/* Open log file (and creates descriptor) if it has not been opened */ 2N/A%
/* Incorporate updates in log to dictionary already loaded. 2N/A% Does not affect "logfile" */ 2N/A%
/* closes log file if opened */ 2N/A%
/* Log the given action and execute it. 2N/A% The minor version of the dictionary is updated after the action has 2N/A% been executed and the dictionary is flagged as being changed. 2N/A% Return the structure db_result, or NULL if the loggin failed or the 2N/A% action is unknown. */ 2N/A%
/* Constructor: creates an empty, uninitialized dictionary. */ 2N/A%
/* Destructor: noop. Use db_shutdown if you really want to clean up. */ 2N/A%
/* Real destructor: deletes filename and table descriptors */ 2N/A%
/* Initialize dictionary from contents in 'file'. 2N/A% If there is already information in this dictionary, it is removed. 2N/A% Therefore, regardless of whether the load from the file succeeds, 2N/A% the contents of this dictionary will be altered. Returns 2N/A% whether table has been initialized successfully. */ 2N/A%
/* closes any open log files for all tables in dictionary or 'tab'. 2N/A% "tab" is an optional argument. 2N/A%
/* Write out in-memory copy of dictionary to file. 2N/A% 1. Update major version. 2N/A% 2. Dump contents to temporary file. 2N/A% 3. Rename temporary file to real dictionary file. 2N/A% 4. Remove log file. 2N/A% A checkpoint is done only if it has changed since the previous checkpoint. 2N/A% Returns TRUE if checkpoint was successful; FALSE otherwise. */ 2N/A%
/* Checkpoints table specified by 'tab', or all tables if 'tab' is 0. */ 2N/A%
/* Add table with given name 'tab' and description 'zdesc' to dictionary. 2N/A% Returns error code if table already exists, or if no memory can be found 2N/A% to store the descriptor, or if dictionary has not been intialized. 2N/A% Dictionary is updated to stable store before addition. 2N/A% Fatal error occurs if dictionary cannot be saved. 2N/A% Returns DB_SUCCESS if dictionary has been updated successfully. */ 2N/A%
/* Delete table with given name 'tab' from dictionary. 2N/A% Returns error code if table does not exist or if dictionary has not been 2N/A% initialized. Dictionary is updated to stable store if deletion is 2N/A% successful. Fatal error occurs if dictionary cannot be saved. 2N/A% Returns DB_SUCCESS if dictionary has been updated successfully. 2N/A% Note that the files associated with the table are also removed. */ 2N/A%
/* Return database structure of table named by 'table_name'. 2N/A% If 'where' is set, set it to the table_desc of 'table_name.' 2N/A% The database is loaded in from stable store if it has not been loaded. 2N/A% If it cannot be loaded, it is initialized using the scheme stored in 2N/A% the table_desc. NULL is returned if the initialization fails. */ 2N/A%
/* Returns db_table_desc of table name 'tab'. 2N/A% Use this if you do not want table to be loaded. */ 2N/A%
/* Translate given nis attribute list to a db_query structure. 2N/A% Return FALSE if dictionary has not been initialized, or 2N/A% table does not have a scheme (which should be a fatal error?). */ 2N/A%
/* Return an array of strings of table names of all tables in dictionary. */ 2N/A%
/* Set deferred commit mode; intended for replica resync */ 2N/A%
/* Commit deferred changes; intended for replica resync */ 2N/A%
/* Roll back deferred changes; intended for replica resync */ 2N/A%#
endif /* _DB_DICTIONARY_H */