C# Class SubSonic.SqlGeneration.Schema.ANSISchemaGenerator

A schema generator for your DB
Inheritance: ISchemaGenerator
Datei anzeigen Open project: rally25rs/SubSonic-3.0

Protected Properties

Property Type Description
ADD_COLUMN string
ALTER_COLUMN string
CREATE_TABLE string
DROP_COLUMN string
DROP_TABLE string
UPDATE_DEFAULTS string

Public Methods

Method Description
BuildAddColumnStatement ( string tableName, IColumn column ) : string

Adds the column.

BuildAlterColumnStatement ( IColumn column ) : string

Alters the column.

BuildCreateTableStatement ( ITable table ) : string

Builds a CREATE TABLE statement.

BuildDropColumnStatement ( string tableName, string columnName ) : string

Removes the column.

BuildDropTableStatement ( ITable table ) : string

Builds a DROP TABLE statement.

ConvertDataTypeToDbType ( DbType dataType ) : DbType
ConvertDataValueForThisProvider ( object input ) : object
GenerateColumnAttributes ( IColumn column ) : string

Sets the column attributes.

GenerateColumns ( ITable table ) : string

Generates the columns.

GetDbType ( string sqlType ) : DbType
GetNativeType ( DbType dbType ) : string

Gets the type of the native.

GetTableFromDB ( IDataProvider provider, string tableName ) : ITable

Gets an ITable from the DB based on name

GetTableList ( IDataProvider provider ) : string[]

Creates a list of table names

SetColumnDefaults ( IColumn column ) : void

Protected Methods

Method Description
BuildDropTableStatement ( string tableName ) : string

Builds a DROP TABLE statement.

Method Details

BuildAddColumnStatement() public method

Adds the column.
public BuildAddColumnStatement ( string tableName, IColumn column ) : string
tableName string Name of the table.
column IColumn The column.
return string

BuildAlterColumnStatement() public method

Alters the column.
public BuildAlterColumnStatement ( IColumn column ) : string
column IColumn The column.
return string

BuildCreateTableStatement() public method

Builds a CREATE TABLE statement.
public BuildCreateTableStatement ( ITable table ) : string
table ITable
return string

BuildDropColumnStatement() public method

Removes the column.
public BuildDropColumnStatement ( string tableName, string columnName ) : string
tableName string Name of the table.
columnName string Name of the column.
return string

BuildDropTableStatement() public method

Builds a DROP TABLE statement.
public BuildDropTableStatement ( ITable table ) : string
table ITable
return string

BuildDropTableStatement() protected method

Builds a DROP TABLE statement.
protected BuildDropTableStatement ( string tableName ) : string
tableName string Name of the table.
return string

ConvertDataTypeToDbType() public method

public ConvertDataTypeToDbType ( DbType dataType ) : DbType
dataType DbType
return DbType

ConvertDataValueForThisProvider() public method

public ConvertDataValueForThisProvider ( object input ) : object
input object
return object

GenerateColumnAttributes() public abstract method

Sets the column attributes.
public abstract GenerateColumnAttributes ( IColumn column ) : string
column IColumn The column.
return string

GenerateColumns() public method

Generates the columns.
public GenerateColumns ( ITable table ) : string
table ITable Table containing the columns.
return string

GetDbType() public abstract method

public abstract GetDbType ( string sqlType ) : DbType
sqlType string
return DbType

GetNativeType() public abstract method

Gets the type of the native.
public abstract GetNativeType ( DbType dbType ) : string
dbType DbType Type of the db.
return string

GetTableFromDB() public method

Gets an ITable from the DB based on name
public GetTableFromDB ( IDataProvider provider, string tableName ) : ITable
provider IDataProvider
tableName string
return ITable

GetTableList() public method

Creates a list of table names
public GetTableList ( IDataProvider provider ) : string[]
provider IDataProvider
return string[]

SetColumnDefaults() public method

public SetColumnDefaults ( IColumn column ) : void
column IColumn
return void

Property Details

ADD_COLUMN protected_oe property

protected string ADD_COLUMN
return string

ALTER_COLUMN protected_oe property

protected string ALTER_COLUMN
return string

CREATE_TABLE protected_oe property

protected string CREATE_TABLE
return string

DROP_COLUMN protected_oe property

protected string DROP_COLUMN
return string

DROP_TABLE protected_oe property

protected string DROP_TABLE
return string

UPDATE_DEFAULTS protected_oe property

protected string UPDATE_DEFAULTS
return string