=pod =encoding utf8 =head1 NAME Muldis::D::Core::Routines_Catalog - Muldis D data definition routines =head1 VERSION This document is Muldis::D::Core::Routines_Catalog version 0.1.0. =head1 PREFACE This document is part of the Muldis D language specification, whose root document is L; you should read that root document before you read this one, which provides subservient details. Moreover, you should read the L document before this current document, as that forms its own tree beneath a root document branch. =head1 DESCRIPTION This document contains one or more sections that were moved here from L so that that other document would not be too large. These core routines are more special-purpose in nature and are intended for use in working with the system catalog. Generally speaking they comprise the system-defined data definition routines of Muldis D. These procedures are mainly for making bootloaders work, since those can not directly invoke variables such as the catalogs in order to insert into them. Note that these routines are far from exhaustive as far as providing the means to do data definition. The most exhaustive means to do data definition is to use ordinary data manipulation routines directly on the system catalog. =head1 FUNCTIONS FOR SIMPLE GENERIC SCALAR TYPES =item C This function results in the reverse value of its argument; a C or C argument results in the other one of the two; an C argument results in itself. =item C This function results in the lowest-indexed of its N input element values that isn't equal to C, if there is such an input value, and otherwise it results in C. It is a reduction operator that recursively takes each consecutive pair of input values, for each pair picking the lower-indexed one if that isn't equal to C and otherwise picking the higher-indexed one (a process which is associative), until just one is left, which is the result. If C has zero values, then C results in C, which is the identity value for this operation. The purpose of this function is to provide a canonical terse way to chain invocations of multiple C functions to derive a larger such function, such as when you want to define an C function for a tuple type, which would then be your control for sorting a relation as per a SQL "ORDER BY" or "RANK". =head1 PROCEDURES FOR DEFINING DEPOT MOUNTS =over =item C This procedure is an abstraction over inserting a tuple into the catalog relvar C. It will create a new depot mount in the DBMS whose name is given by the C argument and whose other mount control details match the other arguments; the mount may be for either an existing depot or for a newly created one. This procedure is analagous to a SQL CONNECT statement or SQLite ATTACH statement. =item C This procedure is an abstraction over deleting a tuple from the catalog relvar C. It will drop an existing depot mount from the DBMS whose name is given by the argument; the depot behind the mount may then either cease to exist or persist on. This procedure is analagous to a SQL DISCONNECT statement or SQLite DETACH statement. =item C This procedure is an abstraction over updating a tuple of the catalog relvar C such that its C attribute is made C. =back =head1 PROCEDURES FOR DEFINING IN-DEPOT NAMESPACES =over =item C This procedure is an abstraction over inserting a tuple into the catalog relvar C. It will create a new subdepot, in the depot mounted under the name given by the C argument, whose name and other details match the other arguments. This procedure is analagous to a SQL CREATE SCHEMA statement. =item C This procedure is an abstraction over deleting a tuple from the catalog relvar C. It will drop an existing subdepot. This procedure is analagous to a SQL DROP SCHEMA statement. =item C This procedure is an abstraction over inserting a tuple into the catalog relvar C. It will create a new package, in the depot mounted under the name given by the C argument, whose name and other details match the other arguments. This procedure is analagous to an Oracle CREATE PACKAGE statement. =item C This procedure is an abstraction over deleting a tuple from the catalog relvar C. It will drop an existing package. This procedure is analagous to an Oracle DROP PACKAGE statement. =back =head1 PROCEDURES FOR DEFINING ROUTINES =over =item C This procedure is an abstraction over inserting a tuple into the catalog relvar C. It will create a new function|updater|procedure, in the depot mounted under the name given by the C argument, whose name and other details match the other arguments. This procedure is analagous to a SQL CREATE FUNCTION|PROCEDURE statement. =item C This procedure is an abstraction over deleting a tuple from the catalog relvar C. It will drop an existing depot function|updater|procedure. This procedure is analagous to a SQL DROP FUNCTION|PROCEDURE statement. =item C This procedure is an abstraction over inserting a tuple into the catalog relvar C. It will create a new function|updater|procedure, in the package having the name given by the C argument, in the depot mounted under the name given by the C argument, whose name and other details match the other arguments. =item C This procedure is an abstraction over deleting a tuple from the catalog relvar C. It will drop an existing package function|updater|procedure. =back =head1 PROCEDURES FOR DEFINING DATA TYPES =over =item C This procedure is an abstraction over inserting a tuple into the catalog relvar C. It will create a new type, in the depot mounted under the name given by the C argument, whose name and other details match the other arguments. This procedure is analagous to a SQL CREATE TYPE|DOMAIN statement. =item C This procedure is an abstraction over deleting a tuple from the catalog relvar C. It will drop an existing depot type. This procedure is analagous to a SQL DROP TYPE|DOMAIN statement. =item C This procedure is an abstraction over inserting a tuple into the catalog relvar C. It will create a new type, in the package having the name given by the C argument, in the depot mounted under the name given by the C argument, whose name and other details match the other arguments. =item C This procedure is an abstraction over deleting a tuple from the catalog relvar C. It will drop an existing package type. =back =head1 PROCEDURES FOR DEFINING DATABASE RELVARS I =head1 PROCEDURES FOR DEFINING DATABASE CONSTRAINTS I =head1 SEE ALSO Go to L for the majority of distribution-internal references, and L for the majority of distribution-external references. =head1 AUTHOR Darren Duncan (C) =head1 LICENSE AND COPYRIGHT This file is part of the formal specification of the Muldis D language. Muldis D is Copyright © 2002-2008, Darren Duncan. See the LICENSE AND COPYRIGHT of L for details. =head1 TRADEMARK POLICY The TRADEMARK POLICY in L applies to this file too. =head1 ACKNOWLEDGEMENTS The ACKNOWLEDGEMENTS in L apply to this file too. =cut