Difference between revisions of "PostgreSQL Adapter-nexj/SchemaManger"

From CDOT Wiki
Jump to: navigation, search
(UPGRADE SCHEMA)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{Admon/obsolete}}
 +
 
<big><big> Postgre Project - SQLSchemaManager Files</big></big>
 
<big><big> Postgre Project - SQLSchemaManager Files</big></big>
{{NexJ_Express Index}}
 
  
 
==SQLSchemaManager.java==
 
==SQLSchemaManager.java==
Line 6: Line 7:
 
=== INITIAL SETUP OF SCHEMA ===
 
=== INITIAL SETUP OF SCHEMA ===
 
{| class="wikitable sortable" border="1" cellpadding="5"
 
{| class="wikitable sortable" border="1" cellpadding="5"
|+'''Abstract methods to work on'''
+
|+
 
! Modifier !! Method !! Tests Cases !! Status !!  ToDo
 
! Modifier !! Method !! Tests Cases !! Status !!  ToDo
 
|-
 
|-
Line 44: Line 45:
 
|-
 
|-
 
| protected abstract || SQLAppender getDynamicSQLAppender(StringBuffer buf) ||--- || not started ||  ---
 
| protected abstract || SQLAppender getDynamicSQLAppender(StringBuffer buf) ||--- || not started ||  ---
|-
 
|}
 
 
=== DROP SCHEMA ===
 
{| class="wikitable sortable" border="1" cellpadding="5"
 
|+'''Abstract methods to work on'''
 
! Modifier !! Method !! Tests Cases !! Status !!  ToDo
 
|-
 
| protected abstract || String getDropEtcScriptName() ||--- || not started ||  ---
 
|-
 
| protected abstract || String getSetupEtcScriptName() ||--- || not started ||  ---
 
|-
 
| protected  || void appendTableSuffix(StringBuffer buf, Table table) ||--- || not started ||  ---
 
|-
 
| protected  || void appendUpgradeInitialize(StringBuffer buf, RelationalSchema schema) || May not be needed for Postgre || comp. ||  ---
 
|-
 
| public  || void dropTable(Table table) ||--- || not started ||  ---
 
|-
 
| protected  || Table getDropSuccessor(Table left, Table right) ||--- || not started ||  ---
 
|-
 
| public  || void truncateTable(Table table) ||--- || not started ||  ---
 
 
|-
 
|-
 
|}
 
|}
Line 70: Line 50:
 
=== CREATE SCHEMA ===
 
=== CREATE SCHEMA ===
 
{| class="wikitable sortable" border="1" cellpadding="5"
 
{| class="wikitable sortable" border="1" cellpadding="5"
|+'''Abstract methods to work on'''
+
|+
 
! Modifier !! Method !! Tests Cases !! Status !!  ToDo
 
! Modifier !! Method !! Tests Cases !! Status !!  ToDo
 
|-
 
|-
Line 86: Line 66:
 
|-
 
|-
 
| protected abstract || String getCreateEtcScriptName() ||--- || not started ||  ---
 
| protected abstract || String getCreateEtcScriptName() ||--- || not started ||  ---
|-
 
| protected abstract || String getDropEtcScriptName() ||--- || not started ||  ---
 
|-
 
| protected abstract || String getSetupEtcScriptName() ||--- || not started ||  ---
 
 
|-
 
|-
 
| protected abstract || SQLAppender getDynamicSQLAppender(StringBuffer buf) ||--- || not started ||  ---
 
| protected abstract || SQLAppender getDynamicSQLAppender(StringBuffer buf) ||--- || not started ||  ---
Line 98: Line 74:
 
|-
 
|-
 
| protected  || void appendTableSuffix(StringBuffer buf, Table table) ||--- || not started ||  ---
 
| protected  || void appendTableSuffix(StringBuffer buf, Table table) ||--- || not started ||  ---
|-
 
| protected  || void appendUpgradeInitialize(StringBuffer buf, RelationalSchema schema) || May not be needed for Postgre || comp. ||  ---
 
 
|-
 
|-
 
| protected  || void createIndex(Index index) ||--- || not started ||  ---
 
| protected  || void createIndex(Index index) ||--- || not started ||  ---
 
|-
 
|-
 
| protected  || void createIndexes(Table table) ||--- || not started ||  ---
 
| protected  || void createIndexes(Table table) ||--- || not started ||  ---
|-
 
| public  || void dropTable(Table table) ||--- || not started ||  ---
 
|-
 
| protected  || String getAlterColumnToken() ||--- || not started ||  ---
 
|-
 
| protected  || String getFullTableName(String sSchemaName, String sTableName) ||--- || not started ||  ---
 
|-
 
| protected  || String getIndexName(Index index, boolean bConstraint, boolean bQuote) ||--- || not started ||  ---
 
 
|-
 
|-
 
|}
 
|}
 +
  
 
=== UPGRADE SCHEMA ===
 
=== UPGRADE SCHEMA ===
 
{| class="wikitable sortable" border="1" cellpadding="5"
 
{| class="wikitable sortable" border="1" cellpadding="5"
|+'''Abstract methods to work on'''
+
|+
 
! Modifier !! Method !! Tests Cases !! Status !!  ToDo
 
! Modifier !! Method !! Tests Cases !! Status !!  ToDo
 
|-
 
|-
 
| protected abstract || StringBuffer appendConcatenate(StringBuffer buf, CharSequence[] argArray) || MySQLAdapterTest[testUpgrade(), testSchemaUnicodeValidation()]  -MySQLSchemaManagerTest[testAppendConcatenate()]|| not started ||  ---
 
| protected abstract || StringBuffer appendConcatenate(StringBuffer buf, CharSequence[] argArray) || MySQLAdapterTest[testUpgrade(), testSchemaUnicodeValidation()]  -MySQLSchemaManagerTest[testAppendConcatenate()]|| not started ||  ---
|-
 
| protected abstract || StringBuffer appendTSExtract(StringBuffer buf, CharSequence sTS, byte nField) || --- || not started ||  ---
 
|-
 
| protected abstract || StringBuffer appendTSIncrement(StringBuffer buf, CharSequence sTS, CharSequence sDelta, byte nField) ||--- || not started ||  ---
 
|-
 
| protected abstract || String getDefaultTablespace() ||--- || not started ||  ---
 
 
|-
 
|-
 
| protected abstract || String getDefaultIndexspace() ||--- || not started ||  ---
 
| protected abstract || String getDefaultIndexspace() ||--- || not started ||  ---
 
|-
 
|-
 
| protected abstract || String getDefaultLongspace() ||--- || not started ||  ---
 
| protected abstract || String getDefaultLongspace() ||--- || not started ||  ---
|-
 
| protected abstract || void appendColumnType(StringBuffer buf, Column column) || it changes the syntax of creating table depends on the differences in data types || Need Opt. ||  ---
 
|-
 
| protected abstract || String getGUIDExpr() ||--- || not started ||  ---
 
|-
 
| protected abstract || String getNowExpr() ||--- || not started ||  ---
 
|-
 
| public abstract ||void analyzeTable(Table table) ||runs when executing <code> DatabaseSchemaTool.java</code> (through deploying the model ?)|| not started ||  ---
 
 
|-
 
|-
 
| protected abstract || void appendUpgradeStepStart(StringBuffer buf, RelationalSchema schema, SchemaVersion version) ||--- || not started ||  ---
 
| protected abstract || void appendUpgradeStepStart(StringBuffer buf, RelationalSchema schema, SchemaVersion version) ||--- || not started ||  ---
Line 147: Line 100:
 
|-
 
|-
 
| public abstract ||public abstract String getSeparator() ||--- || not started ||  ---
 
| public abstract ||public abstract String getSeparator() ||--- || not started ||  ---
|-
 
| protected abstract || String getCreateEtcScriptName() ||--- || not started ||  ---
 
 
|-
 
|-
 
| protected abstract || String getDropEtcScriptName() ||--- || not started ||  ---
 
| protected abstract || String getDropEtcScriptName() ||--- || not started ||  ---
|-
 
| protected abstract || String getSetupEtcScriptName() ||--- || not started ||  ---
 
 
|-
 
|-
 
| protected abstract || SQLAppender getDynamicSQLAppender(StringBuffer buf) ||--- || not started ||  ---
 
| protected abstract || SQLAppender getDynamicSQLAppender(StringBuffer buf) ||--- || not started ||  ---
|-
 
|}
 
 
===Non-Abstract Methods===
 
{| class="wikitable sortable" border="1" cellpadding="5"
 
|+'''Non-Abstract methods to work on'''
 
! Modifier !! Method !! Tests Cases !! Status !!  ToDo
 
|-
 
| protected  || void appendColumnSuffix(StringBuffer buf, Column column) || It's being used to add specific suffix- for postgre, SERIAL is added to the column name when an 'auto-increment' is needed || need opt. ||  ---
 
|-
 
| protected  || void appendIndexColumn(StringBuffer buf, IndexColumn indexColumn) ||  || not started ||  ---
 
|-
 
| protected  || void appendTableSuffix(StringBuffer buf, Table table) ||--- || not started ||  ---
 
 
|-
 
|-
 
| protected  || void appendUpgradeInitialize(StringBuffer buf, RelationalSchema schema) || May not be needed for Postgre || comp. ||  ---
 
| protected  || void appendUpgradeInitialize(StringBuffer buf, RelationalSchema schema) || May not be needed for Postgre || comp. ||  ---
|-
 
| protected  || void createIndex(Index index) ||--- || not started ||  ---
 
|-
 
| protected  || void createIndexes(Table table) ||--- || not started ||  ---
 
 
|-
 
|-
 
| public  || void dropTable(Table table) ||--- || not started ||  ---
 
| public  || void dropTable(Table table) ||--- || not started ||  ---
 
|-
 
|-
 
| protected  || String getAlterColumnToken() ||--- || not started ||  ---
 
| protected  || String getAlterColumnToken() ||--- || not started ||  ---
|-
 
| public  || String getDefaultRole() ||--- || not started ||  ---
 
 
|-
 
|-
 
| protected  || Table getDropSuccessor(Table left, Table right) ||--- || not started ||  ---
 
| protected  || Table getDropSuccessor(Table left, Table right) ||--- || not started ||  ---
|-
 
| protected  || String getFullTableName(String sSchemaName, String sTableName) ||--- || not started ||  ---
 
 
|-
 
|-
 
| protected  || String getIndexName(Index index, boolean bConstraint, boolean bQuote) ||--- || not started ||  ---
 
| protected  || String getIndexName(Index index, boolean bConstraint, boolean bQuote) ||--- || not started ||  ---
Line 196: Line 124:
 
|-
 
|-
 
|}
 
|}
 +
  
 
==MySQLSchemaManager.java==
 
==MySQLSchemaManager.java==
Line 215: Line 144:
 
|-
 
|-
 
|}
 
|}
 +
  
 
==PostgreSQLSchemaManager.java==
 
==PostgreSQLSchemaManager.java==

Latest revision as of 19:48, 26 January 2014

Important.png
This page may be obsolete.
It contains historical information.

Postgre Project - SQLSchemaManager Files

SQLSchemaManager.java

INITIAL SETUP OF SCHEMA

Modifier Method Tests Cases Status ToDo
protected abstract String getDefaultTablespace() --- not started ---
protected abstract String getDefaultIndexspace() --- not started ---
protected abstract String getDefaultLongspace() --- not started ---
protected abstract String getGUIDExpr() --- not started ---
protected abstract String getNowExpr() --- not started ---
public abstract void analyzeTable(Table table) runs when executing DatabaseSchemaTool.java (through deploying the model ?) not started ---
public abstract public abstract String getSeparator() --- not started ---
protected abstract void appendPrint(StringBuffer buf, String sMsg) --- not started ---
public abstract public abstract String getSeparator() --- not started ---
protected abstract String getCreateEtcScriptName() --- not started ---
protected abstract String getSetupEtcScriptName() --- not started ---
protected void appendIndexColumn(StringBuffer buf, IndexColumn indexColumn) not started ---
protected void appendTableSuffix(StringBuffer buf, Table table) --- not started ---
public String getDefaultRole() --- not started ---
protected String getFullTableName(String sSchemaName, String sTableName) --- not started ---
protected String getIndexName(Index index, boolean bConstraint, boolean bQuote) --- not started ---
public void setFragment(RelationalDatabaseFragment fragment) --- not started ---
protected abstract SQLAppender getDynamicSQLAppender(StringBuffer buf) --- not started ---

CREATE SCHEMA

Modifier Method Tests Cases Status ToDo
protected abstract StringBuffer appendConcatenate(StringBuffer buf, CharSequence[] argArray) MySQLAdapterTest[testUpgrade(), testSchemaUnicodeValidation()] -MySQLSchemaManagerTest[testAppendConcatenate()] not started ---
protected abstract String getDefaultTablespace() --- not started ---
protected abstract String getDefaultIndexspace() --- not started ---
protected abstract String getDefaultLongspace() --- not started ---
protected abstract void appendColumnType(StringBuffer buf, Column column) it changes the syntax of creating table depends on the differences in data types Need Opt. ---
protected abstract void appendPrint(StringBuffer buf, String sMsg) --- not started ---
protected abstract String getCreateEtcScriptName() --- not started ---
protected abstract SQLAppender getDynamicSQLAppender(StringBuffer buf) --- not started ---
protected void appendColumnSuffix(StringBuffer buf, Column column) It's being used to add specific suffix- for postgre, SERIAL is added to the column name when an 'auto-increment' is needed need opt. ---
protected void appendIndexColumn(StringBuffer buf, IndexColumn indexColumn) not started ---
protected void appendTableSuffix(StringBuffer buf, Table table) --- not started ---
protected void createIndex(Index index) --- not started ---
protected void createIndexes(Table table) --- not started ---


UPGRADE SCHEMA

Modifier Method Tests Cases Status ToDo
protected abstract StringBuffer appendConcatenate(StringBuffer buf, CharSequence[] argArray) MySQLAdapterTest[testUpgrade(), testSchemaUnicodeValidation()] -MySQLSchemaManagerTest[testAppendConcatenate()] not started ---
protected abstract String getDefaultIndexspace() --- not started ---
protected abstract String getDefaultLongspace() --- not started ---
protected abstract void appendUpgradeStepStart(StringBuffer buf, RelationalSchema schema, SchemaVersion version) --- not started ---
protected abstract void appendUpgradeStepEnd(StringBuffer buf, RelationalSchema schema, SchemaVersion version, SchemaVersion prev, String sFailMsg) --- not started ---
protected abstract void appendPrint(StringBuffer buf, String sMsg) --- not started ---
public abstract public abstract String getSeparator() --- not started ---
protected abstract String getDropEtcScriptName() --- not started ---
protected abstract SQLAppender getDynamicSQLAppender(StringBuffer buf) --- not started ---
protected void appendUpgradeInitialize(StringBuffer buf, RelationalSchema schema) May not be needed for Postgre comp. ---
public void dropTable(Table table) --- not started ---
protected String getAlterColumnToken() --- not started ---
protected Table getDropSuccessor(Table left, Table right) --- not started ---
protected String getIndexName(Index index, boolean bConstraint, boolean bQuote) --- not started ---
protected void renameColumn(Column newColumn, Column oldColumn) --- not started ---
protected void renameTable(Table newTable, Table oldTable) --- not started ---
public void setFragment(RelationalDatabaseFragment fragment) --- not started ---
public void truncateTable(Table table) --- not started ---


MySQLSchemaManager.java

Methods specific to MySQL
Modifier Method Tests Cases Status ToDo
protected StringBuffer appendTSField(StringBuffer buf, byte nField) --- not started ---
protected void createTextTable(Table table) --- not started ---
protected void createTextTriggers(Table table, Index includeIndex, Index excludeIndex) --- not started ---
protected void dropTextTriggers(Table table) --- not started ---
protected void dropIndex(Index index) --- not started ---
protected static boolean hasTextTable(Table table) --- not started ---


PostgreSQLSchemaManager.java

Methods specific to PostgreSQL
Modifier Method Tests Cases Status ToDo
--- ---- --- --- ---