home *** CD-ROM | disk | FTP | other *** search
- # Template @(#)db_util.dbt 1.4 15 Apr 1996
- # Copyright 1995 Cadre Technologies
- #
-
- #
- # Utility procs
- #
-
- #
- # Get the full name of the given table
- #
- ~[proc tableName {name} {
- return "${name}${tableSuffix}" }]
-
- ~[proc table {name} {
- return "table [tableName $name]" }]
-
- #
- # Get the full name of an index on the given table
- #
- ~[proc indexName {tbl nr} {
- return "${tbl}${tableSuffix}_i${nr}" }]
-
- #
- # Utility proc to drop a table
- #
- ~[proc dropTable {tbl} {
- return "drop [table $tbl]" }]
-
- #
- # Utility proc to create an index
- #
- ~[proc createIndex {tbl nr} {
- return "create index [indexName $tbl $nr] on [tableName $tbl]" }]
-
- ~[proc createClusteredIndex {tbl nr} {
- return "create index [indexName $tbl $nr] on [tableName $tbl]" }]
-
- #
- # Utility proc to drop an index
- #
- ~[proc dropIndex {tbl nr} {
- return "drop index [tableName $tbl].[indexName $tbl $nr]" }]
-