Difference between revisions of "PostgreSQl Adatper-nexj/research notes SQLSchemaManager"

From CDOT Wiki
Jump to: navigation, search
(Created page with '<pre> '''1/19/2011 (Peter Liu) Summary of reading the javadoc documentation of the SQLAdapter class ''' A. The Structure of SQLAdapter - 4 inner classes, 1 inner interface …')
 
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
{{Admon/obsolete}}
 +
 
<pre>
 
<pre>
'''1/19/2011 (Peter Liu)
+
1/19/2011 (Peter Liu)
  
Summary of reading the javadoc documentation of the SQLAdapter class
+
Summary of reading the javadoc documentation of the SQLSchemaManager class
'''
+
 
A. The Structure of SQLAdapter
+
A. The Structure of SQLSchemaManager
  
 
   - 4 inner classes, 1 inner interface
 
   - 4 inner classes, 1 inner interface
Line 11: Line 13:
 
     SQLAdatper (m_adapter), SQLAppender (m_appender), SQLConnection (m_connection)
 
     SQLAdatper (m_adapter), SQLAppender (m_appender), SQLConnection (m_connection)
  
     '''Note: What does SQLAppender do? It may help us to understand what the append methods do in the SQLAdapter class.'''
+
     * Note: What does SQLAppender do? It might help us to understand what the append methods do
 +
            in the SQLAdapter class.
 
   
 
   
 
   - the constructor that takes a reference to an SQLAdapter:
 
   - the constructor that takes a reference to an SQLAdapter:
Line 22: Line 25:
 
B. A List of 18 Abstract Methods
 
B. A List of 18 Abstract Methods
  
   '''Note: Some of the abstract methods are implemented in the MySQLSchemaManager class to return null.
+
   * Note: Some of the abstract methods are implemented in the MySQLSchemaManager class
'''
+
          to return null.
 +
 
 
1. abstract  void analyzeTable(Table table)
 
1. abstract  void analyzeTable(Table table)
  
Line 91: Line 95:
  
  
14. protected abstract  SQLSchemaManager.SQLAppender  getDynamicSQLAppender(java.lang.StringBuffer buf)
+
14. protected abstract  SQLSchemaManager.SQLAppender  getDynamicSQLAppender(
 +
                                                        java.lang.StringBuffer buf)
  
 
           Wraps a string buffer with an appender for generating dynamic SQL.
 
           Wraps a string buffer with an appender for generating dynamic SQL.

Latest revision as of 20:15, 26 January 2014

Important.png
This page may be obsolete.
It contains historical information.
1/19/2011 (Peter Liu)

Summary of reading the javadoc documentation of the SQLSchemaManager class

A. The Structure of SQLSchemaManager

   - 4 inner classes, 1 inner interface

   - 3 protected instance variables (relevant to our project):
     SQLAdatper (m_adapter), SQLAppender (m_appender), SQLConnection (m_connection)

     * Note: What does SQLAppender do? It might help us to understand what the append methods do
             in the SQLAdapter class.
 
   - the constructor that takes a reference to an SQLAdapter:

         protected  SQLSchemaManager(SQLAdapter adapter)
     
   - 18 abstract methods


B. A List of 18 Abstract Methods

   * Note: Some of the abstract methods are implemented in the MySQLSchemaManager class
           to return null.

1. abstract  void analyzeTable(Table table)

          Appends the SQL statements to gather statistics for a given table to the SQL appender.
         

2. protected abstract  void   appendColumnType(java.lang.StringBuffer buf,
                                               Column column)

          Appends a table column type declaration to a string buffer.
         
         
3. protected abstract  java.lang.StringBuffer   appendConcatenate(
                                                      java.lang.StringBuffer buf,
                                                      java.lang.CharSequence[] argArray)
                                                                 
          Concatenate all values in the list with valid SQL syntax.
         
4. protected abstract  void     appendPrint(java.lang.StringBuffer buf,
                                            java.lang.String sMsg)
                                           
          Appends the SQL for printing a message to a string buffer.
         
5. protected abstract  java.lang.StringBuffer     appendTSExtract(
                                                      java.lang.StringBuffer buf,
                                                      java.lang.CharSequence sTS, byte nField)
                                                               
          Extract nField from sTS with valid SQL syntax.
         
6.  protected abstract  java.lang.StringBuffer     appendTSIncrement(
                                                      java.lang.StringBuffer buf,
                                                      java.lang.CharSequence sTS,
                                                      java.lang.CharSequence sDelta,
                                                      byte nField)
                                                     
          Increment sTS by sDelta with valid SQL syntax.     
         
7. protected abstract  void     appendUpgradeStepEnd(
                                      java.lang.StringBuffer buf,
                                      RelationalSchema schema,
                                      SchemaVersion version,
                                      SchemaVersion prev,
                                      java.lang.String sFailMsg)
                                                    
          Appends the SQL for ending an upgrade step to a string buffer.
         
8. protected abstract  void     appendUpgradeStepStart(
                                      java.lang.StringBuffer buf,
                                      RelationalSchema schema,
                                      SchemaVersion version)
                                                      
          Appends the SQL for starting an upgrade step to a string buffer.
         
  
9. protected abstract  java.lang.String   getCreateEtcScriptName()
          
  
10. protected abstract  java.lang.String   getDefaultIndexspace()
          
11. protected abstract  java.lang.String   getDefaultLongspace()


12. protected abstract  java.lang.String     getDefaultTablespace()


13. protected abstract  java.lang.String     getDropEtcScriptName()


14. protected abstract  SQLSchemaManager.SQLAppender  getDynamicSQLAppender(
                                                         java.lang.StringBuffer buf)

          Wraps a string buffer with an appender for generating dynamic SQL.
         
         
15. protected abstract  java.lang.String     getGUIDExpr()
         
         
16. protected abstract  java.lang.String     getNowExpr()

17. abstract  java.lang.String     getSeparator()

18. protected abstract  java.lang.String     getSetupEtcScriptName()