C# 클래스 Simple.Migrator.Providers.TransformationProvider

Base class for every transformation providers. A 'tranformation' is an operation that modifies the database.
상속: ITransformationProvider
파일 보기 프로젝트 열기: juanplopes/simple

보호된 프로퍼티들

프로퍼티 타입 설명
_connection IDbConnection
_connectionString string
_dialect Dialect

공개 메소드들

메소드 설명
AddCheckConstraint ( string name, string table, string checkSql ) : void
AddColumn ( string table, Column column ) : void
AddColumn ( string table, string sqlColumn ) : void
AddColumn ( string table, string column, DbType type ) : void

AddColumn(string, string, Type, int, ColumnProperty, object)

AddColumn ( string table, string column, DbType type, ColumnProperty property ) : void

AddColumn(string, string, Type, int, ColumnProperty, object)

AddColumn ( string table, string column, DbType type, int size ) : void

AddColumn(string, string, Type, int, ColumnProperty, object)

AddColumn ( string table, string column, DbType type, int size, ColumnProperty property ) : void

AddColumn(string, string, Type, int, ColumnProperty, object)

AddColumn ( string table, string column, DbType type, int size, ColumnProperty property, object defaultValue ) : void

Add a new column to an existing table.

AddColumn ( string table, string column, DbType type, object defaultValue ) : void
AddForeignKey ( string name, string primaryTable, string primaryColumn, string refTable, string refColumn ) : void

Append a foreign key (relation) between two tables. tables.

AddForeignKey ( string name, string primaryTable, string primaryColumn, string refTable, string refColumn, Simple.Migrator.Framework.ForeignKeyConstraint constraint ) : void
AddIndex ( string name, string table ) : void
AddPrimaryKey ( string name, string table ) : void

Append a primary key to a table.

AddTable ( string name ) : void

Add a new table

AddTable ( string name, string engine ) : void

Add a new table

AddTable ( string table, string engine, string columns ) : void
AddUniqueConstraint ( string name, string table ) : void
BeginTransaction ( ) : void

Starts a transaction. Called by the migration mediator.

ChangeColumn ( string table, Column column ) : void
ChangeColumn ( string table, string sqlColumn ) : void
ColumnExists ( string table, string column ) : bool
Commit ( ) : void

Commit the current transaction. Called by the migrations mediator.

ConstraintExists ( string table, string name ) : bool

Determines if a constraint exists.

Delete ( string table ) : int
Delete ( string table, string columns, string values ) : int
Dispose ( ) : void
ExecuteNonQuery ( string sql ) : int
ExecuteQuery ( string sql ) : IDataReader

Execute an SQL query returning results.

ExecuteScalar ( string sql ) : object
GenerateForeignKey ( string primaryTable, string refTable ) : void
GenerateForeignKey ( string primaryTable, string refTable, Simple.Migrator.Framework.ForeignKeyConstraint constraint ) : void
GenerateForeignKey ( string primaryTable, string primaryColumn, string refTable, string refColumn ) : void

Guesses the name of the foreign key and add it

GenerateForeignKey ( string primaryTable, string primaryColumn, string refTable, string refColumn, Simple.Migrator.Framework.ForeignKeyConstraint constraint ) : void

Guesses the name of the foreign key and add it

GetColumnByName ( string table, string columnName ) : Column
GetColumns ( string table ) : Column[]
GetCommand ( ) : IDbCommand
GetPrimaryKeys ( IEnumerable columns ) : List
GetTables ( ) : string[]
Insert ( string table, string columns, string values ) : int
IsThisProvider ( string provider ) : bool
JoinColumnsAndValues ( string columns, string values ) : string
MigrationApplied ( long version ) : void

Marks a Migration version number as having been applied

MigrationUnApplied ( long version ) : void

Marks a Migration version number as having been rolled back from the database

PrimaryKeyExists ( string table, string name ) : bool
QuoteValues ( string values ) : string
QuoteValues ( string values ) : string[]
RemoveColumn ( string table, string column ) : void
RemoveConstraint ( string table, string name ) : void
RemoveForeignKey ( string table, string name ) : void
RemoveIndex ( string name, string table ) : void
RemoveTable ( string name ) : void
RenameColumn ( string tableName, string oldColumnName, string newColumnName ) : void
RenameTable ( string oldName, string newName ) : void
Rollback ( ) : void

Rollback the current migration. Called by the migration mediator.

SchemaInfoName ( string schemainfoname ) : void
Select ( string what, string from ) : IDataReader
Select ( string what, string from, string where ) : IDataReader
Select ( string what, string from, string where, string orderBy ) : IDataReader
SelectScalar ( string what, string from ) : object
SelectScalar ( string what, string from, string where ) : object
SelectScalar ( string what, string from, string where, string orderBy ) : object
TableExists ( string table ) : bool
Update ( string table, string columns, string values ) : int
Update ( string table, string columns, string values, string where ) : int
this ( string provider ) : ITransformationProvider

보호된 메소드들

메소드 설명
CreateSchemaInfoTable ( ) : void
EnsureHasConnection ( ) : void
JoinColumns ( IEnumerable columns ) : string
JoinColumnsAndIndexes ( IEnumerable columns ) : string
JoinIndexes ( IEnumerable columns ) : string
TransformationProvider ( Dialect dialect, string invariantProvider, string connectionString ) : System

비공개 메소드들

메소드 설명
BuildCommand ( string sql ) : IDbCommand

메소드 상세

AddCheckConstraint() 공개 메소드

public AddCheckConstraint ( string name, string table, string checkSql ) : void
name string
table string
checkSql string
리턴 void

AddColumn() 공개 메소드

public AddColumn ( string table, Column column ) : void
table string
column Column
리턴 void

AddColumn() 공개 메소드

public AddColumn ( string table, string sqlColumn ) : void
table string
sqlColumn string
리턴 void

AddColumn() 공개 메소드

AddColumn(string, string, Type, int, ColumnProperty, object)
public AddColumn ( string table, string column, DbType type ) : void
table string
column string
type DbType
리턴 void

AddColumn() 공개 메소드

AddColumn(string, string, Type, int, ColumnProperty, object)
public AddColumn ( string table, string column, DbType type, ColumnProperty property ) : void
table string
column string
type DbType
property ColumnProperty
리턴 void

AddColumn() 공개 메소드

AddColumn(string, string, Type, int, ColumnProperty, object)
public AddColumn ( string table, string column, DbType type, int size ) : void
table string
column string
type DbType
size int
리턴 void

AddColumn() 공개 메소드

AddColumn(string, string, Type, int, ColumnProperty, object)
public AddColumn ( string table, string column, DbType type, int size, ColumnProperty property ) : void
table string
column string
type DbType
size int
property ColumnProperty
리턴 void

AddColumn() 공개 메소드

Add a new column to an existing table.
public AddColumn ( string table, string column, DbType type, int size, ColumnProperty property, object defaultValue ) : void
table string Table to which to add the column
column string Column name
type DbType Date type of the column
size int Max length of the column
property ColumnProperty Properties of the column, see ColumnProperty,
defaultValue object Default value
리턴 void

AddColumn() 공개 메소드

public AddColumn ( string table, string column, DbType type, object defaultValue ) : void
table string
column string
type DbType
defaultValue object
리턴 void

AddForeignKey() 공개 메소드

Append a foreign key (relation) between two tables. tables.
public AddForeignKey ( string name, string primaryTable, string primaryColumn, string refTable, string refColumn ) : void
name string Constraint name
primaryTable string Table name containing the primary key
primaryColumn string Primary key column name
refTable string Foreign table name
refColumn string Foreign column name
리턴 void

AddForeignKey() 공개 메소드

public AddForeignKey ( string name, string primaryTable, string primaryColumn, string refTable, string refColumn, Simple.Migrator.Framework.ForeignKeyConstraint constraint ) : void
name string
primaryTable string
primaryColumn string
refTable string
refColumn string
constraint Simple.Migrator.Framework.ForeignKeyConstraint
리턴 void

AddIndex() 공개 메소드

public AddIndex ( string name, string table ) : void
name string
table string
리턴 void

AddPrimaryKey() 공개 메소드

Append a primary key to a table.
public AddPrimaryKey ( string name, string table ) : void
name string Constraint name
table string Table name
리턴 void

AddTable() 공개 메소드

Add a new table
public AddTable ( string name ) : void
name string Table name
리턴 void

AddTable() 공개 메소드

Add a new table
public AddTable ( string name, string engine ) : void
name string Table name
engine string the database storage engine to use
리턴 void

AddTable() 공개 메소드

public AddTable ( string table, string engine, string columns ) : void
table string
engine string
columns string
리턴 void

AddUniqueConstraint() 공개 메소드

public AddUniqueConstraint ( string name, string table ) : void
name string
table string
리턴 void

BeginTransaction() 공개 메소드

Starts a transaction. Called by the migration mediator.
public BeginTransaction ( ) : void
리턴 void

ChangeColumn() 공개 메소드

public ChangeColumn ( string table, Column column ) : void
table string
column Column
리턴 void

ChangeColumn() 공개 메소드

public ChangeColumn ( string table, string sqlColumn ) : void
table string
sqlColumn string
리턴 void

ColumnExists() 공개 메소드

public ColumnExists ( string table, string column ) : bool
table string
column string
리턴 bool

Commit() 공개 메소드

Commit the current transaction. Called by the migrations mediator.
public Commit ( ) : void
리턴 void

ConstraintExists() 공개 추상적인 메소드

Determines if a constraint exists.
public abstract ConstraintExists ( string table, string name ) : bool
table string Table owning the constraint
name string Constraint name
리턴 bool

CreateSchemaInfoTable() 보호된 메소드

protected CreateSchemaInfoTable ( ) : void
리턴 void

Delete() 공개 메소드

public Delete ( string table ) : int
table string
리턴 int

Delete() 공개 메소드

public Delete ( string table, string columns, string values ) : int
table string
columns string
values string
리턴 int

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

EnsureHasConnection() 보호된 메소드

protected EnsureHasConnection ( ) : void
리턴 void

ExecuteNonQuery() 공개 메소드

public ExecuteNonQuery ( string sql ) : int
sql string
리턴 int

ExecuteQuery() 공개 메소드

Execute an SQL query returning results.
public ExecuteQuery ( string sql ) : IDataReader
sql string The SQL command.
리턴 IDataReader

ExecuteScalar() 공개 메소드

public ExecuteScalar ( string sql ) : object
sql string
리턴 object

GenerateForeignKey() 공개 메소드

public GenerateForeignKey ( string primaryTable, string refTable ) : void
primaryTable string
refTable string
리턴 void

GenerateForeignKey() 공개 메소드

public GenerateForeignKey ( string primaryTable, string refTable, Simple.Migrator.Framework.ForeignKeyConstraint constraint ) : void
primaryTable string
refTable string
constraint Simple.Migrator.Framework.ForeignKeyConstraint
리턴 void

GenerateForeignKey() 공개 메소드

Guesses the name of the foreign key and add it
public GenerateForeignKey ( string primaryTable, string primaryColumn, string refTable, string refColumn ) : void
primaryTable string
primaryColumn string
refTable string
refColumn string
리턴 void

GenerateForeignKey() 공개 메소드

Guesses the name of the foreign key and add it
public GenerateForeignKey ( string primaryTable, string primaryColumn, string refTable, string refColumn, Simple.Migrator.Framework.ForeignKeyConstraint constraint ) : void
primaryTable string
primaryColumn string
refTable string
refColumn string
constraint Simple.Migrator.Framework.ForeignKeyConstraint
리턴 void

GetColumnByName() 공개 메소드

public GetColumnByName ( string table, string columnName ) : Column
table string
columnName string
리턴 Column

GetColumns() 공개 메소드

public GetColumns ( string table ) : Column[]
table string
리턴 Column[]

GetCommand() 공개 메소드

public GetCommand ( ) : IDbCommand
리턴 IDbCommand

GetPrimaryKeys() 공개 메소드

public GetPrimaryKeys ( IEnumerable columns ) : List
columns IEnumerable
리턴 List

GetTables() 공개 메소드

public GetTables ( ) : string[]
리턴 string[]

Insert() 공개 메소드

public Insert ( string table, string columns, string values ) : int
table string
columns string
values string
리턴 int

IsThisProvider() 공개 메소드

public IsThisProvider ( string provider ) : bool
provider string
리턴 bool

JoinColumns() 보호된 메소드

protected JoinColumns ( IEnumerable columns ) : string
columns IEnumerable
리턴 string

JoinColumnsAndIndexes() 보호된 메소드

protected JoinColumnsAndIndexes ( IEnumerable columns ) : string
columns IEnumerable
리턴 string

JoinColumnsAndValues() 공개 메소드

public JoinColumnsAndValues ( string columns, string values ) : string
columns string
values string
리턴 string

JoinIndexes() 보호된 메소드

protected JoinIndexes ( IEnumerable columns ) : string
columns IEnumerable
리턴 string

MigrationApplied() 공개 메소드

Marks a Migration version number as having been applied
public MigrationApplied ( long version ) : void
version long The version number of the migration that was applied
리턴 void

MigrationUnApplied() 공개 메소드

Marks a Migration version number as having been rolled back from the database
public MigrationUnApplied ( long version ) : void
version long The version number of the migration that was removed
리턴 void

PrimaryKeyExists() 공개 메소드

public PrimaryKeyExists ( string table, string name ) : bool
table string
name string
리턴 bool

QuoteValues() 공개 메소드

public QuoteValues ( string values ) : string
values string
리턴 string

QuoteValues() 공개 메소드

public QuoteValues ( string values ) : string[]
values string
리턴 string[]

RemoveColumn() 공개 메소드

public RemoveColumn ( string table, string column ) : void
table string
column string
리턴 void

RemoveConstraint() 공개 메소드

public RemoveConstraint ( string table, string name ) : void
table string
name string
리턴 void

RemoveForeignKey() 공개 메소드

public RemoveForeignKey ( string table, string name ) : void
table string
name string
리턴 void

RemoveIndex() 공개 메소드

public RemoveIndex ( string name, string table ) : void
name string
table string
리턴 void

RemoveTable() 공개 메소드

public RemoveTable ( string name ) : void
name string
리턴 void

RenameColumn() 공개 메소드

public RenameColumn ( string tableName, string oldColumnName, string newColumnName ) : void
tableName string
oldColumnName string
newColumnName string
리턴 void

RenameTable() 공개 메소드

public RenameTable ( string oldName, string newName ) : void
oldName string
newName string
리턴 void

Rollback() 공개 메소드

Rollback the current migration. Called by the migration mediator.
public Rollback ( ) : void
리턴 void

SchemaInfoName() 공개 메소드

public SchemaInfoName ( string schemainfoname ) : void
schemainfoname string
리턴 void

Select() 공개 메소드

public Select ( string what, string from ) : IDataReader
what string
from string
리턴 IDataReader

Select() 공개 메소드

public Select ( string what, string from, string where ) : IDataReader
what string
from string
where string
리턴 IDataReader

Select() 공개 메소드

public Select ( string what, string from, string where, string orderBy ) : IDataReader
what string
from string
where string
orderBy string
리턴 IDataReader

SelectScalar() 공개 메소드

public SelectScalar ( string what, string from ) : object
what string
from string
리턴 object

SelectScalar() 공개 메소드

public SelectScalar ( string what, string from, string where ) : object
what string
from string
where string
리턴 object

SelectScalar() 공개 메소드

public SelectScalar ( string what, string from, string where, string orderBy ) : object
what string
from string
where string
orderBy string
리턴 object

TableExists() 공개 메소드

public TableExists ( string table ) : bool
table string
리턴 bool

TransformationProvider() 보호된 메소드

protected TransformationProvider ( Dialect dialect, string invariantProvider, string connectionString ) : System
dialect Dialect
invariantProvider string
connectionString string
리턴 System

Update() 공개 메소드

public Update ( string table, string columns, string values ) : int
table string
columns string
values string
리턴 int

Update() 공개 메소드

public Update ( string table, string columns, string values, string where ) : int
table string
columns string
values string
where string
리턴 int

this() 공개 메소드

public this ( string provider ) : ITransformationProvider
provider string
리턴 ITransformationProvider

프로퍼티 상세

_connection 보호되어 있는 프로퍼티

protected IDbConnection _connection
리턴 IDbConnection

_connectionString 보호되어 있는 프로퍼티

protected string _connectionString
리턴 string

_dialect 보호되어 있는 프로퍼티

protected Dialect,Simple.Migrator.Providers _dialect
리턴 Dialect