Namespace: Consultingwerk.SmartFramework.Tools.ErdApi
Class 
ZamolxisApi Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

File:ZamolxisApi
Purpose:API that supports querying and manipulating the contents
of an .smfdia file
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Tue Jul 10 09:26:29 CEST 2018



Top Method Summary
Options Name Purpose
+ CorrectDecimals (handle, integer) Corrects the number of decimals for fields that don't have decimals set
+ CHARACTER CreateField (handle, character, ZamolxisField) Creates a new field in an existing table
+ CHARACTER CreateIndex (handle, character, ZamolxisIndex) Creates a new index in an existing table
+ CHARACTER CreatePartition (handle, character) Creates a Database Partition in the ERD Diagram
+ CHARACTER CreatePartition (handle, character, character) Creates a Database Partition in the ERD Diagram
+ CHARACTER EnsureUniqueIndexName (character, CaseSensitiveCharacterDictionary) Returns a unique index name
+ HANDLE GetDatabaseNode (handle) Returns the node representing the Openedge:Database
+ Consultingwerk.Framework.Collections.CaseSensitiveCharacterDictionary GetFieldNames (character, character) Returns a CaseSensitiveCharacterDictionary of field names for a given table
+ Consultingwerk.Framework.Collections.CaseSensitiveCharacterDictionary GetFieldNames (handle, character) Returns a CaseSensitiveCharacterDictionary of field names for a given table
+ Consultingwerk.Framework.Collections.CaseSensitiveCharacterDictionary GetIndexNames (character, character) Returns a CaseSensitiveCharacterDictionary of index names for a given table
+ Consultingwerk.Framework.Collections.CaseSensitiveCharacterDictionary GetIndexNames (handle, character) Returns a CaseSensitiveCharacterDictionary of index names for a given table
+ GetTables (character, table) Returns a temp-table with all tables of the model
+ GetTables (handle, table) Returns a temp-table with all tables of the model
+ MoveTable (handle, character, character) Moves a Database table to the named Partition
+ CHARACTER NewId () Returns a new ecore ID
+ RenameField (handle, character, character) Renames the given Field
+ RenameIndex (handle, character, character) Renames the given Index
+ RenameTable (handle, character, character) Renames the given Table


Method Detail
Top

PUBLIC CorrectDecimals (handle, integer)

Purpose: Corrects the number of decimals for fields that don't
have decimals set
Notes:

Parameters:
phDocNode HANDLE
The x-noderef representing the .smfdia file or the Openedge:Database node
piDefaultDecimals INTEGER
The number of decimals to use for fields that don't have decimals set
Top

PUBLIC CHARACTER CreateField (handle, character, ZamolxisField)

Purpose: Creates a new field in an existing table
Notes:

Parameters:
phDocNode HANDLE
The x-noderef representing the .smfdia file or the Openedge:Database node
pcTableName CHARACTER
The name of the table
poField Consultingwerk.SmartFramework.Tools.ErdApi.ZamolxisField
The data for the field to create
Returns CHARACTER
The xmi:id value of the new field .
Top

PUBLIC CHARACTER CreateIndex (handle, character, ZamolxisIndex)

Purpose: Creates a new index in an existing table
Notes: When the new index is primary, a previous primary index will be set to primary false

Parameters:
phDocNode HANDLE
The x-noderef representing the .smfdia file or the Openedge:Database node
pcTableName CHARACTER
The name of the table
poIndex Consultingwerk.SmartFramework.Tools.ErdApi.ZamolxisIndex
The data for the index to create
Returns CHARACTER
The xmi:id value of the new index
Top

PUBLIC CHARACTER CreatePartition (handle, character)

Purpose: Creates a Database Partition in the ERD Diagram
Notes:

Parameters:
phDocNode HANDLE
The x-noderef representing the .smfdia file or the Openedge:Database node
pcPartitionName CHARACTER
The name of the partition to create table
Returns CHARACTER
The xmi:id value of the new index
Top

PUBLIC CHARACTER CreatePartition (handle, character, character)

Purpose: Creates a Database Partition in the ERD Diagram
Notes: Note, the name of the Parent Partition is based on the short
partition name only, a complete path is not expected

Parameters:
phDocNode HANDLE
The x-noderef representing the .smfdia file or the Openedge:Database node
pcPartitionName CHARACTER
The name of the partition to create table
pcParentPartitionName CHARACTER
The name of the parent partition (or "" or ?)
Returns CHARACTER
The xmi:id value of the new index
Top

PUBLIC CHARACTER EnsureUniqueIndexName (character, CaseSensitiveCharacterDictionary)

Purpose: Returns a unique index name
Notes:

Parameters:
pcIndexName CHARACTER
The index name to ensure uniqueness
poIndexes Consultingwerk.Framework.Collections.CaseSensitiveCharacterDictionary
The CharacterDictionary with index name
Returns CHARACTER
The new index name
Top

PUBLIC HANDLE GetDatabaseNode (handle)

Purpose: Returns the node representing the Openedge:Database
Notes:

Parameters:
phDocNode HANDLE
The x-noderef of the document root
Returns HANDLE
The x-noderef representing the Openedge:Database
Top

PUBLIC Consultingwerk.Framework.Collections.CaseSensitiveCharacterDictionary GetFieldNames (character, character)

Purpose: Returns a CaseSensitiveCharacterDictionary of field names for a given table
Notes:

Parameters:
pcSmfDiaFile CHARACTER
The name of the .smfdia file to parse
pcTableName CHARACTER
The name of the table
Returns Consultingwerk.Framework.Collections.CaseSensitiveCharacterDictionary
The CaseSensitiveCharacterDictionary of field names
Top

PUBLIC Consultingwerk.Framework.Collections.CaseSensitiveCharacterDictionary GetFieldNames (handle, character)

Purpose: Returns a CaseSensitiveCharacterDictionary of field names for a given table
Notes:

Parameters:
phDocNode HANDLE
The x-noderef representing the .smfdia file or the Openedge:Database node
pcTableName CHARACTER
The name of the table
Returns Consultingwerk.Framework.Collections.CaseSensitiveCharacterDictionary
The CaseSensitiveCharacterDictionary of field names
Top

PUBLIC Consultingwerk.Framework.Collections.CaseSensitiveCharacterDictionary GetIndexNames (character, character)

Purpose: Returns a CaseSensitiveCharacterDictionary of index names for a given table
Notes:

Parameters:
pcSmfDiaFile CHARACTER
The name of the .smfdia file to parse
pcTableName CHARACTER
The name of the table
Returns Consultingwerk.Framework.Collections.CaseSensitiveCharacterDictionary
The CaseSensitiveCharacterDictionary of index names
Top

PUBLIC Consultingwerk.Framework.Collections.CaseSensitiveCharacterDictionary GetIndexNames (handle, character)

Purpose: Returns a CaseSensitiveCharacterDictionary of index names for a given table
Notes:

Parameters:
phDocNode HANDLE
The x-noderef representing the .smfdia file or the Openedge:Database node
pcTableName CHARACTER
The name of the table
Returns Consultingwerk.Framework.Collections.CaseSensitiveCharacterDictionary
The CaseSensitiveCharacterDictionary of index names
Top

PUBLIC GetTables (character, table)

Purpose: Returns a temp-table with all tables of the model
Notes:

Parameters:
pcSmfDiaFile CHARACTER
The name of the .smfdia file to parse
ttTableNames TEMP-TABLE ttTableNames
The output temp-table with the table names
Top

PUBLIC GetTables (handle, table)

Purpose: Returns a temp-table with all tables of the model
Notes:

Parameters:
phDocNode HANDLE
The x-noderef representing the .smfdia file or the Openedge:Database node
ttTableNames TEMP-TABLE ttTableNames
The output temp-table with the table names
Top

PUBLIC MoveTable (handle, character, character)

Purpose: Moves a Database table to the named Partition
Notes: Note, the name of the Parent Partition is based on the short
partition name only, a complete path is not expected

Parameters:
phDocNode HANDLE
The x-noderef representing the .smfdia file or the Openedge:Database node
pcTableName CHARACTER
The name of the table to move
pcParentPartitionName CHARACTER
The name of the parent partition (or "" or ?)
Top

PUBLIC CHARACTER NewId ()

Purpose: Returns a new ecore ID
Notes: Based on an UUID, prefixed with the underscore. This value
is case-sensitive!

Returns CHARACTER
The new ecore ID value
Top

PUBLIC RenameField (handle, character, character)

Purpose: Renames the given Field
Notes:

Parameters:
phDocNode HANDLE
The x-noderef representing the .smfdia file or the Openedge:Database node
pcId CHARACTER
The xmi:id of the field to rename
pcName CHARACTER
The new Field name
Top

PUBLIC RenameIndex (handle, character, character)

Purpose: Renames the given Index
Notes:

Parameters:
phDocNode HANDLE
The x-noderef representing the .smfdia file or the Openedge:Database node
pcId CHARACTER
The xmi:id of the index to rename
pcName CHARACTER
The new Index name
Top

PUBLIC RenameTable (handle, character, character)

Purpose: Renames the given Table
Notes:

Parameters:
phDocNode HANDLE
The x-noderef representing the .smfdia file or the Openedge:Database node
pcId CHARACTER
The xmi:id of the table to rename
pcName CHARACTER
The new Index name


Temp-Table Detail

Temp-Table ttTableNames

Defined in:


©2006-2023 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       08.12.2024 13:20:43