liquibase.snapshot.jvm
Class MSSQLDatabaseSnapshotGenerator

java.lang.Object
  extended by liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator
      extended by liquibase.snapshot.jvm.MSSQLDatabaseSnapshotGenerator
All Implemented Interfaces:
DatabaseSnapshotGenerator

public class MSSQLDatabaseSnapshotGenerator
extends JdbcDatabaseSnapshotGenerator


Field Summary
 
Fields inherited from interface liquibase.snapshot.DatabaseSnapshotGenerator
PRIORITY_DATABASE, PRIORITY_DEFAULT
 
Constructor Summary
MSSQLDatabaseSnapshotGenerator()
           
 
Method Summary
protected  String convertColumnNameToDatabaseTableName(String columnName)
           
protected  String convertTableNameToDatabaseTableName(String tableName)
           
protected  ForeignKeyConstraintType convertToForeignKeyConstraintType(int jdbcType)
          The sp_fkeys stored procedure spec says that returned integer values of 0, 1 and 2 translate to cascade, noAction and SetNull, which are not the values in the JDBC standard.
 int getPriority(Database database)
           
 boolean supports(Database database)
           
 
Methods inherited from class liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator
configureColumnType, convertFromDatabaseName, convertPrimaryKeyName, createSnapshot, fillForeignKeyInfo, generateForeignKey, getAdditionalForeignKeys, getColumn, getColumnTypeAndDefValue, getDatabaseChangeLogLockTable, getDatabaseChangeLogTable, getDatabaseType, getForeignKeyByForeignKeyTable, getForeignKeys, getMetaData, getTable, hasDatabaseChangeLogLockTable, hasDatabaseChangeLogTable, hasIndex, hasTable, hasView, isColumnAutoIncrement, readColumns, readForeignKeyInformation, readIndexes, readPrimaryKeys, readSequences, readTables, readUniqueConstraints, readViews, updateListeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MSSQLDatabaseSnapshotGenerator

public MSSQLDatabaseSnapshotGenerator()
Method Detail

supports

public boolean supports(Database database)

getPriority

public int getPriority(Database database)

convertTableNameToDatabaseTableName

protected String convertTableNameToDatabaseTableName(String tableName)
Overrides:
convertTableNameToDatabaseTableName in class JdbcDatabaseSnapshotGenerator

convertColumnNameToDatabaseTableName

protected String convertColumnNameToDatabaseTableName(String columnName)
Overrides:
convertColumnNameToDatabaseTableName in class JdbcDatabaseSnapshotGenerator

convertToForeignKeyConstraintType

protected ForeignKeyConstraintType convertToForeignKeyConstraintType(int jdbcType)
                                                              throws DatabaseException
The sp_fkeys stored procedure spec says that returned integer values of 0, 1 and 2 translate to cascade, noAction and SetNull, which are not the values in the JDBC standard. This override is a sticking plaster to stop invalid SQL from being generated.

Overrides:
convertToForeignKeyConstraintType in class JdbcDatabaseSnapshotGenerator
Parameters:
JDBC - foreign constraint type from JTDS (via sys.sp_fkeys)
Throws:
DatabaseException


Copyright © 2004-2011 Liquibase.org. All Rights Reserved.