Content-type: text/html; charset=UTF-8 Man page of qddb_instance

qddb_instance

Section: Herrin Software Development, Inc. (1)
Updated: 21 Oct 2000
Index Return to Main Contents
 

NAME

qddb_instance - Manipulate instances within a Qddb view.  

SYNOPSIS

qddb_instance new <view desc> <attribute name>
qddb_instance current <view desc> <attribute name>
qddb_instance getval <view desc> <attribute name> ?<instance number>?
qddb_instance isempty <view desc> <attribute name> <instance number>
qddb_instance maxnum <view desc> <attribute name>
qddb_instance move <view desc> <attribute name> <instnum from> <instnum to>
qddb_instance remove <view desc> <attribute name> <instance number>
qddb_instance setval <view desc> <attribute name> ?<instance number>? <instance value>
qddb_instance switch <view desc> <attribute name> <instance number>


 

DESCRIPTION

qddb_instance operates on a preexisting view's (created with qddb_view(n)) tuple and manipulates the view.

qddb_instance new
creates a new instance of the given attribute in the given view. For example, a schema containing:

    Name ( Title First Middle Last* )*
    Address ( Street City State ZipCode )*
    Info ( Date type date Comments* )*

may have a view consisting of:

    Name.Title Name.First Name.Middle Name.Last
    Address.Street Address.City Address.State Address.ZipCode
    Info.Date Info.Comments

If there are currently 3 instances of the Name expandable attribute in the tuple associated with the view, then qddb_instance new $view_desc Name will create the 4th instance and all its subattributes. Adding a new instance does not automatically switch the view to that instance.

qddb_instance current
returns the current instance number of the given attribute in the given view. This number may be used to index into arrays or listboxes. Instance numbers begin with 1.

qddb_instance getval
returns the value of the given attribute (possibly qualified by instance number) in the given view. If the given attribute contains subattributes, an error is returned.

qddb_instance isempty
check whether the attribute in the given view contains any non-blank values. If non-blank fields exist, 0 is returned. Otherwise, 1 is returned. Attributes of types int and real always return 0 because they are initialized to a value of zero and are never empty.

qddb_instance maxnum
returns the instance number of the last instance of the given attribute in the given view. This is also the number of instances of that attribute in the given view.

qddb_instance move
moves the instance given by <instnum from> to the spot given by <instnum to>. This command changes the storage order of the instances in memory only. When the tuple is saved to disk, the new ordering is saved.

qddb_instance setval
sets the value of the given attribute (possibly qualified by instance number) in the given view. If the given attribute contains subattributes, an error is returned.

qddb_instance switch
switches the given attribute to the given instance number in the given view. If the given instance number is out of bounds, an error is returned.

qddb_instance remove
removes the given instance from the in-memory tuple. If the current instance in the view is removed, then the view is modified to show one of the other instances. If no instances remain, a blank instance is inserted and used in the view. If the in-memory tuple is saved, then the removed instance is deleted from the on-disk copy.

 

SEE ALSO

qddb_keylist(n), qddb_rows(n), qddb_schema(n), qddb_search(n), qddb_tuple(n), qddb_view(n)  

REFERENCES

A Guide to QDDB
Eric H. Herrin II and Raphael A. Finkel

Qddb User's Guide

An ASCII Database for Fast Queries of Relatively Stable Data
Eric H. Herrin II and Raphael A. Finkel
Computing Systems, Volume 4 Number 2
University of California Press, Berkeley CA

Schema and Tuple Trees: An Intuitive Structure for 
Representing Relational Data
Eric H. Herrin, II and Raphael A. Finkel
Computing Systems, Volume 9, Number 2
MIT Press, Cambridge MA

TCL and the TK Toolkit 
John K. Ousterhout
Addison-Wesley, 1994
ISBN 0-201-63337-X
 

DIAGNOSTICS

 

BUGS

None known.


 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO
REFERENCES
DIAGNOSTICS
BUGS

This document was created by man2html, using the manual pages.
Time: 18:55:30 GMT, October 31, 2018