Interface IEntitySqlWriter
Assembly: LemonEdge.Database.Connector.dll
Syntax
public interface IEntitySqlWriter : IEntitySqlWriterCore
Methods
AlterColumn(string, IDbConnection, bool)
Alters the specified column to the new type
You should delete all functions first that are schema bound before making table structural changes
Declaration
Task AlterColumn(string columnName, IDbConnection cn, bool forHistoryTable = false)
Parameters
Returns
AlterColumnName(string, string, IDbConnection, bool)
Declaration
Task AlterColumnName(string columnName, string oldName, IDbConnection cn, bool forHistoryTable = false)
Parameters
Returns
AlterColumnType(ColumnDescriptor, bool, bool, bool, IDbConnection, bool)
Declaration
Task AlterColumnType(ColumnDescriptor prop, bool typeChanged, bool nullChanged, bool columnMaxLengthChanged, IDbConnection cn, bool forHistoryTable = false)
Parameters
Returns
AlterTableName(string, IDbConnection)
Declaration
Task AlterTableName(string oldName, IDbConnection cn)
Parameters
Returns
Declaration
Task ClearRelatedTableConstraints(ObseleteEntityDescriptor obselete, IDataAccessor accessor, IDbConnection cn)
Parameters
Returns
ClearTableConstraints(string, IDataAccessor, IDbConnection)
Declaration
Task ClearTableConstraints(string tableName, IDataAccessor accessor, IDbConnection cn)
Parameters
Returns
CreateColumn(string, IDbConnection, bool)
Adds the specified column from the table for this entity.
You should delete all functions first that are schema bound before making table structural changes
Declaration
Task CreateColumn(string columnName, IDbConnection cn, bool forHistoryTable = false)
Parameters
Returns
CreateFunction(BaseFunctionDescriptor, IDbConnection)
Declaration
Task CreateFunction(BaseFunctionDescriptor function, IDbConnection cn)
Parameters
Returns
CreatePrimaryKey(IDbConnection, bool)
Declaration
Task CreatePrimaryKey(IDbConnection cn, bool forHistoryTable)
Parameters
Returns
CreateProcedure(BaseProcedureDescriptor, IDbConnection)
Declaration
Task CreateProcedure(BaseProcedureDescriptor function, IDbConnection cn)
Parameters
Returns
CreateTable(IDbConnection)
Declaration
Task CreateTable(IDbConnection cn)
Parameters
Returns
DeleteColumn(string, IDbConnection, bool)
Removes the specified column from the table for this entity.
You should delete all functions first that are schema bound before making table structural changes
Declaration
Task DeleteColumn(string columnName, IDbConnection cn, bool forHistoryTable = false)
Parameters
Returns
DoesColumnExist(string, IDbConnection, bool)
Declaration
Task<bool> DoesColumnExist(string columnName, IDbConnection cn, bool forHistoryTable)
Parameters
Returns
DoesFunctionExist(BaseFunctionDescriptor, IDbConnection)
Declaration
Task<bool> DoesFunctionExist(BaseFunctionDescriptor function, IDbConnection cn)
Parameters
Returns
DoesIndexExist(TableIndex, IDbConnection, bool)
Declaration
Task<bool> DoesIndexExist(TableIndex index, IDbConnection cn, bool forHistoryTable)
Parameters
Returns
DoesOldTableExist(IDbConnection)
Declaration
Task<string> DoesOldTableExist(IDbConnection cn)
Parameters
Returns
DoesProcedureExist(BaseProcedureDescriptor, IDbConnection)
Declaration
Task<bool> DoesProcedureExist(BaseProcedureDescriptor function, IDbConnection cn)
Parameters
Returns
DoesTableExist(IDbConnection)
Declaration
Task<bool> DoesTableExist(IDbConnection cn)
Parameters
Returns
DropAllIndexes(IDbConnection, bool)
Drop all indexes apart from primary and clustered - needs to be done through custom script (as those should be
alter indexes to run on azure)
Declaration
Task DropAllIndexes(IDbConnection cn, bool forHistoryTable = false)
Parameters
Returns
DropFunction(BaseFunctionDescriptor, IDbConnection)
Declaration
Task DropFunction(BaseFunctionDescriptor function, IDbConnection cn)
Parameters
Returns
DropFunction(IDataAccessor, BaseFunctionDescriptor, IDbConnection)
Declaration
Task DropFunction(IDataAccessor accessor, BaseFunctionDescriptor function, IDbConnection cn)
Parameters
Returns
DropPrimaryKey(IDbConnection, bool)
Declaration
Task DropPrimaryKey(IDbConnection cn, bool forHistoryTable)
Parameters
Returns
DropProcedure(BaseProcedureDescriptor, IDbConnection)
Declaration
Task DropProcedure(BaseProcedureDescriptor function, IDbConnection cn)
Parameters
Returns
DropProcedure(IDataAccessor, BaseProcedureDescriptor, IDbConnection)
Declaration
Task DropProcedure(IDataAccessor accessor, BaseProcedureDescriptor function, IDbConnection cn)
Parameters
Returns
EnsureIndexesExist(IDbConnection, bool)
Declaration
Task EnsureIndexesExist(IDbConnection cn, bool forHistoryTable = false)
Parameters
Returns
GetColumnsInfo(IDbConnection, string)
Declaration
Task<IEnumerable<ColumnProperties>> GetColumnsInfo(IDbConnection cn, string tableName = "")
Parameters
Returns
GetExtraColumnNames(IEnumerable<string>)
Declaration
IEnumerable<string> GetExtraColumnNames(IEnumerable<string> existingColumnNames)
Parameters
Returns
GetIncorrectColumnTypes(IEnumerable<ColumnProperties>)
Declaration
IEnumerable<ColumnProperties> GetIncorrectColumnTypes(IEnumerable<ColumnProperties> existingColumnNames)
Parameters
Returns
GetMissingColumnNames(IEnumerable<string>)
Declaration
IEnumerable<(string MissingColName, string ExistingOldValue)> GetMissingColumnNames(IEnumerable<string> existingColumnNames)
Parameters
Returns
RenameColumn(string, string, IDbConnection)
Declaration
Task RenameColumn(string oldColumnName, string newColumnName, IDbConnection cn)
Parameters
Returns
Extension Methods